WIP -- set_resizable() + is_resizable added

This commit is contained in:
hurikhan
2015-01-15 22:50:23 +09:00
parent 07b8d9136a
commit d269344bbd
7 changed files with 91 additions and 18 deletions

View File

@ -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)