summaryrefslogtreecommitdiff
path: root/scene/gui
diff options
context:
space:
mode:
Diffstat (limited to 'scene/gui')
-rw-r--r--scene/gui/color_picker.cpp24
-rw-r--r--scene/gui/color_picker.h8
-rw-r--r--scene/gui/input_action.h2
-rw-r--r--scene/gui/item_list.h2
-rw-r--r--scene/gui/line_edit.h2
-rw-r--r--scene/gui/option_button.cpp12
-rw-r--r--scene/gui/patch_9_rect.h2
-rw-r--r--scene/gui/popup.cpp8
-rw-r--r--scene/gui/popup_menu.h2
-rw-r--r--scene/gui/rich_text_label.h2
-rw-r--r--scene/gui/tab_container.cpp4
-rw-r--r--scene/gui/tab_container.h2
-rw-r--r--scene/gui/text_edit.cpp6
-rw-r--r--scene/gui/text_edit.h12
-rw-r--r--scene/gui/texture_button.cpp4
-rw-r--r--scene/gui/texture_button.h4
-rw-r--r--scene/gui/tree.h4
-rw-r--r--scene/gui/video_player.h2
18 files changed, 51 insertions, 51 deletions
diff --git a/scene/gui/color_picker.cpp b/scene/gui/color_picker.cpp
index dddd53dd95..5e110362c8 100644
--- a/scene/gui/color_picker.cpp
+++ b/scene/gui/color_picker.cpp
@@ -314,9 +314,9 @@ void ColorPicker::_hsv_draw(int p_which, Control *c) {
}
}
-void ColorPicker::_uv_input(const Ref<InputEvent> &ev) {
+void ColorPicker::_uv_input(const Ref<InputEvent> &p_event) {
- Ref<InputEventMouseButton> bev = ev;
+ Ref<InputEventMouseButton> bev = p_event;
if (bev.is_valid()) {
if (bev->is_pressed() && bev->get_button_index() == BUTTON_LEFT) {
@@ -335,7 +335,7 @@ void ColorPicker::_uv_input(const Ref<InputEvent> &ev) {
}
}
- Ref<InputEventMouseMotion> mev = ev;
+ Ref<InputEventMouseMotion> mev = p_event;
if (mev.is_valid()) {
if (!changing_color)
@@ -352,9 +352,9 @@ void ColorPicker::_uv_input(const Ref<InputEvent> &ev) {
}
}
-void ColorPicker::_w_input(const Ref<InputEvent> &ev) {
+void ColorPicker::_w_input(const Ref<InputEvent> &p_event) {
- Ref<InputEventMouseButton> bev = ev;
+ Ref<InputEventMouseButton> bev = p_event;
if (bev.is_valid()) {
@@ -372,7 +372,7 @@ void ColorPicker::_w_input(const Ref<InputEvent> &ev) {
emit_signal("color_changed", color);
}
- Ref<InputEventMouseMotion> mev = ev;
+ Ref<InputEventMouseMotion> mev = p_event;
if (mev.is_valid()) {
@@ -388,9 +388,9 @@ void ColorPicker::_w_input(const Ref<InputEvent> &ev) {
}
}
-void ColorPicker::_preset_input(const Ref<InputEvent> &ev) {
+void ColorPicker::_preset_input(const Ref<InputEvent> &p_event) {
- Ref<InputEventMouseButton> bev = ev;
+ Ref<InputEventMouseButton> bev = p_event;
if (bev.is_valid()) {
@@ -407,7 +407,7 @@ void ColorPicker::_preset_input(const Ref<InputEvent> &ev) {
emit_signal("color_changed", color);
}
- Ref<InputEventMouseMotion> mev = ev;
+ Ref<InputEventMouseMotion> mev = p_event;
if (mev.is_valid()) {
@@ -423,9 +423,9 @@ void ColorPicker::_preset_input(const Ref<InputEvent> &ev) {
}
}
-void ColorPicker::_screen_input(const Ref<InputEvent> &ev) {
+void ColorPicker::_screen_input(const Ref<InputEvent> &p_event) {
- Ref<InputEventMouseButton> bev = ev;
+ Ref<InputEventMouseButton> bev = p_event;
if (bev.is_valid()) {
@@ -435,7 +435,7 @@ void ColorPicker::_screen_input(const Ref<InputEvent> &ev) {
}
}
- Ref<InputEventMouseMotion> mev = ev;
+ Ref<InputEventMouseMotion> mev = p_event;
if (mev.is_valid()) {
Viewport *r = get_tree()->get_root();
diff --git a/scene/gui/color_picker.h b/scene/gui/color_picker.h
index 1a79266409..d35182e062 100644
--- a/scene/gui/color_picker.h
+++ b/scene/gui/color_picker.h
@@ -81,10 +81,10 @@ private:
void _sample_draw();
void _hsv_draw(int p_which, Control *c);
- void _uv_input(const Ref<InputEvent> &p_input);
- void _w_input(const Ref<InputEvent> &p_input);
- void _preset_input(const Ref<InputEvent> &p_input);
- void _screen_input(const Ref<InputEvent> &p_input);
+ void _uv_input(const Ref<InputEvent> &p_event);
+ void _w_input(const Ref<InputEvent> &p_event);
+ void _preset_input(const Ref<InputEvent> &p_event);
+ void _screen_input(const Ref<InputEvent> &p_event);
void _add_preset_pressed();
void _screen_pick_pressed();
diff --git a/scene/gui/input_action.h b/scene/gui/input_action.h
index 6d13d8bd40..5c91d2be28 100644
--- a/scene/gui/input_action.h
+++ b/scene/gui/input_action.h
@@ -45,7 +45,7 @@ protected:
public:
void set_shortcut(const Ref<InputEvent> &p_shortcut);
Ref<InputEvent> get_shortcut() const;
- bool is_shortcut(const Ref<InputEvent> &p_Event) const;
+ bool is_shortcut(const Ref<InputEvent> &p_event) const;
bool is_valid() const;
String get_as_text() const;
diff --git a/scene/gui/item_list.h b/scene/gui/item_list.h
index 137eff8885..5bf343daa5 100644
--- a/scene/gui/item_list.h
+++ b/scene/gui/item_list.h
@@ -171,7 +171,7 @@ public:
void set_same_column_width(bool p_enable);
int is_same_column_width() const;
- void set_max_text_lines(int p_amount);
+ void set_max_text_lines(int p_lines);
int get_max_text_lines() const;
void set_max_columns(int p_amount);
diff --git a/scene/gui/line_edit.h b/scene/gui/line_edit.h
index 73c5a46937..fb0eaa9446 100644
--- a/scene/gui/line_edit.h
+++ b/scene/gui/line_edit.h
@@ -177,7 +177,7 @@ public:
virtual Size2 get_minimum_size() const;
- void set_expand_to_text_length(bool p_len);
+ void set_expand_to_text_length(bool p_enabled);
bool get_expand_to_text_length() const;
virtual bool is_text_field() const;
diff --git a/scene/gui/option_button.cpp b/scene/gui/option_button.cpp
index 25ac8d5259..00df266a09 100644
--- a/scene/gui/option_button.cpp
+++ b/scene/gui/option_button.cpp
@@ -185,21 +185,21 @@ void OptionButton::clear() {
current = -1;
}
-void OptionButton::_select(int p_idx, bool p_emit) {
+void OptionButton::_select(int p_which, bool p_emit) {
- if (p_idx < 0)
+ if (p_which < 0)
return;
- if (p_idx == current)
+ if (p_which == current)
return;
- ERR_FAIL_INDEX(p_idx, popup->get_item_count());
+ ERR_FAIL_INDEX(p_which, popup->get_item_count());
for (int i = 0; i < popup->get_item_count(); i++) {
- popup->set_item_checked(i, i == p_idx);
+ popup->set_item_checked(i, i == p_which);
}
- current = p_idx;
+ current = p_which;
set_text(popup->get_item_text(current));
set_icon(popup->get_item_icon(current));
diff --git a/scene/gui/patch_9_rect.h b/scene/gui/patch_9_rect.h
index 602a6d22bf..636b9127e7 100644
--- a/scene/gui/patch_9_rect.h
+++ b/scene/gui/patch_9_rect.h
@@ -67,7 +67,7 @@ public:
void set_region_rect(const Rect2 &p_region_rect);
Rect2 get_region_rect() const;
- void set_draw_center(bool p_enable);
+ void set_draw_center(bool p_draw);
bool get_draw_center() const;
void set_h_axis_stretch_mode(AxisStretchMode p_mode);
diff --git a/scene/gui/popup.cpp b/scene/gui/popup.cpp
index bdd0e8e597..f2ba6bfbc4 100644
--- a/scene/gui/popup.cpp
+++ b/scene/gui/popup.cpp
@@ -203,15 +203,15 @@ void Popup::popup_centered_ratio(float p_screen_ratio) {
popped_up = true;
}
-void Popup::popup(const Rect2 &bounds) {
+void Popup::popup(const Rect2 &p_bounds) {
emit_signal("about_to_show");
show_modal(exclusive);
// Fit the popup into the optionally provided bounds.
- if (!bounds.has_no_area()) {
- set_position(bounds.position);
- set_size(bounds.size);
+ if (!p_bounds.has_no_area()) {
+ set_position(p_bounds.position);
+ set_size(p_bounds.size);
}
_fix_size();
diff --git a/scene/gui/popup_menu.h b/scene/gui/popup_menu.h
index cbfe7873e6..37714ee989 100644
--- a/scene/gui/popup_menu.h
+++ b/scene/gui/popup_menu.h
@@ -140,7 +140,7 @@ public:
uint32_t get_item_accelerator(int p_idx) const;
Variant get_item_metadata(int p_idx) const;
bool is_item_disabled(int p_idx) const;
- String get_item_submenu(int p_ID) const;
+ String get_item_submenu(int p_idx) const;
bool is_item_separator(int p_idx) const;
bool is_item_checkable(int p_idx) const;
String get_item_tooltip(int p_idx) const;
diff --git a/scene/gui/rich_text_label.h b/scene/gui/rich_text_label.h
index 409a8f6b3f..71fa766958 100644
--- a/scene/gui/rich_text_label.h
+++ b/scene/gui/rich_text_label.h
@@ -296,7 +296,7 @@ public:
void push_align(Align p_align);
void push_indent(int p_level);
void push_list(ListType p_list);
- void push_meta(const Variant &p_data);
+ void push_meta(const Variant &p_meta);
void push_table(int p_columns);
void set_table_column_expand(int p_column, bool p_expand, int p_ratio = 1);
int get_current_table_column() const;
diff --git a/scene/gui/tab_container.cpp b/scene/gui/tab_container.cpp
index 61a409d43e..1352569f33 100644
--- a/scene/gui/tab_container.cpp
+++ b/scene/gui/tab_container.cpp
@@ -548,11 +548,11 @@ Ref<Texture> TabContainer::get_tab_icon(int p_tab) const {
return Ref<Texture>();
}
-void TabContainer::set_tab_disabled(int p_tab, bool p_enabled) {
+void TabContainer::set_tab_disabled(int p_tab, bool p_disabled) {
Control *child = _get_tab(p_tab);
ERR_FAIL_COND(!child);
- child->set_meta("_tab_disabled", p_enabled);
+ child->set_meta("_tab_disabled", p_disabled);
update();
}
diff --git a/scene/gui/tab_container.h b/scene/gui/tab_container.h
index 1105c6b298..3e1a2c1598 100644
--- a/scene/gui/tab_container.h
+++ b/scene/gui/tab_container.h
@@ -54,7 +54,7 @@ private:
bool tabs_visible;
bool buttons_visible_cache;
TabAlign align;
- Control *_get_tab(int idx) const;
+ Control *_get_tab(int p_idx) const;
int _get_top_margin() const;
Popup *popup;
diff --git a/scene/gui/text_edit.cpp b/scene/gui/text_edit.cpp
index 7b0d14c1a9..2b47539c42 100644
--- a/scene/gui/text_edit.cpp
+++ b/scene/gui/text_edit.cpp
@@ -2933,7 +2933,7 @@ void TextEdit::_base_remove_text(int p_from_line, int p_from_column, int p_to_li
}
}
-void TextEdit::_insert_text(int p_line, int p_char, const String &p_text, int *r_end_line, int *r_end_column) {
+void TextEdit::_insert_text(int p_line, int p_char, const String &p_text, int *r_end_line, int *r_end_char) {
if (!setting_text)
idle_detect->start();
@@ -2946,8 +2946,8 @@ void TextEdit::_insert_text(int p_line, int p_char, const String &p_text, int *r
_base_insert_text(p_line, p_char, p_text, retline, retchar);
if (r_end_line)
*r_end_line = retline;
- if (r_end_column)
- *r_end_column = retchar;
+ if (r_end_char)
+ *r_end_char = retchar;
if (!undo_enabled)
return;
diff --git a/scene/gui/text_edit.h b/scene/gui/text_edit.h
index afb4b1c547..4c17347a5d 100644
--- a/scene/gui/text_edit.h
+++ b/scene/gui/text_edit.h
@@ -152,7 +152,7 @@ class TextEdit : public Control {
int get_line_width(int p_line) const;
int get_max_width() const;
const Map<int, ColorRegionInfo> &get_color_region_info(int p_line);
- void set(int p_line, const String &p_string);
+ void set(int p_line, const String &p_text);
void set_marked(int p_line, bool p_marked) { text[p_line].marked = p_marked; }
bool is_marked(int p_line) const { return text[p_line].marked; }
void set_breakpoint(int p_line, bool p_breakpoint) { text[p_line].breakpoint = p_breakpoint; }
@@ -288,8 +288,8 @@ class TextEdit : public Control {
int get_char_count();
- int get_char_pos_for(int p_px, String p_pos) const;
- int get_column_x_offset(int p_column, String p_pos);
+ int get_char_pos_for(int p_px, String p_str) const;
+ int get_column_x_offset(int p_char, String p_str);
void adjust_viewport_to_cursor();
void _scroll_moved(double);
@@ -320,7 +320,7 @@ class TextEdit : public Control {
/* super internal api, undo/redo builds on it */
- void _base_insert_text(int p_line, int p_column, const String &p_text, int &r_end_line, int &r_end_column);
+ void _base_insert_text(int p_line, int p_char, const String &p_text, int &r_end_line, int &r_end_column);
String _base_get_text(int p_from_line, int p_from_column, int p_to_line, int p_to_column) const;
void _base_remove_text(int p_from_line, int p_from_column, int p_to_line, int p_to_column);
@@ -339,10 +339,10 @@ class TextEdit : public Control {
protected:
virtual String get_tooltip(const Point2 &p_pos) const;
- void _insert_text(int p_line, int p_column, const String &p_text, int *r_end_line = NULL, int *r_end_char = NULL);
+ void _insert_text(int p_line, int p_char, const String &p_text, int *r_end_line = NULL, int *r_end_char = NULL);
void _remove_text(int p_from_line, int p_from_column, int p_to_line, int p_to_column);
void _insert_text_at_cursor(const String &p_text);
- void _gui_input(const Ref<InputEvent> &p_input);
+ void _gui_input(const Ref<InputEvent> &p_gui_input);
void _notification(int p_what);
void _consume_pair_symbol(CharType ch);
diff --git a/scene/gui/texture_button.cpp b/scene/gui/texture_button.cpp
index 00849c4e5a..7abf8380ce 100644
--- a/scene/gui/texture_button.cpp
+++ b/scene/gui/texture_button.cpp
@@ -286,8 +286,8 @@ void TextureButton::set_expand(bool p_expand) {
update();
}
-void TextureButton::set_stretch_mode(StretchMode p_mode) {
- stretch_mode = p_mode;
+void TextureButton::set_stretch_mode(StretchMode p_stretch_mode) {
+ stretch_mode = p_stretch_mode;
update();
}
diff --git a/scene/gui/texture_button.h b/scene/gui/texture_button.h
index 9c31912a32..8df30cd35a 100644
--- a/scene/gui/texture_button.h
+++ b/scene/gui/texture_button.h
@@ -69,7 +69,7 @@ public:
void set_hover_texture(const Ref<Texture> &p_hover);
void set_disabled_texture(const Ref<Texture> &p_disabled);
void set_focused_texture(const Ref<Texture> &p_focused);
- void set_click_mask(const Ref<BitMap> &p_image);
+ void set_click_mask(const Ref<BitMap> &p_click_mask);
Ref<Texture> get_normal_texture() const;
Ref<Texture> get_pressed_texture() const;
@@ -81,7 +81,7 @@ public:
bool get_expand() const;
void set_expand(bool p_expand);
- void set_stretch_mode(StretchMode stretch_mode);
+ void set_stretch_mode(StretchMode p_stretch_mode);
StretchMode get_stretch_mode() const;
TextureButton();
diff --git a/scene/gui/tree.h b/scene/gui/tree.h
index d3715c3c43..81880122a9 100644
--- a/scene/gui/tree.h
+++ b/scene/gui/tree.h
@@ -471,7 +471,7 @@ private:
TreeItem *_search_item_text(TreeItem *p_at, const String &p_find, int *r_col, bool p_selectable, bool p_backwards = false);
- TreeItem *_find_item_at_pos(TreeItem *p_current, const Point2 &p_pos, int &r_column, int &h, int &section) const;
+ TreeItem *_find_item_at_pos(TreeItem *p_item, const Point2 &p_pos, int &r_column, int &h, int &section) const;
/* float drag_speed;
float drag_accum;
@@ -524,7 +524,7 @@ public:
void set_column_expand(int p_column, bool p_expand);
int get_column_width(int p_column) const;
- void set_hide_root(bool p_eanbled);
+ void set_hide_root(bool p_enabled);
TreeItem *get_next_selected(TreeItem *p_item);
TreeItem *get_selected() const;
int get_selected_column() const;
diff --git a/scene/gui/video_player.h b/scene/gui/video_player.h
index 1d70718a6a..87c452509b 100644
--- a/scene/gui/video_player.h
+++ b/scene/gui/video_player.h
@@ -105,7 +105,7 @@ public:
String get_stream_name() const;
float get_stream_pos() const;
- void set_autoplay(bool p_vol);
+ void set_autoplay(bool p_enable);
bool has_autoplay() const;
void set_audio_track(int p_track);