extends Container signal return_pressed signal font_changed( value ) func _ready(): $Menus/TabContainer/Display/ScrollContainer/VBoxContainer/Fullscreen/CheckBox.pressed = ProjectSettings.get_setting( "display/window/size/fullscreen" ) $Menus/TabContainer/Display/ScrollContainer/VBoxContainer/Borderless/CheckBox.pressed = ProjectSettings.get_setting( "display/window/size/borderless" ) $Menus/TabContainer/Display/ScrollContainer/VBoxContainer/Resizable/CheckBox.pressed = ProjectSettings.get_setting( "display/window/size/resizable" ) $Menus/TabContainer/Display/ScrollContainer/VBoxContainer/CurrentScreen/SpinBox.value = OS.current_screen $Menus/TabContainer/Test/ScrollContainer/VBoxContainer/font_size/font_size_value.text = str( $Menus/TabContainer/Test/ScrollContainer/VBoxContainer/font_size_bar.value ) func _on_font_size_bar_value_changed(value): $Menus/TabContainer/Test/ScrollContainer/VBoxContainer/font_size/font_size_value.text = str( value ) $Menus.get_theme().default_font.size = value emit_signal( "font_changed", value ) func _on_ReturnButton_pressed(): emit_signal( "return_pressed" ) func _on_Title_text_changed(new_text): # ---------------------------------- # Changing windows title var new_title = "Khanat" new_text = new_text.strip_edges() if not new_text == "": new_title = new_text new_title += " (" + String(OS.get_window_size().x) + "x" + String(OS.get_window_size().y) + ")" OS.set_window_title( new_title ) # ---------------------------------- func _on_Fullscreen_toggled(button_pressed): if ProjectSettings.has_setting( "display/window/size/fullscreen" ): ProjectSettings.set_setting("display/window/size/fullscreen", button_pressed) OS.window_fullscreen = ProjectSettings.get_setting("display/window/size/fullscreen") func _on_Borderless_toggled(button_pressed): if ProjectSettings.has_setting( "display/window/size/borderless" ): ProjectSettings.set_setting("display/window/size/borderless", button_pressed) OS.window_borderless = ProjectSettings.get_setting("display/window/size/borderless") func _on_Resizable_toggled(button_pressed): if ProjectSettings.has_setting( "display/window/size/resizable" ): ProjectSettings.set_setting("display/window/size/resizable", button_pressed) OS.window_resizable = ProjectSettings.get_setting("display/window/size/resizable") # La fonction existe dans la doc mais le moteur lui ne la reconnait pas, # soit il y a une subtilité quelquepart soit la doc n'est pas à jour. func _on_AlwaysOnTop_toggled(button_pressed): # OS.set_window_always_on_top( button_pressed ) pass func _on_SpinBox_value_changed(value): OS.current_screen = value