mirror of
https://github.com/RetroDECK/RetroDECK.git
synced 2024-11-25 15:35:38 +00:00
Wine state
This commit is contained in:
parent
96965a704a
commit
749990b1b3
|
@ -17,26 +17,26 @@ func _process(delta: float) -> void:
|
|||
func update_progress(delta: float, progress: ProgressBar) -> void:
|
||||
if press_time >= PRESS_DURATION:
|
||||
_do_complete(current_button)
|
||||
print ("Progress Bar: %s Button: %s" % [progress.name, current_button.name])
|
||||
#print ("Progress Bar: %s Button: %s" % [progress.name, current_button.name])
|
||||
elif is_state_pressed and current_state == "mixed":
|
||||
press_time += delta
|
||||
progress.value = press_time / PRESS_DURATION * 100.0
|
||||
|
||||
func _connect_signals():
|
||||
%quick_resume_button.pressed.connect(class_functions.run_function.bind(%quick_resume_button, "quick_resume"))
|
||||
%button_swap_button.button_down.connect(_do_action.bind(%button_swap_progress, %button_swap_button))
|
||||
%button_swap_button.button_down.connect(_do_action.bind(%button_swap_progress, %button_swap_button, class_functions.abxy_state))
|
||||
%button_swap_button.button_up.connect(_on_button_released.bind(%button_swap_progress))
|
||||
%button_swap_button.pressed.connect(class_functions.run_function.bind(%button_swap_button, "abxy_button_swap"))
|
||||
%ask_to_exit_button.button_down.connect(_do_action.bind(%ask_to_exit_progress, %ask_to_exit_button))
|
||||
%ask_to_exit_button.button_down.connect(_do_action.bind(%ask_to_exit_progress, %ask_to_exit_button, class_functions.ask_to_exit_state))
|
||||
%ask_to_exit_button.button_up.connect(_on_button_released.bind(%ask_to_exit_progress))
|
||||
%ask_to_exit_button.pressed.connect(class_functions.run_function.bind(%ask_to_exit_button, "ask_to_exit"))
|
||||
%border_button.button_down.connect(_do_action.bind(%border_progress, %border_button))
|
||||
%border_button.button_down.connect(_do_action.bind(%border_progress, %border_button, class_functions.border_state))
|
||||
%border_button.button_up.connect(_on_button_released.bind(%border_progress))
|
||||
%border_button.pressed.connect(class_functions.run_function.bind(%border_button, "borders"))
|
||||
%widescreen_button.button_down.connect(_do_action.bind(%widescreen_progress, %widescreen_button))
|
||||
%widescreen_button.button_down.connect(_do_action.bind(%widescreen_progress, %widescreen_button, class_functions.widescreen_state))
|
||||
%widescreen_button.button_up.connect(_on_button_released.bind(%widescreen_progress))
|
||||
%widescreen_button.pressed.connect(class_functions.run_function.bind(%widescreen_button, "widescreen"))
|
||||
%quick_rewind_button.button_down.connect(_do_action.bind(%quick_rewind_progress, %quick_rewind_button))
|
||||
%quick_rewind_button.button_down.connect(_do_action.bind(%quick_rewind_progress, %quick_rewind_button, class_functions.quick_rewind_state))
|
||||
%quick_rewind_button.button_up.connect(_on_button_released.bind(%quick_rewind_progress))
|
||||
%quick_rewind_button.pressed.connect(class_functions.run_function.bind(%quick_rewind_button, "rewind"))
|
||||
|
||||
|
@ -49,18 +49,10 @@ func _on_button_released(progress: ProgressBar) -> void:
|
|||
current_progress = null
|
||||
current_state == null
|
||||
|
||||
func _do_action(progress: ProgressBar, button: Button) -> void:
|
||||
match progress.name:
|
||||
"button_swap_progress":
|
||||
current_state = class_functions.abxy_state
|
||||
"ask_to_exit_progress":
|
||||
current_state = class_functions.ask_to_exit_state
|
||||
"quick_rewind_progress":
|
||||
current_state = class_functions.quick_rewind_state
|
||||
"widescreen_progress":
|
||||
current_state = class_functions.widescreen_state
|
||||
"border_progress":
|
||||
current_state = class_functions.border_state
|
||||
func _do_action(progress: ProgressBar, button: Button, state: String) -> void:
|
||||
match [class_functions.button_list]:
|
||||
[class_functions.button_list]:
|
||||
current_state = state
|
||||
current_button = button
|
||||
current_progress = progress
|
||||
current_progress.visible = true
|
||||
|
|
|
@ -289,13 +289,19 @@ func update_global(button: Button, preset: String, state: bool) -> void:
|
|||
border_state = str(state)
|
||||
result = data_handler.change_all_cfg_values(config_file_path, config_section, preset, str(state))
|
||||
change_global(result, "build_preset_config", button, border_state)
|
||||
#if widescreen_state == "true" or widescreen_state == "mixed":
|
||||
#print ("What's up")
|
||||
if widescreen_state == "true" or widescreen_state == "mixed":
|
||||
widescreen_state = "false"
|
||||
result = data_handler.change_all_cfg_values(config_file_path, config_section, preset, str(state))
|
||||
change_global(result, "build_preset_config", button, widescreen_state)
|
||||
"widescreen_button":
|
||||
if widescreen_state != "mixed":
|
||||
widescreen_state = str(state)
|
||||
result = data_handler.change_all_cfg_values(config_file_path, config_section, preset, str(state))
|
||||
change_global(result, "build_preset_config", button, widescreen_state)
|
||||
if border_state == "true" or border_state == "mixed":
|
||||
border_state = "false"
|
||||
result = data_handler.change_all_cfg_values(config_file_path, config_section, preset, str(state))
|
||||
change_global(result, "build_preset_config", button, border_state)
|
||||
"quick_rewind_button":
|
||||
if quick_rewind_state != "mixed":
|
||||
quick_rewind_state = str(state)
|
||||
|
|
Loading…
Reference in a new issue