aboutsummaryrefslogtreecommitdiff
path: root/game/src/OptionMenu/MonitorDisplaySelector.gd
diff options
context:
space:
mode:
Diffstat (limited to 'game/src/OptionMenu/MonitorDisplaySelector.gd')
-rw-r--r--game/src/OptionMenu/MonitorDisplaySelector.gd6
1 files changed, 2 insertions, 4 deletions
diff --git a/game/src/OptionMenu/MonitorDisplaySelector.gd b/game/src/OptionMenu/MonitorDisplaySelector.gd
index 600b296..f2f0dc8 100644
--- a/game/src/OptionMenu/MonitorDisplaySelector.gd
+++ b/game/src/OptionMenu/MonitorDisplaySelector.gd
@@ -1,16 +1,14 @@
extends SettingOptionButton
-
-func _ready():
+func _setup_button():
clear()
for screen_index in range(DisplayServer.get_screen_count()):
add_item("Monitor %d" % (screen_index + 1))
+ default_selected = get_viewport().get_window().current_screen
func _on_item_selected(index):
- print("Selected index: %d" % index)
var window := get_viewport().get_window()
var mode := window.mode
window.mode = Window.MODE_WINDOWED
get_viewport().get_window().set_current_screen(index)
window.mode = mode
- print(get_viewport().get_window().current_screen)