Dialogue button updates
This commit is contained in:
7
docs/todo.txt
Normal file
7
docs/todo.txt
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
* Debug menu on F1, right now just include quick scene swapping
|
||||||
|
* Finish buttons on dialogue scene
|
||||||
|
* Reogranize files
|
||||||
|
* Singletons named 'XXXServer'
|
||||||
|
* Dialogue scene command system (ShowText, ShowSprite, MoveSprite, PlaySound, ChangeBackground, etc)
|
||||||
|
* Setup room system (everything is unpassable, carve out rooms, walls automatic, specify connections between rooms on tiles)
|
||||||
|
* Basic map editor (test map data will be harder to craft the more we add)
|
||||||
@@ -3,6 +3,30 @@
|
|||||||
[ext_resource type="Texture2D" uid="uid://cyl18yt5hxyb5" path="res://assets/sprites/dialogue_ui.BMP" id="1_cno1m"]
|
[ext_resource type="Texture2D" uid="uid://cyl18yt5hxyb5" path="res://assets/sprites/dialogue_ui.BMP" id="1_cno1m"]
|
||||||
[ext_resource type="Theme" uid="uid://dx26d6py3n8xi" path="res://resources/main_ui_theme.tres" id="1_qpcyj"]
|
[ext_resource type="Theme" uid="uid://dx26d6py3n8xi" path="res://resources/main_ui_theme.tres" id="1_qpcyj"]
|
||||||
[ext_resource type="Texture2D" uid="uid://dj621xih5cam7" path="res://assets/sprites/dialogue_continue.BMP" id="2_qpcyj"]
|
[ext_resource type="Texture2D" uid="uid://dj621xih5cam7" path="res://assets/sprites/dialogue_continue.BMP" id="2_qpcyj"]
|
||||||
|
[ext_resource type="AudioStream" uid="uid://5ndo4w06umsa" path="res://assets/sounds/SE020.WAV" id="4_hover"]
|
||||||
|
|
||||||
|
[sub_resource type="GDScript" id="GDScript_hover"]
|
||||||
|
resource_name = "DialogueButtonHover"
|
||||||
|
script/source = "extends HBoxContainer
|
||||||
|
|
||||||
|
@onready var hover_sfx: AudioStreamPlayer = $HoverSFX
|
||||||
|
@onready var hover_node: TextureRect = $Hover
|
||||||
|
|
||||||
|
func _ready() -> void:
|
||||||
|
hover_node.visible = false
|
||||||
|
for child in get_children():
|
||||||
|
if child is TextureButton:
|
||||||
|
child.mouse_entered.connect(_on_button_hovered.bind(child))
|
||||||
|
child.mouse_exited.connect(_on_button_unhovered)
|
||||||
|
|
||||||
|
func _on_button_hovered(button: TextureButton) -> void:
|
||||||
|
hover_sfx.play()
|
||||||
|
hover_node.reparent(button, false)
|
||||||
|
hover_node.visible = true
|
||||||
|
|
||||||
|
func _on_button_unhovered() -> void:
|
||||||
|
hover_node.visible = false
|
||||||
|
"
|
||||||
|
|
||||||
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_cno1m"]
|
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_cno1m"]
|
||||||
bg_color = Color(0, 0, 0, 1)
|
bg_color = Color(0, 0, 0, 1)
|
||||||
@@ -112,6 +136,13 @@ animations = [{
|
|||||||
atlas = ExtResource("1_cno1m")
|
atlas = ExtResource("1_cno1m")
|
||||||
region = Rect2(1, 257, 22, 25)
|
region = Rect2(1, 257, 22, 25)
|
||||||
|
|
||||||
|
[sub_resource type="CanvasItemMaterial" id="CanvasItemMaterial_qpcyj"]
|
||||||
|
blend_mode = 1
|
||||||
|
|
||||||
|
[sub_resource type="AtlasTexture" id="AtlasTexture_gkt67"]
|
||||||
|
atlas = ExtResource("1_cno1m")
|
||||||
|
region = Rect2(114, 255, 18, 17)
|
||||||
|
|
||||||
[sub_resource type="AtlasTexture" id="AtlasTexture_qpcyj"]
|
[sub_resource type="AtlasTexture" id="AtlasTexture_qpcyj"]
|
||||||
atlas = ExtResource("1_cno1m")
|
atlas = ExtResource("1_cno1m")
|
||||||
region = Rect2(23, 257, 22, 25)
|
region = Rect2(23, 257, 22, 25)
|
||||||
@@ -213,6 +244,20 @@ size_flags_horizontal = 3
|
|||||||
|
|
||||||
[node name="DialogueButtons" type="HBoxContainer" parent="VerticalScreen/DialogueBox/VerticalDBox/BottomRow" unique_id=1572455129]
|
[node name="DialogueButtons" type="HBoxContainer" parent="VerticalScreen/DialogueBox/VerticalDBox/BottomRow" unique_id=1572455129]
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
|
script = SubResource("GDScript_hover")
|
||||||
|
|
||||||
|
[node name="HoverSFX" type="AudioStreamPlayer" parent="VerticalScreen/DialogueBox/VerticalDBox/BottomRow/DialogueButtons"]
|
||||||
|
stream = ExtResource("4_hover")
|
||||||
|
|
||||||
|
[node name="Hover" type="TextureRect" parent="VerticalScreen/DialogueBox/VerticalDBox/BottomRow/DialogueButtons" unique_id=1721109871]
|
||||||
|
self_modulate = Color(1, 1, 1, 0.28235295)
|
||||||
|
material = SubResource("CanvasItemMaterial_qpcyj")
|
||||||
|
layout_mode = 0
|
||||||
|
offset_left = 2.0
|
||||||
|
offset_top = -7.0
|
||||||
|
offset_right = 20.0
|
||||||
|
offset_bottom = 18.0
|
||||||
|
texture = SubResource("AtlasTexture_gkt67")
|
||||||
|
|
||||||
[node name="History" type="TextureButton" parent="VerticalScreen/DialogueBox/VerticalDBox/BottomRow/DialogueButtons" unique_id=535301616]
|
[node name="History" type="TextureButton" parent="VerticalScreen/DialogueBox/VerticalDBox/BottomRow/DialogueButtons" unique_id=535301616]
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
|
|||||||
Reference in New Issue
Block a user