This commit is contained in:
gamer147
2026-04-02 19:38:43 -04:00
parent a7fc82b9e9
commit b9030b7899
2 changed files with 183 additions and 3 deletions

View File

@@ -4,6 +4,7 @@
[ext_resource type="AudioStream" uid="uid://b7dgmblbcm0cj" path="res://assets/music/menu_theme.OGG" id="1_yqeox"] [ext_resource type="AudioStream" uid="uid://b7dgmblbcm0cj" path="res://assets/music/menu_theme.OGG" id="1_yqeox"]
[ext_resource type="Texture2D" uid="uid://b47b6tt142b25" path="res://assets/sprites/main_menu.BMP" id="3_bqqt6"] [ext_resource type="Texture2D" uid="uid://b47b6tt142b25" path="res://assets/sprites/main_menu.BMP" id="3_bqqt6"]
[ext_resource type="AudioStream" uid="uid://5ndo4w06umsa" path="res://assets/sounds/SE020.WAV" id="4_wu84c"] [ext_resource type="AudioStream" uid="uid://5ndo4w06umsa" path="res://assets/sounds/SE020.WAV" id="4_wu84c"]
[ext_resource type="Texture2D" uid="uid://8kr4vmvhu03p" path="res://assets/sprites/menu_selector_flame.BMP" id="5_flame"]
[sub_resource type="AtlasTexture" id="AtlasTexture_wu84c"] [sub_resource type="AtlasTexture" id="AtlasTexture_wu84c"]
atlas = ExtResource("3_bqqt6") atlas = ExtResource("3_bqqt6")
@@ -34,14 +35,26 @@ resource_name = "ButtonHoverSFX"
script/source = "extends VBoxContainer script/source = "extends VBoxContainer
@onready var hover_sfx: AudioStreamPlayer = $HoverSFX @onready var hover_sfx: AudioStreamPlayer = $HoverSFX
@onready var left_indicator: Control = %LeftIndicator
@onready var right_indicator: Control = %RightIndicator
func _ready() -> void: func _ready() -> void:
for child in get_children(): for child in get_children():
if child is TextureButton: if child is TextureButton:
child.mouse_entered.connect(_on_button_hovered) child.mouse_entered.connect(_on_button_hovered.bind(child))
child.mouse_exited.connect(_on_button_unhovered)
func _on_button_hovered() -> void: func _on_button_hovered(button: TextureButton) -> void:
hover_sfx.play() hover_sfx.play()
var button_center := button.global_position + button.size / 2.0
left_indicator.global_position = Vector2(button.global_position.x, button_center.y)
right_indicator.global_position = Vector2(button.global_position.x + button.size.x, button_center.y)
left_indicator.visible = true
right_indicator.visible = true
func _on_button_unhovered() -> void:
left_indicator.visible = false
right_indicator.visible = false
" "
[sub_resource type="AtlasTexture" id="AtlasTexture_tbmy8"] [sub_resource type="AtlasTexture" id="AtlasTexture_tbmy8"]
@@ -137,6 +150,136 @@ func _pressed():
get_tree().quit(0) get_tree().quit(0)
" "
[sub_resource type="AtlasTexture" id="AtlasTexture_tcusk"]
atlas = ExtResource("3_bqqt6")
region = Rect2(1320, 746, 25, 22)
[sub_resource type="CanvasItemMaterial" id="CanvasItemMaterial_8ln24"]
blend_mode = 1
[sub_resource type="AtlasTexture" id="AtlasTexture_8egab"]
atlas = ExtResource("5_flame")
region = Rect2(0, 0, 140, 140)
[sub_resource type="AtlasTexture" id="AtlasTexture_gw5y6"]
atlas = ExtResource("5_flame")
region = Rect2(140, 0, 140, 140)
[sub_resource type="AtlasTexture" id="AtlasTexture_svtp6"]
atlas = ExtResource("5_flame")
region = Rect2(280, 0, 140, 140)
[sub_resource type="AtlasTexture" id="AtlasTexture_1dfpl"]
atlas = ExtResource("5_flame")
region = Rect2(420, 0, 140, 140)
[sub_resource type="AtlasTexture" id="AtlasTexture_qywvv"]
atlas = ExtResource("5_flame")
region = Rect2(0, 140, 140, 140)
[sub_resource type="AtlasTexture" id="AtlasTexture_3wgol"]
atlas = ExtResource("5_flame")
region = Rect2(140, 140, 140, 140)
[sub_resource type="AtlasTexture" id="AtlasTexture_1acrt"]
atlas = ExtResource("5_flame")
region = Rect2(280, 140, 140, 140)
[sub_resource type="AtlasTexture" id="AtlasTexture_vr8o3"]
atlas = ExtResource("5_flame")
region = Rect2(420, 140, 140, 140)
[sub_resource type="AtlasTexture" id="AtlasTexture_1a85y"]
atlas = ExtResource("5_flame")
region = Rect2(0, 280, 140, 140)
[sub_resource type="AtlasTexture" id="AtlasTexture_hl5e0"]
atlas = ExtResource("5_flame")
region = Rect2(140, 280, 140, 140)
[sub_resource type="AtlasTexture" id="AtlasTexture_engjn"]
atlas = ExtResource("5_flame")
region = Rect2(280, 280, 140, 140)
[sub_resource type="AtlasTexture" id="AtlasTexture_6h3lr"]
atlas = ExtResource("5_flame")
region = Rect2(420, 280, 140, 140)
[sub_resource type="AtlasTexture" id="AtlasTexture_dj67d"]
atlas = ExtResource("5_flame")
region = Rect2(0, 420, 140, 140)
[sub_resource type="AtlasTexture" id="AtlasTexture_6vcge"]
atlas = ExtResource("5_flame")
region = Rect2(140, 420, 140, 140)
[sub_resource type="AtlasTexture" id="AtlasTexture_ip0br"]
atlas = ExtResource("5_flame")
region = Rect2(280, 420, 140, 140)
[sub_resource type="AtlasTexture" id="AtlasTexture_xyero"]
atlas = ExtResource("5_flame")
region = Rect2(420, 420, 140, 140)
[sub_resource type="SpriteFrames" id="SpriteFrames_tcusk"]
animations = [{
"frames": [{
"duration": 1.0,
"texture": SubResource("AtlasTexture_8egab")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_gw5y6")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_svtp6")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_1dfpl")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_qywvv")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_3wgol")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_1acrt")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_vr8o3")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_1a85y")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_hl5e0")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_engjn")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_6h3lr")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_dj67d")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_6vcge")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_ip0br")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_xyero")
}],
"loop": true,
"name": &"default",
"speed": 10.0
}]
[sub_resource type="CanvasItemMaterial" id="CanvasItemMaterial_rtw2f"]
blend_mode = 1
[sub_resource type="AtlasTexture" id="AtlasTexture_hstxw"] [sub_resource type="AtlasTexture" id="AtlasTexture_hstxw"]
[node name="Menu" type="Control" unique_id=528000941] [node name="Menu" type="Control" unique_id=528000941]
@@ -271,6 +414,43 @@ texture_normal = SubResource("AtlasTexture_5pajh")
texture_hover = SubResource("AtlasTexture_j7ex8") texture_hover = SubResource("AtlasTexture_j7ex8")
script = SubResource("GDScript_wu84c") script = SubResource("GDScript_wu84c")
[node name="LeftIndicator" type="Control" parent="." unique_id=100000001]
unique_name_in_owner = true
visible = false
anchors_preset = 0
offset_right = 50.0
offset_bottom = 50.0
[node name="Sprite2D" type="Sprite2D" parent="LeftIndicator" unique_id=1510731086]
texture = SubResource("AtlasTexture_tcusk")
[node name="AnimatedSprite2D" type="AnimatedSprite2D" parent="LeftIndicator" unique_id=1906133697]
modulate = Color(1, 1, 1, 0.7411765)
material = SubResource("CanvasItemMaterial_8ln24")
scale = Vector2(0.75, 0.75)
sprite_frames = SubResource("SpriteFrames_tcusk")
autoplay = "default"
frame = 12
frame_progress = 0.23836201
[node name="RightIndicator" type="Control" parent="." unique_id=100000002]
unique_name_in_owner = true
visible = false
anchors_preset = 0
offset_right = 50.0
offset_bottom = 50.0
[node name="Sprite2D" type="Sprite2D" parent="RightIndicator" unique_id=979863490]
texture = SubResource("AtlasTexture_tcusk")
[node name="AnimatedSprite2D" type="AnimatedSprite2D" parent="RightIndicator" unique_id=1047794140]
material = SubResource("CanvasItemMaterial_rtw2f")
scale = Vector2(0.75, 0.75)
sprite_frames = SubResource("SpriteFrames_tcusk")
autoplay = "default"
frame = 12
frame_progress = 0.23836201
[node name="TextureRect" type="TextureRect" parent="." unique_id=968381019] [node name="TextureRect" type="TextureRect" parent="." unique_id=968381019]
layout_mode = 0 layout_mode = 0
offset_right = 40.0 offset_right = 40.0

View File

@@ -8,5 +8,5 @@ void fragment() {
if (brightness < threshold) { if (brightness < threshold) {
discard; discard;
} }
COLOR = tex_color; COLOR = tex_color * COLOR;
} }