PneumaticPlaything/Scripts/InterfaceOptions.gd
2025-08-14 15:18:48 -07:00

23 lines
664 B
GDScript

extends Panel
@export var thisTab = 1
func _ready() -> void:
$ScalingOption.select(GlobalVariables.scaling)
$ThemeOption.select(GlobalVariables.theme)
func _on_tab_bar_tab_changed(tab: int) -> void:
if (thisTab == tab):
visible = true
else:
visible = false
func _on_scaling_option_item_selected(index: int) -> void:
GlobalVariables.scaling = index
get_window().content_scale_mode = index as Window.ContentScaleMode
GlobalVariables.updateConfig()
func _on_theme_option_item_selected(index: int) -> void:
GlobalVariables.theme = index
get_window().set_theme(load(GlobalVariables.theme_index[GlobalVariables.theme]))
GlobalVariables.updateConfig()