summaryrefslogtreecommitdiff
path: root/stage/dice_selection
diff options
context:
space:
mode:
authorDaniel Weipert <git@mail.dweipert.de>2025-04-02 17:31:58 +0200
committerDaniel Weipert <git@mail.dweipert.de>2025-04-02 17:31:58 +0200
commit2ffba3f35af0af2902278d062028a5f83e7fbc53 (patch)
treef108b7176ba63daa7101de43801a39db5ed3f5a0 /stage/dice_selection
parent65bfe9c4c3e09c0d9f5058dd899a82c6a47ec15d (diff)
next commitHEADmain
Diffstat (limited to 'stage/dice_selection')
-rw-r--r--stage/dice_selection/dice_selection.gd7
-rw-r--r--stage/dice_selection/dice_selection.tscn1
-rw-r--r--stage/dice_selection/dice_selection_item.tscn53
3 files changed, 9 insertions, 52 deletions
diff --git a/stage/dice_selection/dice_selection.gd b/stage/dice_selection/dice_selection.gd
index 812005a..b56bebe 100644
--- a/stage/dice_selection/dice_selection.gd
+++ b/stage/dice_selection/dice_selection.gd
@@ -29,6 +29,9 @@ func _ready() -> void:
func _input(event: InputEvent) -> void:
if event.is_action_pressed("right_click"):
dice_selected.emit([] as Array[DiceConfiguration])
+
+ if event.is_action_pressed("menu"):
+ %GoButton.grab_focus()
func _on_deck_dice_selected(dice: Control) -> void:
@@ -61,10 +64,10 @@ func _on_dice_focus_entered(dice: Control) -> void:
var faces := [
dice_configuration.front_face,
dice_configuration.back_face,
- dice_configuration.top_face,
- dice_configuration.bottom_face,
dice_configuration.left_face,
dice_configuration.right_face,
+ dice_configuration.top_face,
+ dice_configuration.bottom_face,
]
%Label.text = ""
diff --git a/stage/dice_selection/dice_selection.tscn b/stage/dice_selection/dice_selection.tscn
index 934d3fc..1023cb9 100644
--- a/stage/dice_selection/dice_selection.tscn
+++ b/stage/dice_selection/dice_selection.tscn
@@ -50,6 +50,7 @@ unique_name_in_owner = true
layout_mode = 2
[node name="GoButton" type="Button" parent="VBoxContainer/HBoxContainer/VBoxContainer" node_paths=PackedStringArray("shortcut_context")]
+unique_name_in_owner = true
layout_mode = 2
shortcut_context = NodePath(".")
shortcut = SubResource("Shortcut_sn5id")
diff --git a/stage/dice_selection/dice_selection_item.tscn b/stage/dice_selection/dice_selection_item.tscn
index 4cedb3e..8a51b96 100644
--- a/stage/dice_selection/dice_selection_item.tscn
+++ b/stage/dice_selection/dice_selection_item.tscn
@@ -1,56 +1,9 @@
-[gd_scene load_steps=13 format=3 uid="uid://d280t78wjw3hc"]
+[gd_scene load_steps=5 format=3 uid="uid://d280t78wjw3hc"]
[ext_resource type="Script" uid="uid://bgaq754eqfs8g" path="res://stage/dice_selection/dice_selection_item.gd" id="1_v6plq"]
[ext_resource type="Texture2D" uid="uid://blanietpri1be" path="res://icon.svg" id="2_1q4g0"]
[ext_resource type="Texture2D" uid="uid://db0v50mdroaox" path="res://stage/assets/isometric-tile.png" id="2_p1an8"]
-[ext_resource type="Script" uid="uid://dnklife8p0m35" path="res://stage/dice_throw/dice_face_configuration.gd" id="3_xogsa"]
-[ext_resource type="Script" uid="uid://6rit5abkk1rw" path="res://stage/dice_throw/dice_configuration.gd" id="4_p1an8"]
-
-[sub_resource type="Resource" id="Resource_xogsa"]
-script = ExtResource("3_xogsa")
-type = "move"
-value = 1
-metadata/_custom_type_script = "uid://dnklife8p0m35"
-
-[sub_resource type="Resource" id="Resource_ye5qu"]
-script = ExtResource("3_xogsa")
-type = "attack"
-value = 1
-metadata/_custom_type_script = "uid://dnklife8p0m35"
-
-[sub_resource type="Resource" id="Resource_xub8r"]
-script = ExtResource("3_xogsa")
-type = "move"
-value = 1
-metadata/_custom_type_script = "uid://dnklife8p0m35"
-
-[sub_resource type="Resource" id="Resource_0m3mt"]
-script = ExtResource("3_xogsa")
-type = "defend"
-value = 1
-metadata/_custom_type_script = "uid://dnklife8p0m35"
-
-[sub_resource type="Resource" id="Resource_inbll"]
-script = ExtResource("3_xogsa")
-type = "ability"
-value = 1
-metadata/_custom_type_script = "uid://dnklife8p0m35"
-
-[sub_resource type="Resource" id="Resource_p1an8"]
-script = ExtResource("3_xogsa")
-type = "attack"
-value = 1
-metadata/_custom_type_script = "uid://dnklife8p0m35"
-
-[sub_resource type="Resource" id="Resource_f5jvy"]
-script = ExtResource("4_p1an8")
-front_face = SubResource("Resource_xub8r")
-back_face = SubResource("Resource_xogsa")
-top_face = SubResource("Resource_p1an8")
-bottom_face = SubResource("Resource_ye5qu")
-left_face = SubResource("Resource_0m3mt")
-right_face = SubResource("Resource_inbll")
-metadata/_custom_type_script = "uid://6rit5abkk1rw"
+[ext_resource type="Resource" uid="uid://c5up64wq06lx1" path="res://dice_configuration.tres" id="4_xogsa"]
[node name="DiceSelectionItem" type="TextureButton"]
custom_minimum_size = Vector2(32, 32)
@@ -61,6 +14,6 @@ texture_focused = ExtResource("2_p1an8")
ignore_texture_size = true
stretch_mode = 4
script = ExtResource("1_v6plq")
-dice_configuration = SubResource("Resource_f5jvy")
+dice_configuration = ExtResource("4_xogsa")
[connection signal="gui_input" from="." to="." method="_on_gui_input"]