add theming support, fix ui issues, add ui scaling option
This commit is contained in:
parent
61806723ba
commit
1ced41d096
18 changed files with 259 additions and 49 deletions
23
Scripts/InterfaceOptions.gd
Normal file
23
Scripts/InterfaceOptions.gd
Normal file
|
@ -0,0 +1,23 @@
|
|||
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()
|
Loading…
Add table
Add a link
Reference in a new issue