summaryrefslogtreecommitdiff
path: root/scene/gui
diff options
context:
space:
mode:
Diffstat (limited to 'scene/gui')
-rw-r--r--scene/gui/button.cpp2
-rw-r--r--scene/gui/code_edit.cpp4
-rw-r--r--scene/gui/color_picker.cpp8
-rw-r--r--scene/gui/graph_node.cpp2
-rw-r--r--scene/gui/item_list.cpp4
-rw-r--r--scene/gui/link_button.cpp2
-rw-r--r--scene/gui/popup_menu.h4
-rw-r--r--scene/gui/rich_text_label.h4
-rw-r--r--scene/gui/spin_box.cpp2
-rw-r--r--scene/gui/tab_container.cpp2
-rw-r--r--scene/gui/tabs.cpp2
-rw-r--r--scene/gui/text_edit.cpp2
-rw-r--r--scene/gui/text_edit.h2
-rw-r--r--scene/gui/tree.cpp2
-rw-r--r--scene/gui/tree.h4
15 files changed, 23 insertions, 23 deletions
diff --git a/scene/gui/button.cpp b/scene/gui/button.cpp
index c0df5271b4..595d712eb8 100644
--- a/scene/gui/button.cpp
+++ b/scene/gui/button.cpp
@@ -543,7 +543,7 @@ void Button::_bind_methods() {
}
Button::Button(const String &p_text) {
- text_buf.instance();
+ text_buf.instantiate();
text_buf->set_flags(TextServer::BREAK_MANDATORY);
set_mouse_filter(MOUSE_FILTER_STOP);
diff --git a/scene/gui/code_edit.cpp b/scene/gui/code_edit.cpp
index 5b720945b8..6e6f5d9300 100644
--- a/scene/gui/code_edit.cpp
+++ b/scene/gui/code_edit.cpp
@@ -122,7 +122,7 @@ void CodeEdit::_notification(int p_what) {
ERR_CONTINUE(l < 0 || l >= code_completion_options_count);
Ref<TextLine> tl;
- tl.instance();
+ tl.instantiate();
tl->add_string(code_completion_options[l].display, cache.font, cache.font_size);
int yofs = (row_height - tl->get_size().y) / 2;
@@ -615,7 +615,7 @@ bool CodeEdit::is_line_numbers_zero_padded() const {
void CodeEdit::_line_number_draw_callback(int p_line, int p_gutter, const Rect2 &p_region) {
String fc = TS->format_number(String::num(p_line + 1).lpad(line_number_digits, line_number_padding));
Ref<TextLine> tl;
- tl.instance();
+ tl.instantiate();
tl->add_string(fc, cache.font, cache.font_size);
int yofs = p_region.position.y + (get_row_height() - tl->get_size().y) / 2;
Color number_color = get_line_gutter_item_color(p_line, line_number_gutter);
diff --git a/scene/gui/color_picker.cpp b/scene/gui/color_picker.cpp
index f394b9e3a5..049de4c8c5 100644
--- a/scene/gui/color_picker.cpp
+++ b/scene/gui/color_picker.cpp
@@ -88,7 +88,7 @@ Ref<Shader> ColorPicker::wheel_shader;
Ref<Shader> ColorPicker::circle_shader;
void ColorPicker::init_shaders() {
- wheel_shader.instance();
+ wheel_shader.instantiate();
wheel_shader->set_code(
"shader_type canvas_item;"
"void fragment() {"
@@ -107,7 +107,7 @@ void ColorPicker::init_shaders() {
" COLOR = vec4(clamp((abs(fract(((a - TAU) / TAU) + vec3(3.0, 2.0, 1.0) / 3.0) * 6.0 - 3.0) - 1.0), 0.0, 1.0), (b + b2 + b3 + b4) / 4.00);"
"}");
- circle_shader.instance();
+ circle_shader.instantiate();
circle_shader->set_code(
"shader_type canvas_item;"
"uniform float v = 1.0;"
@@ -1213,9 +1213,9 @@ ColorPicker::ColorPicker() :
wheel_edit->set_custom_minimum_size(Size2(get_theme_constant("sv_width"), get_theme_constant("sv_height")));
hb_edit->add_child(wheel_edit);
- wheel_mat.instance();
+ wheel_mat.instantiate();
wheel_mat->set_shader(wheel_shader);
- circle_mat.instance();
+ circle_mat.instantiate();
circle_mat->set_shader(circle_shader);
MarginContainer *wheel_margin(memnew(MarginContainer));
diff --git a/scene/gui/graph_node.cpp b/scene/gui/graph_node.cpp
index 77c502cf8d..93f1fe9e8e 100644
--- a/scene/gui/graph_node.cpp
+++ b/scene/gui/graph_node.cpp
@@ -1021,6 +1021,6 @@ void GraphNode::_bind_methods() {
}
GraphNode::GraphNode() {
- title_buf.instance();
+ title_buf.instantiate();
set_mouse_filter(MOUSE_FILTER_STOP);
}
diff --git a/scene/gui/item_list.cpp b/scene/gui/item_list.cpp
index 150980b2e9..b0d54bf8c9 100644
--- a/scene/gui/item_list.cpp
+++ b/scene/gui/item_list.cpp
@@ -57,7 +57,7 @@ int ItemList::add_item(const String &p_item, const Ref<Texture2D> &p_texture, bo
item.icon_region = Rect2i();
item.icon_modulate = Color(1, 1, 1, 1);
item.text = p_item;
- item.text_buf.instance();
+ item.text_buf.instantiate();
item.selectable = p_selectable;
item.selected = false;
item.disabled = false;
@@ -80,7 +80,7 @@ int ItemList::add_icon_item(const Ref<Texture2D> &p_item, bool p_selectable) {
item.icon_region = Rect2i();
item.icon_modulate = Color(1, 1, 1, 1);
//item.text=p_item;
- item.text_buf.instance();
+ item.text_buf.instantiate();
item.selectable = p_selectable;
item.selected = false;
item.disabled = false;
diff --git a/scene/gui/link_button.cpp b/scene/gui/link_button.cpp
index d45ffde715..ee0618a991 100644
--- a/scene/gui/link_button.cpp
+++ b/scene/gui/link_button.cpp
@@ -301,7 +301,7 @@ void LinkButton::_bind_methods() {
}
LinkButton::LinkButton() {
- text_buf.instance();
+ text_buf.instantiate();
set_focus_mode(FOCUS_NONE);
set_default_cursor_shape(CURSOR_POINTING_HAND);
}
diff --git a/scene/gui/popup_menu.h b/scene/gui/popup_menu.h
index e4cbe984c9..74718395d3 100644
--- a/scene/gui/popup_menu.h
+++ b/scene/gui/popup_menu.h
@@ -80,8 +80,8 @@ class PopupMenu : public Popup {
}
Item() {
- text_buf.instance();
- accel_text_buf.instance();
+ text_buf.instantiate();
+ accel_text_buf.instantiate();
checkable_type = CHECKABLE_TYPE_NONE;
}
};
diff --git a/scene/gui/rich_text_label.h b/scene/gui/rich_text_label.h
index 9cf94b0cd7..ae2a4af268 100644
--- a/scene/gui/rich_text_label.h
+++ b/scene/gui/rich_text_label.h
@@ -100,7 +100,7 @@ private:
int char_offset = 0;
int char_count = 0;
- Line() { text_buf.instance(); }
+ Line() { text_buf.instantiate(); }
};
struct Item {
@@ -313,7 +313,7 @@ private:
ItemCustomFX() {
type = ITEM_CUSTOMFX;
- char_fx_transform.instance();
+ char_fx_transform.instantiate();
}
virtual ~ItemCustomFX() {
diff --git a/scene/gui/spin_box.cpp b/scene/gui/spin_box.cpp
index 4ac73ae6b5..895f9db353 100644
--- a/scene/gui/spin_box.cpp
+++ b/scene/gui/spin_box.cpp
@@ -52,7 +52,7 @@ void SpinBox::_value_changed(double) {
void SpinBox::_text_submitted(const String &p_string) {
Ref<Expression> expr;
- expr.instance();
+ expr.instantiate();
String num = TS->parse_number(p_string);
// Ignore the prefix and suffix in the expression
diff --git a/scene/gui/tab_container.cpp b/scene/gui/tab_container.cpp
index acf0641005..133966013b 100644
--- a/scene/gui/tab_container.cpp
+++ b/scene/gui/tab_container.cpp
@@ -586,7 +586,7 @@ void TabContainer::_refresh_texts() {
Control *control = Object::cast_to<Control>(tabs[i]);
String text = control->has_meta("_tab_name") ? String(tr(String(control->get_meta("_tab_name")))) : String(tr(control->get_name()));
Ref<TextLine> name;
- name.instance();
+ name.instantiate();
name->set_direction(rtl ? TextServer::DIRECTION_RTL : TextServer::DIRECTION_LTR);
name->add_string(text, font, font_size, Dictionary(), TranslationServer::get_singleton()->get_tool_locale());
text_buf.push_back(name);
diff --git a/scene/gui/tabs.cpp b/scene/gui/tabs.cpp
index 11096e7976..6f1cff9ec8 100644
--- a/scene/gui/tabs.cpp
+++ b/scene/gui/tabs.cpp
@@ -743,7 +743,7 @@ void Tabs::add_tab(const String &p_str, const Ref<Texture2D> &p_icon) {
Tab t;
t.text = p_str;
t.xl_text = tr(p_str);
- t.text_buf.instance();
+ t.text_buf.instantiate();
t.text_buf->set_direction(is_layout_rtl() ? TextServer::DIRECTION_RTL : TextServer::DIRECTION_LTR);
t.text_buf->add_string(t.xl_text, get_theme_font("font"), get_theme_font_size("font_size"), Dictionary(), TranslationServer::get_singleton()->get_tool_locale());
t.icon = p_icon;
diff --git a/scene/gui/text_edit.cpp b/scene/gui/text_edit.cpp
index 369bc0fd26..b504da2224 100644
--- a/scene/gui/text_edit.cpp
+++ b/scene/gui/text_edit.cpp
@@ -1114,7 +1114,7 @@ void TextEdit::_notification(int p_what) {
}
Ref<TextLine> tl;
- tl.instance();
+ tl.instantiate();
tl->add_string(text, cache.font, cache.font_size);
int yofs = ofs_y + (row_height - tl->get_size().y) / 2;
diff --git a/scene/gui/text_edit.h b/scene/gui/text_edit.h
index 00a3b8c531..27577c48d8 100644
--- a/scene/gui/text_edit.h
+++ b/scene/gui/text_edit.h
@@ -96,7 +96,7 @@ private:
bool hidden = false;
Line() {
- data_buf.instance();
+ data_buf.instantiate();
}
};
diff --git a/scene/gui/tree.cpp b/scene/gui/tree.cpp
index 26d881955b..b796b494eb 100644
--- a/scene/gui/tree.cpp
+++ b/scene/gui/tree.cpp
@@ -2092,7 +2092,7 @@ void Tree::_range_click_timeout() {
click_handled = false;
Ref<InputEventMouseButton> mb;
- mb.instance();
+ mb.instantiate();
propagate_mouse_activated = false; // done from outside, so signal handler can't clear the tree in the middle of emit (which is a common case)
blocked++;
diff --git a/scene/gui/tree.h b/scene/gui/tree.h
index 0571a605a5..42dd27cb55 100644
--- a/scene/gui/tree.h
+++ b/scene/gui/tree.h
@@ -115,7 +115,7 @@ private:
Ref<Font> custom_font;
Cell() {
- text_buf.instance();
+ text_buf.instantiate();
}
Size2 get_icon_size() const;
@@ -416,7 +416,7 @@ private:
String language;
Control::TextDirection text_direction = Control::TEXT_DIRECTION_INHERITED;
ColumnInfo() {
- text_buf.instance();
+ text_buf.instantiate();
}
};