Back button support Rekku and pop up

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
This commit is contained in:
monkeyx-net 2024-08-15 21:34:11 +01:00
parent e26a5956f2
commit 477c2a120c
8 changed files with 88 additions and 64 deletions

View file

@ -3,3 +3,6 @@ extends Control
func _input(event): func _input(event):
if event.is_action_pressed("rekku_hide"): if event.is_action_pressed("rekku_hide"):
self.visible = !self.visible self.visible = !self.visible
if Input.is_action_pressed("back_button"):
$".".visible=false

View file

@ -2,6 +2,7 @@ extends TabContainer
func _ready(): func _ready():
focusFirstFocusableChild() #grab focus on first element to enable controller focusing focusFirstFocusableChild() #grab focus on first element to enable controller focusing
%l1_button.visible = true
func _input(event): func _input(event):
if (event.is_action_pressed("next_tab")): if (event.is_action_pressed("next_tab")):

View file

@ -3,6 +3,7 @@
[ext_resource type="Script" path="res://components/bios_check/bios_check.gd" id="1_qrkee"] [ext_resource type="Script" path="res://components/bios_check/bios_check.gd" id="1_qrkee"]
[node name="PopupContent" type="Control"] [node name="PopupContent" type="Control"]
top_level = true
layout_mode = 3 layout_mode = 3
anchors_preset = 15 anchors_preset = 15
anchor_right = 1.0 anchor_right = 1.0
@ -12,7 +13,6 @@ grow_vertical = 2
script = ExtResource("1_qrkee") script = ExtResource("1_qrkee")
[node name="RichTextLabel" type="RichTextLabel" parent="."] [node name="RichTextLabel" type="RichTextLabel" parent="."]
visible = false
layout_mode = 1 layout_mode = 1
anchors_preset = 15 anchors_preset = 15
anchor_right = 1.0 anchor_right = 1.0

View file

@ -2,11 +2,23 @@ extends Control
var content = null var content = null
@onready var custom_theme: Theme = get_tree().current_scene.custom_theme @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(): func _ready():
lbhide.visible=false
rbhide.visible=false
$".".theme = custom_theme $".".theme = custom_theme
if (content != null): if (content != null):
$Panel/MarginContainer/VBoxContainer/ContentContainer/MarginContainer.add_child(content) $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): func set_content(new_content):
content = load(new_content).instantiate() content = load(new_content).instantiate()

View file

@ -15,10 +15,10 @@ var anim_logo: AnimatedSprite2D
var rd_logs: String var rd_logs: String
var rd_version: String var rd_version: String
var gc_version: String var gc_version: String
var l1_button: Texture2D = load("res://assets/icons/kenney_input-prompts-pixel-16/Tiles/tile_0797.png") var l1_button_texture: Texture2D = load("res://assets/icons/kenney_input-prompts-pixel-16/Tiles/tile_0797.png")
var r1_button: Texture2D = load("res://assets/icons/kenney_input-prompts-pixel-16/Tiles/tile_0798.png") var r1_button_texture: Texture2D = load("res://assets/icons/kenney_input-prompts-pixel-16/Tiles/tile_0798.png")
var l1_button_alt: Texture2D = load("res://assets/icons/kenney_input-prompts-pixel-16/Tiles/tile_0763.png") var l1_button_texture_alt: Texture2D = load("res://assets/icons/kenney_input-prompts-pixel-16/Tiles/tile_0763.png")
var r1_button_alt: Texture2D = load("res://assets/icons/kenney_input-prompts-pixel-16/Tiles/tile_0764.png") var r1_button_texture_alt: Texture2D = load("res://assets/icons/kenney_input-prompts-pixel-16/Tiles/tile_0764.png")
var app_data = AppData.new() var app_data = AppData.new()
func _ready(): func _ready():
@ -71,8 +71,8 @@ func _process(delta):
elif Input.is_action_pressed("previous_tab"): elif Input.is_action_pressed("previous_tab"):
%l1_button.texture_normal = $l1_button.texture_pressed %l1_button.texture_normal = $l1_button.texture_pressed
else: else:
%r1_button.texture_normal = r1_button %r1_button.texture_normal = r1_button_texture
%l1_button.texture_normal = l1_button %l1_button.texture_normal = l1_button_texture
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")
@ -184,9 +184,8 @@ func _on_locale_selected(index):
combine_tkeys() combine_tkeys()
func combine_tkeys(): #More as a test func combine_tkeys(): #More as a test
%cheats.text = tr("TK_CHEATS") + " " + tr("TK_SOON") %cheats.text = tr("TK_CHEATS") + " " + tr("TK_SOON") # switched to access as a unique name as easier to refactor
#$Background/MarginContainer/TabContainer/TK_SYSTEM/ScrollContainer/VBoxContainer/HBoxContainer/GridContainer/cheats.text = tr("TK_CHEATS") + " " + tr("TK_SOON") #$Background/MarginContainer/TabContainer/TK_SYSTEM/ScrollContainer/VBoxContainer/HBoxContainer/GridContainer/cheats.text = tr("TK_CHEATS") + " " + tr("TK_SOON")
#$Background/MarginContainer/TabContainer/TK_SYSTEM/ScrollContainer/VBoxContainer/game_control_container/GridContainer/cheats.text = tr("TK_CHEATS") + " " + tr("TK_SOON")
$Background/MarginContainer/TabContainer/TK_GRAPHICS/ScrollContainer/VBoxContainer/decorations_container/GridContainer/shaders.text = tr("TK_SHADERS") + " " + tr("TK_SOON") $Background/MarginContainer/TabContainer/TK_GRAPHICS/ScrollContainer/VBoxContainer/decorations_container/GridContainer/shaders.text = tr("TK_SHADERS") + " " + tr("TK_SOON")
$Background/MarginContainer/TabContainer/TK_GRAPHICS/ScrollContainer/VBoxContainer/extra_container/GridContainer/tate_mode.text = tr("TK_TATE") + " " + tr("TK_SOON") $Background/MarginContainer/TabContainer/TK_GRAPHICS/ScrollContainer/VBoxContainer/extra_container/GridContainer/tate_mode.text = tr("TK_TATE") + " " + tr("TK_SOON")
$Background/MarginContainer/TabContainer/TK_CONTROLS/ScrollContainer/VBoxContainer/controls_container/hotkey_sound.text = tr("TK_HOTKEYSOUND") + " " + tr("TK_SOON") $Background/MarginContainer/TabContainer/TK_CONTROLS/ScrollContainer/VBoxContainer/controls_container/hotkey_sound.text = tr("TK_HOTKEYSOUND") + " " + tr("TK_SOON")

