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
|
@ -1,38 +0,0 @@
|
|||
extends Panel
|
||||
|
||||
@export var thisTab = 0
|
||||
|
||||
func _ready() -> void:
|
||||
$AAOption.selected = get_viewport().msaa_3d
|
||||
$SSAAOption.selected = get_viewport().screen_space_aa
|
||||
$FOVSlider.value = Globalvariables.FOV
|
||||
$FOVSlider/CurrentLabel.text = str(int(Globalvariables.FOV))
|
||||
|
||||
func _on_tab_bar_tab_changed(tab: int) -> void:
|
||||
if (thisTab == tab):
|
||||
self.show()
|
||||
else:
|
||||
self.hide()
|
||||
|
||||
func updateconfig():
|
||||
Globalvariables.updateConfig()
|
||||
|
||||
func _on_fov_slider_value_changed(value: float) -> void:
|
||||
Globalvariables.FOV = value
|
||||
$FOVSlider/CurrentLabel.text = str(int(value))
|
||||
|
||||
|
||||
func _on_option_aa_ss_item_selected(index: int) -> void:
|
||||
get_viewport().screen_space_aa = int(index == 1) as Viewport.ScreenSpaceAA
|
||||
|
||||
|
||||
func _on_option_aa_msaa_item_selected(index: int) -> void:
|
||||
if index == 0: # Disabled
|
||||
get_viewport().msaa_3d = Viewport.MSAA_DISABLED
|
||||
elif index == 1: # 2×
|
||||
get_viewport().msaa_3d = Viewport.MSAA_2X
|
||||
elif index == 2: # 4×
|
||||
get_viewport().msaa_3d = Viewport.MSAA_4X
|
||||
elif index == 3: # 8×
|
||||
get_viewport().msaa_3d = Viewport.MSAA_8X
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue