2021-11-14 19:43:53 +00:00
|
|
|
extends MarginContainer
|
|
|
|
|
2022-01-23 19:46:53 +00:00
|
|
|
|
|
|
|
onready var currentSelection_Start = get_node("HBoxContainer/VBoxContainer/MenuOptions/StartGame")
|
|
|
|
onready var currentSelection_DieTest = get_node("HBoxContainer/VBoxContainer/MenuOptions/DieTest")
|
|
|
|
onready var currentSelection_LoadGame = get_node("HBoxContainer/VBoxContainer/MenuOptions/LoadGame")
|
|
|
|
onready var currentSelection_HostAndJoinGame = get_node("HBoxContainer/VBoxContainer/MenuOptions/HostAndJoinGame")
|
|
|
|
onready var currentSelection_PlayerSettings = get_node("HBoxContainer/VBoxContainer/MenuOptions/PlayerSettings")
|
2022-01-16 20:00:25 +00:00
|
|
|
|
|
|
|
var currentSelectionIndex = 0;
|
2022-01-23 19:46:53 +00:00
|
|
|
var currentIndexObject = currentSelection_Start;
|
2022-01-16 20:00:25 +00:00
|
|
|
|
2021-11-14 19:43:53 +00:00
|
|
|
func _ready():
|
2022-01-23 19:46:53 +00:00
|
|
|
SetMenuSelections(currentSelectionIndex)
|
2022-01-16 20:00:25 +00:00
|
|
|
|
|
|
|
func _process(delta):
|
|
|
|
if Input.is_action_just_pressed("ui_down"):
|
|
|
|
currentSelectionIndex +=1;
|
|
|
|
if(currentSelectionIndex == 5):
|
|
|
|
currentSelectionIndex = 0
|
|
|
|
SetMenuSelections(currentSelectionIndex)
|
2022-01-23 19:46:53 +00:00
|
|
|
|
2022-01-16 20:00:25 +00:00
|
|
|
|
|
|
|
func SetMenuSelections(CurrentSelection):
|
2022-01-23 19:46:53 +00:00
|
|
|
currentSelection_Start.set_uppercase(false)
|
|
|
|
currentSelection_DieTest.set_uppercase(false)
|
|
|
|
currentSelection_LoadGame.set_uppercase(false)
|
|
|
|
currentSelection_HostAndJoinGame.set_uppercase(false)
|
|
|
|
currentSelection_PlayerSettings.set_uppercase(false)
|
2022-01-16 20:00:25 +00:00
|
|
|
|
|
|
|
var index = CurrentSelection
|
|
|
|
|
|
|
|
match index:
|
|
|
|
0:
|
2022-01-23 19:46:53 +00:00
|
|
|
currentSelection_PlayerSettings.set("custom_colors/default_color", Color(1,1,1,1))
|
|
|
|
currentSelection_Start.set_uppercase(true)
|
2022-01-29 04:00:12 +00:00
|
|
|
get_node("HBoxContainer/VBoxContainer/MenuOptions/StartGame").set("custom_colors/default_color", Color(0,0,0,1))
|
2022-01-16 20:00:25 +00:00
|
|
|
1:
|
2022-01-23 19:46:53 +00:00
|
|
|
currentSelection_Start.set("custom_colors/default_color", Color(1,1,1,1))
|
|
|
|
currentSelection_DieTest.set_uppercase(true)
|
|
|
|
currentSelection_DieTest.set("custom_colors/default_color", Color(0,0,0,1))
|
|
|
|
|
|
|
|
2:
|
|
|
|
currentSelection_DieTest.set("custom_colors/default_color", Color(1,1,1,1))
|
|
|
|
currentSelection_LoadGame.set_uppercase(true)
|
|
|
|
currentSelection_LoadGame.set("custom_colors/default_color", Color(0,0,0,1))
|
2022-01-16 20:00:25 +00:00
|
|
|
3:
|
2022-01-23 19:46:53 +00:00
|
|
|
currentSelection_LoadGame.set("custom_colors/default_color", Color(1,1,1,1))
|
|
|
|
currentSelection_HostAndJoinGame.set_uppercase(true)
|
|
|
|
currentSelection_HostAndJoinGame.set("custom_colors/default_color", Color(0,0,0,1))
|
2022-01-16 20:00:25 +00:00
|
|
|
4:
|
2022-01-23 19:46:53 +00:00
|
|
|
currentSelection_HostAndJoinGame.set("custom_colors/default_color", Color(1,1,1,1))
|
|
|
|
currentSelection_PlayerSettings.set_uppercase(true)
|
|
|
|
currentSelection_PlayerSettings.set("custom_colors/default_color", Color(0,0,0,1))
|