summaryrefslogtreecommitdiffstats
path: root/scene/gui/control.cpp
diff options
context:
space:
mode:
authorJuan Linietsky <reduzio@gmail.com>2019-06-11 15:43:37 -0300
committerJuan Linietsky <reduzio@gmail.com>2020-02-11 11:53:26 +0100
commit3f335ce3d446372eeb9ed87f7e117099c4d2dd6a (patch)
tree669db7ddb21f328215a9c26e9bdaf2565db8c853 /scene/gui/control.cpp
parent9ffe57a10eecf79ab8df2f0497d0387383755df3 (diff)
downloadredot-engine-3f335ce3d446372eeb9ed87f7e117099c4d2dd6a.tar.gz
Texture refactor
-Texture renamed to Texture2D -TextureLayered as base now inherits 2Darray, cubemap and cubemap array -Removed all references to flags in textures (they will go in the shader) -Texture3D gone for now (will come back later done properly) -Create base rasterizer for RenderDevice, RasterizerRD
Diffstat (limited to 'scene/gui/control.cpp')
-rw-r--r--scene/gui/control.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/scene/gui/control.cpp b/scene/gui/control.cpp
index 4c70bd1d39..be211504a6 100644
--- a/scene/gui/control.cpp
+++ b/scene/gui/control.cpp
@@ -358,7 +358,7 @@ void Control::_get_property_list(List<PropertyInfo> *p_list) const {
if (data.icon_override.has(E->get()))
hint |= PROPERTY_USAGE_STORAGE | PROPERTY_USAGE_CHECKED;
- p_list->push_back(PropertyInfo(Variant::OBJECT, "custom_icons/" + E->get(), PROPERTY_HINT_RESOURCE_TYPE, "Texture", hint));
+ p_list->push_back(PropertyInfo(Variant::OBJECT, "custom_icons/" + E->get(), PROPERTY_HINT_RESOURCE_TYPE, "Texture2D", hint));
}
}
{
@@ -813,11 +813,11 @@ Size2 Control::get_minimum_size() const {
return Size2();
}
-Ref<Texture> Control::get_icon(const StringName &p_name, const StringName &p_type) const {
+Ref<Texture2D> Control::get_icon(const StringName &p_name, const StringName &p_type) const {
if (p_type == StringName() || p_type == get_class_name()) {
- const Ref<Texture> *tex = data.icon_override.getptr(p_name);
+ const Ref<Texture2D> *tex = data.icon_override.getptr(p_name);
if (tex)
return *tex;
}
@@ -1063,7 +1063,7 @@ int Control::get_constant(const StringName &p_name, const StringName &p_type) co
bool Control::has_icon_override(const StringName &p_name) const {
- const Ref<Texture> *tex = data.icon_override.getptr(p_name);
+ const Ref<Texture2D> *tex = data.icon_override.getptr(p_name);
return tex != NULL;
}
@@ -1880,7 +1880,7 @@ Rect2 Control::get_anchorable_rect() const {
return Rect2(Point2(), get_size());
}
-void Control::add_icon_override(const StringName &p_name, const Ref<Texture> &p_icon) {
+void Control::add_icon_override(const StringName &p_name, const Ref<Texture2D> &p_icon) {
if (data.icon_override.has(p_name)) {
data.icon_override[p_name]->disconnect("changed", this, "_override_changed");