diff options
author | Juan Linietsky <reduzio@gmail.com> | 2015-06-08 10:36:11 -0300 |
---|---|---|
committer | Juan Linietsky <reduzio@gmail.com> | 2015-06-08 10:36:27 -0300 |
commit | c76900beb8d1cbb9a648238b2f73fb5b3da4367b (patch) | |
tree | f74216fa44496ccad4bc8c35ee8b390437eb4ed3 | |
parent | 7590f3db21f486988d8d59c4e6151344e3d40961 (diff) |
draw button focus before text and icon
closes #2047
-rw-r--r-- | .gitignore | 2 | ||||
-rw-r--r-- | platform/windows/detect.py | 6 | ||||
-rw-r--r-- | scene/gui/button.cpp | 11 |
3 files changed, 14 insertions, 5 deletions
diff --git a/.gitignore b/.gitignore index a5b45a1ae1..fbb3ba6cb4 100644 --- a/.gitignore +++ b/.gitignore @@ -280,4 +280,4 @@ cscope.files cscope.out cscope.in.out cscope.po.out -godot.creator.user.wd3476 +godot.creator.* diff --git a/platform/windows/detect.py b/platform/windows/detect.py index 298fa3bc78..0fe4f9f3b5 100644 --- a/platform/windows/detect.py +++ b/platform/windows/detect.py @@ -201,6 +201,12 @@ def configure(env): env.Append(CCFLAGS=['/O2','/DDEBUG_ENABLED'])
env.Append(LINKFLAGS=['/SUBSYSTEM:CONSOLE'])
+ elif (env["target"]=="debug_release"):
+
+ env.Append(CCFLAGS=['/Zi','/Od'])
+ env.Append(LINKFLAGS=['/DEBUG'])
+ env.Append(LINKFLAGS=['/SUBSYSTEM:WINDOWS'])
+ env.Append(LINKFLAGS=['/ENTRY:mainCRTStartup'])
elif (env["target"]=="debug"):
diff --git a/scene/gui/button.cpp b/scene/gui/button.cpp index 5b837d699c..b465db5c80 100644 --- a/scene/gui/button.cpp +++ b/scene/gui/button.cpp @@ -97,6 +97,13 @@ void Button::_notification(int p_what) { } break; } + + if (has_focus()) { + + Ref<StyleBox> style = get_stylebox("focus"); + style->draw(ci,Rect2(Point2(),size)); + } + Ref<StyleBox> style = get_stylebox("normal" ); Ref<Font> font=get_font("font"); Ref<Texture> _icon; @@ -134,11 +141,7 @@ void Button::_notification(int p_what) { _icon->draw(ci,Point2(style->get_offset().x, Math::floor( (size.height-_icon->get_height())/2.0 ) ),is_disabled()?Color(1,1,1,0.4):Color(1,1,1) ); } - if (has_focus()) { - Ref<StyleBox> style = get_stylebox("focus"); - style->draw(ci,Rect2(Point2(),size)); - } } } |