Skip to content

Commit

Permalink
fix!(main_menu): 将 StartButton 基类换为 StyleButton
Browse files Browse the repository at this point in the history
  • Loading branch information
cutekibry committed Feb 11, 2024
1 parent ae8c2eb commit 98b661f
Showing 1 changed file with 12 additions and 34 deletions.
46 changes: 12 additions & 34 deletions objects/main_menu/main_menu.tscn
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[gd_scene load_steps=30 format=3 uid="uid://c07co5p46apu7"]
[gd_scene load_steps=24 format=3 uid="uid://c07co5p46apu7"]

[ext_resource type="Texture2D" uid="uid://b53614pajfqep" path="res://objects/main_menu/background/main_menu_nobg1.png" id="1_2j22j"]
[ext_resource type="Texture2D" uid="uid://cyq78augwb5fc" path="res://objects/main_menu/background/main_menu_nobg2.png" id="2_bd160"]
Expand All @@ -16,12 +16,11 @@
[ext_resource type="Texture2D" uid="uid://c4xg1rhvx6trg" path="res://objects/main_menu/background/main_menu_nobg14.png" id="14_0p4kr"]
[ext_resource type="Script" path="res://objects/main_menu/main_menu.gd" id="14_npy3s"]
[ext_resource type="Texture2D" uid="uid://bs3g6c351s8or" path="res://objects/main_menu/background/main_menu_nobg15.png" id="15_bwyyk"]
[ext_resource type="Texture2D" uid="uid://cmcc5xrpkrd0f" path="res://objects/card/card_highlighted.png" id="16_5m8f1"]
[ext_resource type="Texture2D" uid="uid://83p3glm3htsp" path="res://objects/styled_button/start1.png" id="16_skwdr"]
[ext_resource type="Texture2D" uid="uid://ksc3hj3vyr8" path="res://objects/main_menu/background/backgroud.png" id="17_hvarn"]
[ext_resource type="Texture2D" uid="uid://64ivn20qcjoy" path="res://objects/styled_button/start2.png" id="17_mrqss"]
[ext_resource type="PackedScene" uid="uid://drl1xe103umpi" path="res://objects/styled_button/styled_button.tscn" id="18_443al"]
[ext_resource type="Texture2D" uid="uid://cbwkjh7uudgr5" path="res://objects/styled_button/start3.png" id="18_qh4cp"]
[ext_resource type="Script" path="res://objects/main_menu/start_button.gd" id="19_bldvj"]

[sub_resource type="SpriteFrames" id="SpriteFrames_b4517"]
animations = [{
Expand Down Expand Up @@ -81,21 +80,6 @@ animations = [{
"speed": 5.0
}]

[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_htdlk"]

[sub_resource type="StyleBoxTexture" id="StyleBoxTexture_6khk3"]
texture = ExtResource("16_5m8f1")
expand_margin_left = 2.0
expand_margin_top = 2.0
expand_margin_right = 2.0
expand_margin_bottom = 2.0

[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_m8edv"]

[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_gegaq"]

[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_146ea"]

[sub_resource type="SpriteFrames" id="SpriteFrames_c72mh"]
animations = [{
"frames": [{
Expand Down Expand Up @@ -133,24 +117,18 @@ scale = Vector2(0.996224, 0.994968)
texture = ExtResource("17_hvarn")
centered = false

[node name="start_button" type="Button" parent="."]
offset_left = 87.6
offset_top = 87.6
offset_right = 106.6
offset_bottom = 107.6
scale = Vector2(0.87554, 0.87554)
theme_override_styles/normal = SubResource("StyleBoxEmpty_htdlk")
theme_override_styles/hover = SubResource("StyleBoxTexture_6khk3")
theme_override_styles/pressed = SubResource("StyleBoxEmpty_m8edv")
theme_override_styles/disabled = SubResource("StyleBoxEmpty_gegaq")
theme_override_styles/focus = SubResource("StyleBoxEmpty_146ea")
script = ExtResource("19_bldvj")
[node name="StartButton" parent="." instance=ExtResource("18_443al")]
offset_left = 86.8
offset_top = 86.8
offset_right = 106.8
offset_bottom = 106.8
metadata/_edit_group_ = true

[node name="AnimatedSprite2D" type="AnimatedSprite2D" parent="start_button"]
position = Vector2(1, 1)
scale = Vector2(0.75, 0.75)
[node name="AnimatedSprite2D" type="AnimatedSprite2D" parent="StartButton"]
position = Vector2(2.8, 2)
scale = Vector2(0.656655, 0.656655)
sprite_frames = SubResource("SpriteFrames_c72mh")
centered = false

[connection signal="animation_finished" from="title" to="." method="_on_title_animation_finished"]
[connection signal="pressed" from="start_button" to="." method="_on_start_button_pressed"]
[connection signal="pressed" from="StartButton" to="." method="_on_start_button_pressed"]

0 comments on commit 98b661f

Please sign in to comment.