mirror of
https://github.com/RetroDECK/RetroDECK.git
synced 2024-12-01 18:15:41 +00:00
Added Emulator Select and Pick options.
On branch feat/godot-configurator Changes to be committed: modified: tools/configurator/main.gd modified: tools/configurator/main.tscn modified: tools/configurator/res/pixel_ui_theme/RetroDECKTheme.tres
This commit is contained in:
parent
58f0d2f283
commit
84cd957aaa
|
@ -11,6 +11,8 @@ var log_results: Dictionary
|
||||||
var theme_option: OptionButton
|
var theme_option: OptionButton
|
||||||
signal signal_theme_changed
|
signal signal_theme_changed
|
||||||
var custom_theme: Theme = $".".theme
|
var custom_theme: Theme = $".".theme
|
||||||
|
var emu_select_option: OptionButton
|
||||||
|
var emu_pick_option: OptionButton
|
||||||
|
|
||||||
func _ready():
|
func _ready():
|
||||||
class_functions = ClassFunctions.new()
|
class_functions = ClassFunctions.new()
|
||||||
|
@ -28,14 +30,19 @@ func _ready():
|
||||||
func _get_nodes() -> void:
|
func _get_nodes() -> void:
|
||||||
status_code_label = get_node("%status_code_label")
|
status_code_label = get_node("%status_code_label")
|
||||||
theme_option = get_node("%theme_optionbutton")
|
theme_option = get_node("%theme_optionbutton")
|
||||||
|
emu_select_option = get_node("%emu_select_option")
|
||||||
|
emu_pick_option = get_node("%emu_pick_option")
|
||||||
|
|
||||||
func _connect_signals() -> void:
|
func _connect_signals() -> void:
|
||||||
#signal_theme_changed.connect(_conf_theme)
|
#signal_theme_changed.connect(_conf_theme)
|
||||||
theme_option.item_selected.connect(_conf_theme)
|
theme_option.item_selected.connect(_conf_theme)
|
||||||
signal_theme_changed.emit(theme_option.item_selected)
|
signal_theme_changed.emit(theme_option.item_selected)
|
||||||
|
emu_select_option.item_selected.connect(_emu_select)
|
||||||
|
|
||||||
|
func _emu_select(index: int) -> void:
|
||||||
|
emu_pick_option.visible = true
|
||||||
|
|
||||||
func _conf_theme(index: int) -> void:
|
func _conf_theme(index: int) -> void:
|
||||||
|
|
||||||
match index:
|
match index:
|
||||||
1:
|
1:
|
||||||
custom_theme = preload("res://assets/themes/default_theme.tres")
|
custom_theme = preload("res://assets/themes/default_theme.tres")
|
||||||
|
|
|
@ -410,6 +410,39 @@ text = "TK_GENTOOLS"
|
||||||
[node name="tools_separator" type="HSeparator" parent="Background/MarginContainer/TabContainer/TK_TOOLS/ScrollContainer/VBoxContainer/tools_container"]
|
[node name="tools_separator" type="HSeparator" parent="Background/MarginContainer/TabContainer/TK_TOOLS/ScrollContainer/VBoxContainer/tools_container"]
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
|
|
||||||
|
[node name="emu_select_option" type="OptionButton" parent="Background/MarginContainer/TabContainer/TK_TOOLS/ScrollContainer/VBoxContainer/tools_container"]
|
||||||
|
unique_name_in_owner = true
|
||||||
|
layout_mode = 2
|
||||||
|
size_flags_horizontal = 4
|
||||||
|
item_count = 3
|
||||||
|
selected = 0
|
||||||
|
popup/item_0/text = "TK_SELECT_EMU"
|
||||||
|
popup/item_0/id = 0
|
||||||
|
popup/item_0/disabled = true
|
||||||
|
popup/item_0/separator = true
|
||||||
|
popup/item_1/text = "RetroArch"
|
||||||
|
popup/item_1/id = 1
|
||||||
|
popup/item_2/text = "MAME"
|
||||||
|
popup/item_2/id = 2
|
||||||
|
|
||||||
|
[node name="emu_pick_option" type="OptionButton" parent="Background/MarginContainer/TabContainer/TK_TOOLS/ScrollContainer/VBoxContainer/tools_container"]
|
||||||
|
unique_name_in_owner = true
|
||||||
|
visible = false
|
||||||
|
layout_mode = 2
|
||||||
|
size_flags_horizontal = 4
|
||||||
|
item_count = 4
|
||||||
|
selected = 0
|
||||||
|
popup/item_0/text = "TK_ACTION_EMU"
|
||||||
|
popup/item_0/id = 0
|
||||||
|
popup/item_0/disabled = true
|
||||||
|
popup/item_0/separator = true
|
||||||
|
popup/item_1/text = "HELP"
|
||||||
|
popup/item_1/id = 1
|
||||||
|
popup/item_2/text = "LAUNCH"
|
||||||
|
popup/item_2/id = 2
|
||||||
|
popup/item_3/text = "RESET"
|
||||||
|
popup/item_3/id = 3
|
||||||
|
|
||||||
[node name="emu_open_button" type="Button" parent="Background/MarginContainer/TabContainer/TK_TOOLS/ScrollContainer/VBoxContainer/tools_container"]
|
[node name="emu_open_button" type="Button" parent="Background/MarginContainer/TabContainer/TK_TOOLS/ScrollContainer/VBoxContainer/tools_container"]
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
text = "TK_EMUOPEN"
|
text = "TK_EMUOPEN"
|
||||||
|
|
File diff suppressed because one or more lines are too long
Loading…
Reference in a new issue