mirror of
https://github.com/RetroDECK/RetroDECK.git
synced 2024-11-23 22:45:38 +00:00
477c2a120c
On branch godot-data-demo Changes to be committed: modified: tools/configurator/Rekku.gd modified: tools/configurator/TabContainer.gd modified: tools/configurator/components/bios_check/bios_popup_content.tscn modified: tools/configurator/components/popup.gd modified: tools/configurator/main.gd modified: tools/configurator/main.tscn modified: tools/configurator/project.godot modified: tools/configurator/res/pixel_ui_theme/RetroDECKTheme.tres
31 lines
1.1 KiB
GDScript
31 lines
1.1 KiB
GDScript
extends Control
|
|
|
|
var content = null
|
|
@onready var custom_theme: Theme = get_tree().current_scene.custom_theme
|
|
#@onready var button_off = get_node(current_scene.%l1_button)# .current_scene.l1_button
|
|
@onready var lbhide: TextureButton = get_tree().current_scene.get_node("%l1_button")
|
|
@onready var rbhide: TextureButton = get_tree().current_scene.get_node("%r1_button")
|
|
|
|
func _ready():
|
|
lbhide.visible=false
|
|
rbhide.visible=false
|
|
$".".theme = custom_theme
|
|
if (content != null):
|
|
$Panel/MarginContainer/VBoxContainer/ContentContainer/MarginContainer.add_child(content)
|
|
|
|
|
|
func _process(delta):
|
|
if Input.is_action_pressed("back_button"):
|
|
lbhide.visible=true
|
|
rbhide.visible=true
|
|
queue_free()
|
|
|
|
func set_content(new_content):
|
|
content = load(new_content).instantiate()
|
|
func set_title(new_title):
|
|
$Panel/MarginContainer/VBoxContainer/MarginContainer/HBoxContainer/Label.text = new_title
|
|
func set_display_text(new_display_text):
|
|
$Panel/MarginContainer/VBoxContainer/ContentContainer/MarginContainer/RichTextLabel.text=new_display_text
|
|
func _on_back_pressed():
|
|
queue_free()
|