Skip to content

Commit

Permalink
Merge pull request #38 from ligen131/fix-20240211-card-highlighted-un…
Browse files Browse the repository at this point in the history
…used-bug

修复了 card highlighted 错误引用的 bug
  • Loading branch information
cutekibry authored Feb 13, 2024
2 parents 0e3803f + 98b661f commit 5a9aa5a
Show file tree
Hide file tree
Showing 6 changed files with 62 additions and 46 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"]
Binary file added objects/styled_button/button.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,16 @@

importer="texture"
type="CompressedTexture2D"
uid="uid://cmcc5xrpkrd0f"
path="res://.godot/imported/card_highlighted.png-8ddb0f805a6bbbe10f207a98f30e3645.ctex"
uid="uid://y5v6eoqttfkv"
path="res://.godot/imported/button.png-73d260eaddfc4ad29f058d8d686fd42a.ctex"
metadata={
"vram_texture": false
}

[deps]

source_file="res://objects/card/card_highlighted.png"
dest_files=["res://.godot/imported/card_highlighted.png-8ddb0f805a6bbbe10f207a98f30e3645.ctex"]
source_file="res://objects/styled_button/button.png"
dest_files=["res://.godot/imported/button.png-73d260eaddfc4ad29f058d8d686fd42a.ctex"]

[params]

Expand Down
Binary file added objects/styled_button/button_highlighted.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
34 changes: 34 additions & 0 deletions objects/styled_button/button_highlighted.png.import
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
[remap]

importer="texture"
type="CompressedTexture2D"
uid="uid://dqoba5dcyefbj"
path="res://.godot/imported/button_highlighted.png-48c081e184e3baf15f7a564ac53bfc4f.ctex"
metadata={
"vram_texture": false
}

[deps]

source_file="res://objects/styled_button/button_highlighted.png"
dest_files=["res://.godot/imported/button_highlighted.png-48c081e184e3baf15f7a564ac53bfc4f.ctex"]

[params]

compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=1
20 changes: 12 additions & 8 deletions objects/styled_button/styled_button.tscn
Original file line number Diff line number Diff line change
@@ -1,19 +1,23 @@
[gd_scene load_steps=8 format=3 uid="uid://drl1xe103umpi"]

[ext_resource type="Texture2D" uid="uid://cfbqh1k0etr6g" path="res://objects/card/card1.png" id="1_l6dpy"]
[ext_resource type="Texture2D" uid="uid://cmcc5xrpkrd0f" path="res://objects/card/card_highlighted.png" id="2_j1sqk"]
[ext_resource type="Texture2D" uid="uid://y5v6eoqttfkv" path="res://objects/styled_button/button.png" id="1_64thl"]
[ext_resource type="Texture2D" uid="uid://dqoba5dcyefbj" path="res://objects/styled_button/button_highlighted.png" id="2_8xse4"]
[ext_resource type="Script" path="res://objects/styled_button/styled_button.gd" id="3_rtcig"]
[ext_resource type="AudioStream" uid="uid://dpwscp4bw7pay" path="res://objects/styled_button/button_down.wav" id="4_no3m1"]

[sub_resource type="StyleBoxTexture" id="StyleBoxTexture_c0uot"]
texture = ExtResource("1_l6dpy")
texture = ExtResource("1_64thl")
texture_margin_left = 6.0
texture_margin_top = 6.0
texture_margin_right = 6.0
texture_margin_bottom = 6.0

[sub_resource type="StyleBoxTexture" id="StyleBoxTexture_eifmj"]
texture = ExtResource("2_j1sqk")
texture_margin_left = 4.0
texture_margin_top = 4.0
texture_margin_right = 4.0
texture_margin_bottom = 4.0
texture = ExtResource("2_8xse4")
texture_margin_left = 6.0
texture_margin_top = 6.0
texture_margin_right = 6.0
texture_margin_bottom = 6.0

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

Expand Down

0 comments on commit 5a9aa5a

Please sign in to comment.