View file

@ -1072,10 +1072,10 @@ layout_mode = 1
anchors_preset = -1 anchors_preset = -1
anchor_left = 1.0 anchor_left = 1.0
anchor_right = 1.0 anchor_right = 1.0
offset_left = -33.0 offset_left = -40.0
offset_top = 50.0 offset_top = 81.0
offset_right = -12.0 offset_right = -19.0
offset_bottom = 71.0 offset_bottom = 102.0
grow_horizontal = 0 grow_horizontal = 0
icon = SubResource("AtlasTexture_st633") icon = SubResource("AtlasTexture_st633")
@ -1214,11 +1214,11 @@ scroll_active = false
[node name="l1_button" type="TextureButton" parent="."] [node name="l1_button" type="TextureButton" parent="."]
unique_name_in_owner = true unique_name_in_owner = true
layout_mode = 0 layout_mode = 2
offset_left = 6.0 offset_left = 6.0
offset_top = -3.0 offset_top = -3.0
offset_right = 91.0 offset_right = 90.0
offset_bottom = 44.0 offset_bottom = 56.0
texture_normal = ExtResource("38_prt7u") texture_normal = ExtResource("38_prt7u")
texture_pressed = ExtResource("39_m4qgd") texture_pressed = ExtResource("39_m4qgd")
stretch_mode = 0 stretch_mode = 0
@ -1228,8 +1228,8 @@ unique_name_in_owner = true
layout_mode = 0 layout_mode = 0
offset_left = 1189.0 offset_left = 1189.0
offset_top = -2.0 offset_top = -2.0
offset_right = 1274.0 offset_right = 1273.0
offset_bottom = 45.0 offset_bottom = 57.0
texture_normal = ExtResource("39_5ft88") texture_normal = ExtResource("39_5ft88")
texture_pressed = ExtResource("40_pnuor") texture_pressed = ExtResource("40_pnuor")
stretch_mode = 0 stretch_mode = 0

View file

@ -86,6 +86,15 @@ previous_tab={
, Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":-1,"button_index":4,"pressure":0.0,"pressed":true,"script":null) , Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":-1,"button_index":4,"pressure":0.0,"pressed":true,"script":null)
] ]
} }
back_button={
"deadzone": 0.5,
"events": [Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":-1,"button_index":1,"pressure":0.0,"pressed":true,"script":null)
]
}
action_button={
"deadzone": 0.5,
"events": []
}
[internationalization] [internationalization]

File diff suppressed because one or more lines are too long