summaryrefslogtreecommitdiff
path: root/demos/misc/window_management/control.gd
diff options
context:
space:
mode:
authorhurikhan <m4r10.5ch14ck@gmail.com>2015-01-15 22:50:23 +0900
committerhurikhan <m4r10.5ch14ck@gmail.com>2015-01-15 22:50:23 +0900
commitd269344bbd19d9653fff3c2a230261b8fa00d7f6 (patch)
treeb15fb40ac8e7a85de8fd03902cd084de8e27a764 /demos/misc/window_management/control.gd
parent07b8d9136a6ccea1587d27ca30db1ec10aca0ed1 (diff)
WIP -- set_resizable() + is_resizable added
Diffstat (limited to 'demos/misc/window_management/control.gd')
-rw-r--r--demos/misc/window_management/control.gd28
1 files changed, 26 insertions, 2 deletions
diff --git a/demos/misc/window_management/control.gd b/demos/misc/window_management/control.gd
index ce17db6b00..c867bd21db 100644
--- a/demos/misc/window_management/control.gd
+++ b/demos/misc/window_management/control.gd
@@ -2,10 +2,18 @@
extends Control
func _fixed_process(delta):
+
+ var modetext = "Mode:\n"
+
if(OS.is_fullscreen()):
- get_node("Label_Fullscreen").set_text("Mode:\nFullscreen")
+ modetext += "Fullscreen\n"
else:
- get_node("Label_Fullscreen").set_text("Mode:\nWindowed")
+ modetext += "Windowed\n"
+
+ if(!OS.is_resizable()):
+ modetext += "FixedSize\n"
+
+ get_node("Label_Mode").set_text(modetext)
get_node("Label_Position").set_text( str("Position:\n", OS.get_window_position() ) )
@@ -19,6 +27,7 @@ func _fixed_process(delta):
get_node("Label_Screen0_Position").set_text(str("Screen0 Position:\n",OS.get_screen_position()))
+
if(OS.get_screen_count() > 1):
get_node("Button_Screen1").show()
get_node("Label_Screen1_Resolution").show()
@@ -42,6 +51,9 @@ func _fixed_process(delta):
if( Input.is_action_pressed("ui_down")):
OS.set_fullscreen(false)
+ get_node("Button_FixedSize").set_pressed( !OS.is_resizable() )
+
+
func _ready():
set_fixed_process(true)
@@ -67,3 +79,15 @@ func _on_Button_Screen0_pressed():
func _on_Button_Screen1_pressed():
OS.set_screen(1)
+
+
+
+
+
+func _on_Button_FixedSize_pressed():
+ if(OS.is_resizable()):
+ OS.set_resizable(false)
+ else:
+ OS.set_resizable(true)
+
+