summaryrefslogtreecommitdiff
path: root/editor/editor_properties.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'editor/editor_properties.cpp')
-rw-r--r--editor/editor_properties.cpp36
1 files changed, 18 insertions, 18 deletions
diff --git a/editor/editor_properties.cpp b/editor/editor_properties.cpp
index c134786b89..905e928c5a 100644
--- a/editor/editor_properties.cpp
+++ b/editor/editor_properties.cpp
@@ -135,7 +135,7 @@ void EditorPropertyMultilineText::_notification(int p_what) {
switch (p_what) {
case NOTIFICATION_THEME_CHANGED:
case NOTIFICATION_ENTER_TREE: {
- Ref<Texture> df = get_icon("DistractionFree", "EditorIcons");
+ Ref<Texture2D> df = get_icon("DistractionFree", "EditorIcons");
open_big_text->set_icon(df);
Ref<Font> font = get_font("font", "Label");
text->set_custom_minimum_size(Vector2(0, font->get_height() * 6));
@@ -388,13 +388,13 @@ void EditorPropertyMember::_property_select() {
} else if (hint == MEMBER_METHOD_OF_INSTANCE) {
- Object *instance = ObjectDB::get_instance(hint_text.to_int64());
+ Object *instance = ObjectDB::get_instance(ObjectID(hint_text.to_int64()));
if (instance)
selector->select_method_from_instance(instance, current);
} else if (hint == MEMBER_METHOD_OF_SCRIPT) {
- Object *obj = ObjectDB::get_instance(hint_text.to_int64());
+ Object *obj = ObjectDB::get_instance(ObjectID(hint_text.to_int64()));
if (Object::cast_to<Script>(obj)) {
selector->select_method_from_script(Object::cast_to<Script>(obj), current);
}
@@ -420,13 +420,13 @@ void EditorPropertyMember::_property_select() {
} else if (hint == MEMBER_PROPERTY_OF_INSTANCE) {
- Object *instance = ObjectDB::get_instance(hint_text.to_int64());
+ Object *instance = ObjectDB::get_instance(ObjectID(hint_text.to_int64()));
if (instance)
selector->select_property_from_instance(instance, current);
} else if (hint == MEMBER_PROPERTY_OF_SCRIPT) {
- Object *obj = ObjectDB::get_instance(hint_text.to_int64());
+ Object *obj = ObjectDB::get_instance(ObjectID(hint_text.to_int64()));
if (Object::cast_to<Script>(obj)) {
selector->select_property_from_script(Object::cast_to<Script>(obj), current);
}
@@ -858,14 +858,14 @@ void EditorPropertyObjectID::update_property() {
type = "Object";
ObjectID id = get_edited_object()->get(get_edited_property());
- if (id != 0) {
+ if (id.is_valid()) {
edit->set_text(type + " ID: " + itos(id));
edit->set_disabled(false);
edit->set_icon(EditorNode::get_singleton()->get_class_icon(type));
} else {
edit->set_text(TTR("[Empty]"));
edit->set_disabled(true);
- edit->set_icon(Ref<Texture>());
+ edit->set_icon(Ref<Texture2D>());
}
}
@@ -1019,7 +1019,7 @@ void EditorPropertyEasing::_draw_easing() {
prev = h;
}
- easing_draw->draw_multiline(lines, line_color, 1.0, true);
+ easing_draw->draw_multiline(lines, line_color, 1.0);
f->draw(ci, Point2(10, 10 + f->get_ascent()), String::num(exp, 2), font_color);
}
@@ -1983,7 +1983,7 @@ void EditorPropertyNodePath::update_property() {
assign->set_tooltip(p);
if (p == NodePath()) {
- assign->set_icon(Ref<Texture>());
+ assign->set_icon(Ref<Texture2D>());
assign->set_text(TTR("Assign..."));
assign->set_flat(false);
return;
@@ -2000,7 +2000,7 @@ void EditorPropertyNodePath::update_property() {
}
if (!base_node || !base_node->has_node(p)) {
- assign->set_icon(Ref<Texture>());
+ assign->set_icon(Ref<Texture2D>());
assign->set_text(p);
return;
}
@@ -2009,7 +2009,7 @@ void EditorPropertyNodePath::update_property() {
ERR_FAIL_COND(!target_node);
if (String(target_node->get_name()).find("@") != -1) {
- assign->set_icon(Ref<Texture>());
+ assign->set_icon(Ref<Texture2D>());
assign->set_text(p);
return;
}
@@ -2028,7 +2028,7 @@ void EditorPropertyNodePath::setup(const NodePath &p_base_hint, Vector<StringNam
void EditorPropertyNodePath::_notification(int p_what) {
if (p_what == NOTIFICATION_ENTER_TREE || p_what == NOTIFICATION_THEME_CHANGED) {
- Ref<Texture> t = get_icon("Clear", "EditorIcons");
+ Ref<Texture2D> t = get_icon("Clear", "EditorIcons");
clear->set_icon(t);
}
}
@@ -2331,7 +2331,7 @@ void EditorPropertyResource::_menu_option(int p_which) {
}
}
-void EditorPropertyResource::_resource_preview(const String &p_path, const Ref<Texture> &p_preview, const Ref<Texture> &p_small_preview, ObjectID p_obj) {
+void EditorPropertyResource::_resource_preview(const String &p_path, const Ref<Texture2D> &p_preview, const Ref<Texture2D> &p_small_preview, ObjectID p_obj) {
RES p = get_edited_object()->get(get_edited_property());
if (p.is_valid() && p->get_instance_id() == p_obj) {
@@ -2412,7 +2412,7 @@ void EditorPropertyResource::_update_menu_items() {
const String &t = F->get();
bool is_custom_resource = false;
- Ref<Texture> icon;
+ Ref<Texture2D> icon;
if (!custom_resources.empty()) {
for (int j = 0; j < custom_resources.size(); j++) {
if (custom_resources[j].name == t) {
@@ -2493,7 +2493,7 @@ void EditorPropertyResource::_update_menu_items() {
}
for (int i = 0; i < conversions.size(); i++) {
String what = conversions[i]->converts_to();
- Ref<Texture> icon;
+ Ref<Texture2D> icon;
if (has_icon(what, "EditorIcons")) {
icon = get_icon(what, "EditorIcons");
@@ -2659,9 +2659,9 @@ void EditorPropertyResource::update_property() {
}
}
- preview->set_texture(Ref<Texture>());
+ preview->set_texture(Ref<Texture2D>());
if (res == RES()) {
- assign->set_icon(Ref<Texture>());
+ assign->set_icon(Ref<Texture2D>());
assign->set_text(TTR("[empty]"));
} else {
@@ -2712,7 +2712,7 @@ void EditorPropertyResource::setup(const String &p_base_type) {
void EditorPropertyResource::_notification(int p_what) {
if (p_what == NOTIFICATION_ENTER_TREE || p_what == NOTIFICATION_THEME_CHANGED) {
- Ref<Texture> t = get_icon("select_arrow", "Tree");
+ Ref<Texture2D> t = get_icon("select_arrow", "Tree");
edit->set_icon(t);
}