the options screen is 𝔞𝔩𝔦𝔳𝔢.

This commit is contained in:
Haze Weathers 2023-03-08 04:01:48 -05:00
parent 99fd0f6473
commit 89b4bc045e
12 changed files with 327 additions and 120 deletions

View file

@ -0,0 +1,27 @@
extends Control
export (StyleBox) var tab_selected_style
onready var tabs = $Tabs
func focus():
visible = true
grab_focus()
func _gui_input(event):
if event.is_action_pressed("ui_left"):
tabs.current_tab = posmod(tabs.current_tab - 1, tabs.get_child_count())
elif event.is_action_pressed("ui_right"):
tabs.current_tab = posmod(tabs.current_tab + 1, tabs.get_child_count())
elif event.is_action_pressed("ui_down"):
var current_tab = tabs.get_current_tab_control()
current_tab.get_node(current_tab.focus_neighbour_bottom).grab_focus()
accept_event()
func _on_tabs_focus_entered():
tabs.set("custom_styles/tab_fg", tab_selected_style)
func _on_tabs_focus_exited():
tabs.set("custom_styles/tab_fg", null)