summaryrefslogtreecommitdiffstats
path: root/scene/gui/texture_button.cpp
diff options
context:
space:
mode:
authorJuan Linietsky <reduzio@gmail.com>2017-01-14 11:07:57 -0300
committerJuan Linietsky <reduzio@gmail.com>2017-01-14 11:10:42 -0300
commitdcb95ec1473eff3f455909cd81c3cd50b1e1159b (patch)
tree60343275911d48ebf993041dec92e1eac112b746 /scene/gui/texture_button.cpp
parent93ab45b6b5c4f8e0619e963156c983009d399a9d (diff)
downloadredot-engine-dcb95ec1473eff3f455909cd81c3cd50b1e1159b.tar.gz
removed duplicated functions in class hierarchy that were bound more than once
added a check to detect this case in the future
Diffstat (limited to 'scene/gui/texture_button.cpp')
-rw-r--r--scene/gui/texture_button.cpp18
1 files changed, 3 insertions, 15 deletions
diff --git a/scene/gui/texture_button.cpp b/scene/gui/texture_button.cpp
index 83cd853572..03e37e9d9f 100644
--- a/scene/gui/texture_button.cpp
+++ b/scene/gui/texture_button.cpp
@@ -120,13 +120,13 @@ void TextureButton::_notification(int p_what) {
if (texdraw.is_valid()) {
Rect2 drect(Point2(),texdraw->get_size()*scale);
- draw_texture_rect(texdraw,drect,false,modulate);
+ draw_texture_rect(texdraw,drect,false);
}
if (has_focus() && focused.is_valid()) {
Rect2 drect(Point2(),focused->get_size()*scale);
- draw_texture_rect(focused,drect,false,modulate);
+ draw_texture_rect(focused,drect,false);
};
@@ -143,7 +143,6 @@ void TextureButton::_bind_methods() {
ClassDB::bind_method(_MD("set_focused_texture","texture:Texture"),&TextureButton::set_focused_texture);
ClassDB::bind_method(_MD("set_click_mask","mask:BitMap"),&TextureButton::set_click_mask);
ClassDB::bind_method(_MD("set_texture_scale","scale"),&TextureButton::set_texture_scale);
- ClassDB::bind_method(_MD("set_modulate","color"),&TextureButton::set_modulate);
ClassDB::bind_method(_MD("get_normal_texture:Texture"),&TextureButton::get_normal_texture);
ClassDB::bind_method(_MD("get_pressed_texture:Texture"),&TextureButton::get_pressed_texture);
@@ -152,7 +151,6 @@ void TextureButton::_bind_methods() {
ClassDB::bind_method(_MD("get_focused_texture:Texture"),&TextureButton::get_focused_texture);
ClassDB::bind_method(_MD("get_click_mask:BitMap"),&TextureButton::get_click_mask);
ClassDB::bind_method(_MD("get_texture_scale"),&TextureButton::get_texture_scale);
- ClassDB::bind_method(_MD("get_modulate"),&TextureButton::get_modulate);
ADD_GROUP("Textures","texture_");
ADD_PROPERTYNZ(PropertyInfo(Variant::OBJECT,"texture_normal",PROPERTY_HINT_RESOURCE_TYPE,"Texture"), _SCS("set_normal_texture"), _SCS("get_normal_texture"));
@@ -241,17 +239,7 @@ Size2 TextureButton::get_texture_scale() const{
return scale;
}
-void TextureButton::set_modulate(const Color& p_modulate) {
- modulate=p_modulate;
- update();
-}
-
-Color TextureButton::get_modulate() const {
- return modulate;
-}
-
-
TextureButton::TextureButton() {
scale=Size2(1.0, 1.0);
- modulate=Color(1,1,1);
+
}