mirror of
https://github.com/RetroDECK/RetroDECK.git
synced 2024-11-25 15:35:38 +00:00
XargonWan
3dc6b18833
Some checks failed
Build cooker / Building_RetroDECK (push) Has been cancelled
* Table top mode * Button Colour and tables columns * Bob does regex * Bob does regex2 * Updates from feedback * Stuff * Ensure funnction array being passed correctly * Array to String needed afterall * Cooker Test * Test build * Fixed Bios display issue * Fixed dialogue logging * Full Screen is back * gGent Orange BIOS * GDScript Logger POC * Try to create log folder * GDScript Logger POC (#956) * GDScript Logger POC * Try to create log folder * Ensure all_systems array is empty every time build_preset_list_options() is run - This prevents all_systems array from having multiple copies of all systems when run multiple times in the same session, which would cause make_preset_changes() to run build_preset_config() multiple times. * logs2.0 * Parked up for the night * Don't truncate the log file * Timestamp, fix append * Time for a break * restore godot logger, default is still bash * Added real milliseconds to log timestamp (thanks, monkeyx), typing fixes * Time for a break * Update godot.yml * Update godot.yml * Update godot.yml * Update godot.yml * Update godot.yml * Update godot.yml * Update godot.yml * Translations with POT! * Comment to test PR (#960) Co-authored-by: Rekku <rekku@retrodeck.net> --------- Co-authored-by: Rekku <rekku@retrodeck.net> Co-authored-by: WallK <wallykrasiy@gmail.com> Co-authored-by: MonkeyX <tim@monkeyx.net> Co-authored-by: icenine451 <benjamin.r.shelton@protonmail.com>
37 lines
1.2 KiB
GDScript
37 lines
1.2 KiB
GDScript
extends Control
|
|
|
|
var command: String
|
|
var parameters: Array
|
|
@onready var custom_theme: Theme = get_tree().current_scene.custom_theme
|
|
|
|
func _ready():
|
|
$".".theme = custom_theme
|
|
var args = OS.get_cmdline_args()
|
|
for arg in range(args.size()):
|
|
if args[arg] == "--title" and arg + 1 < args.size():
|
|
%title_label.text = args[arg + 1]
|
|
elif args[arg] == "--content" and arg + 1 < args.size():
|
|
%content_rtl.text = args[arg + 1]
|
|
elif args[arg] == "--command" and arg + 1 < args.size():
|
|
command = args[arg + 1]
|
|
elif args[arg] == "--parameters" and arg + 1 < args.size():
|
|
parameters.append(args[arg + 1])
|
|
elif args[arg] == "--fullscreen" and arg + 1 < args.size():
|
|
DisplayServer.window_set_mode(DisplayServer.WindowMode.WINDOW_MODE_FULLSCREEN)
|
|
|
|
func _input(event):
|
|
if Input.is_action_pressed("back_button"):
|
|
get_tree().quit()
|
|
|
|
func _on_cancel_pressed():
|
|
class_functions.logger("d", "Exited dialogue")
|
|
get_tree().quit()
|
|
|
|
func _on_ok_button_pressed() -> void:
|
|
class_functions.logger("d", "Command to run " + command + " " + str(parameters))
|
|
var result = class_functions.execute_command(command,parameters , false)
|
|
class_functions.logger("d", "Exit code: " + str(result["exit_code"]))
|
|
%content_rtl.text = result["output"]
|
|
#get_tree().quit()
|
|
|