button style

This commit is contained in:
Victor Turgeon 2023-10-11 10:28:58 -04:00
parent 36ed64729d
commit 9a16e4b108
3 changed files with 85 additions and 7 deletions

View File

@ -657,7 +657,7 @@ size_flags_horizontal = 3
[node name="AnimatedSprite2D" type="AnimatedSprite2D" parent="TotalArmyComp/Separation/ArmyTotals/Bats/Control"] [node name="AnimatedSprite2D" type="AnimatedSprite2D" parent="TotalArmyComp/Separation/ArmyTotals/Bats/Control"]
position = Vector2(24, 18) position = Vector2(24, 18)
sprite_frames = SubResource("SpriteFrames_kjfbi") sprite_frames = SubResource("SpriteFrames_kjfbi")
frame_progress = 0.806293 frame_progress = 0.761512
[node name="2Points" type="Label" parent="TotalArmyComp/Separation/ArmyTotals/Bats"] [node name="2Points" type="Label" parent="TotalArmyComp/Separation/ArmyTotals/Bats"]
layout_mode = 2 layout_mode = 2
@ -685,7 +685,7 @@ size_flags_horizontal = 3
[node name="AnimatedSprite2D" type="AnimatedSprite2D" parent="TotalArmyComp/Separation/ArmyTotals/Wolves/Control"] [node name="AnimatedSprite2D" type="AnimatedSprite2D" parent="TotalArmyComp/Separation/ArmyTotals/Wolves/Control"]
position = Vector2(24, 16) position = Vector2(24, 16)
sprite_frames = SubResource("SpriteFrames_h2asb") sprite_frames = SubResource("SpriteFrames_h2asb")
frame_progress = 0.808144 frame_progress = 0.763364
[node name="2Points" type="Label" parent="TotalArmyComp/Separation/ArmyTotals/Wolves"] [node name="2Points" type="Label" parent="TotalArmyComp/Separation/ArmyTotals/Wolves"]
layout_mode = 2 layout_mode = 2
@ -713,7 +713,7 @@ size_flags_horizontal = 3
[node name="AnimatedSprite2D" type="AnimatedSprite2D" parent="TotalArmyComp/Separation/ArmyTotals/Necromancers/Control"] [node name="AnimatedSprite2D" type="AnimatedSprite2D" parent="TotalArmyComp/Separation/ArmyTotals/Necromancers/Control"]
position = Vector2(24, 22) position = Vector2(24, 22)
sprite_frames = SubResource("SpriteFrames_0hwvy") sprite_frames = SubResource("SpriteFrames_0hwvy")
frame_progress = 0.223527 frame_progress = 0.178747
[node name="2Points" type="Label" parent="TotalArmyComp/Separation/ArmyTotals/Necromancers"] [node name="2Points" type="Label" parent="TotalArmyComp/Separation/ArmyTotals/Necromancers"]
layout_mode = 2 layout_mode = 2
@ -741,7 +741,7 @@ size_flags_horizontal = 3
[node name="AnimatedSprite2D" type="AnimatedSprite2D" parent="TotalArmyComp/Separation/ArmyTotals/Pit Fiends/Control"] [node name="AnimatedSprite2D" type="AnimatedSprite2D" parent="TotalArmyComp/Separation/ArmyTotals/Pit Fiends/Control"]
position = Vector2(24, 22) position = Vector2(24, 22)
sprite_frames = SubResource("SpriteFrames_3y7oi") sprite_frames = SubResource("SpriteFrames_3y7oi")
frame_progress = 0.437328 frame_progress = 0.392548
[node name="2Points" type="Label" parent="TotalArmyComp/Separation/ArmyTotals/Pit Fiends"] [node name="2Points" type="Label" parent="TotalArmyComp/Separation/ArmyTotals/Pit Fiends"]
layout_mode = 2 layout_mode = 2
@ -821,7 +821,7 @@ flip_h = true
position = Vector2(784, 288) position = Vector2(784, 288)
scale = Vector2(7.765, 7.765) scale = Vector2(7.765, 7.765)
sprite_frames = SubResource("SpriteFrames_5yana") sprite_frames = SubResource("SpriteFrames_5yana")
frame_progress = 0.910776 frame_progress = 0.865996
flip_h = true flip_h = true
[connection signal="pressed" from="Quit" to="." method="_on_quit_pressed"] [connection signal="pressed" from="Quit" to="." method="_on_quit_pressed"]

View File

@ -1,10 +1,22 @@
[gd_scene load_steps=6 format=3 uid="uid://bkt0gdgv7bsx2"] [gd_scene load_steps=7 format=3 uid="uid://bkt0gdgv7bsx2"]
[ext_resource type="Script" path="res://Scripts/start_menu.gd" id="1_dgae7"] [ext_resource type="Script" path="res://Scripts/start_menu.gd" id="1_dgae7"]
[ext_resource type="PackedScene" uid="uid://b8s2seg2lf7wo" path="res://Scenes/Tilemaps/tileset_1.tscn" id="2_0sfou"] [ext_resource type="PackedScene" uid="uid://b8s2seg2lf7wo" path="res://Scenes/Tilemaps/tileset_1.tscn" id="2_0sfou"]
[ext_resource type="Theme" uid="uid://dr1h7to56a2pv" path="res://Themes/base_theme.tres" id="3_puxi3"] [ext_resource type="Theme" uid="uid://dr1h7to56a2pv" path="res://Themes/base_theme.tres" id="3_puxi3"]
[ext_resource type="Texture2D" uid="uid://cxk21atb8fblp" path="res://Assets/Witch/noBKG_WitchThrow_strip.png" id="4_qq6xh"] [ext_resource type="Texture2D" uid="uid://cxk21atb8fblp" path="res://Assets/Witch/noBKG_WitchThrow_strip.png" id="4_qq6xh"]
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_1owyk"]
bg_color = Color(0.6, 0.6, 0.6, 0)
border_width_left = 50
border_width_top = 50
border_width_right = 50
border_width_bottom = 50
border_color = Color(0.254902, 0, 0, 1)
border_blend = true
shadow_color = Color(0.223529, 0.0117647, 0.0745098, 0.6)
shadow_size = 20
anti_aliasing_size = 2.606
[sub_resource type="AtlasTexture" id="AtlasTexture_je3v2"] [sub_resource type="AtlasTexture" id="AtlasTexture_je3v2"]
atlas = ExtResource("4_qq6xh") atlas = ExtResource("4_qq6xh")
region = Rect2(1024, 0, 64, 64) region = Rect2(1024, 0, 64, 64)
@ -20,6 +32,19 @@ script = ExtResource("1_dgae7")
[node name="TileSet1" parent="." instance=ExtResource("2_0sfou")] [node name="TileSet1" parent="." instance=ExtResource("2_0sfou")]
[node name="border" type="PanelContainer" parent="."]
layout_mode = 1
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
offset_left = -24.0
offset_top = -16.0
offset_right = 16.0
offset_bottom = 20.0
grow_horizontal = 2
grow_vertical = 2
theme_override_styles/panel = SubResource("StyleBoxFlat_1owyk")
[node name="ColorRect" type="ColorRect" parent="."] [node name="ColorRect" type="ColorRect" parent="."]
layout_mode = 1 layout_mode = 1
anchors_preset = 15 anchors_preset = 15
@ -39,6 +64,7 @@ offset_top = -92.0
offset_right = 442.0 offset_right = 442.0
offset_bottom = -45.0 offset_bottom = -45.0
grow_vertical = 0 grow_vertical = 0
theme = ExtResource("3_puxi3")
text = "Start" text = "Start"
[node name="QuitButton" type="Button" parent="."] [node name="QuitButton" type="Button" parent="."]
@ -54,6 +80,7 @@ offset_right = -305.0
offset_bottom = -45.0 offset_bottom = -45.0
grow_horizontal = 0 grow_horizontal = 0
grow_vertical = 0 grow_vertical = 0
theme = ExtResource("3_puxi3")
text = "Quit text = "Quit
" "

View File

@ -1,7 +1,53 @@
[gd_resource type="Theme" load_steps=4 format=3 uid="uid://dr1h7to56a2pv"] [gd_resource type="Theme" load_steps=9 format=3 uid="uid://dr1h7to56a2pv"]
[ext_resource type="FontFile" uid="uid://01mccw37teq2" path="res://Assets/Fonts/alagard.ttf" id="1_i16b1"] [ext_resource type="FontFile" uid="uid://01mccw37teq2" path="res://Assets/Fonts/alagard.ttf" id="1_i16b1"]
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_atud8"]
bg_color = Color(0.192157, 0.0941176, 0.0784314, 1)
border_width_left = 1
border_width_top = 1
border_color = Color(0, 0, 0, 1)
border_blend = true
corner_radius_top_left = 10
corner_detail = 1
anti_aliasing = false
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_5vpqh"]
bg_color = Color(0.54902, 0.321569, 0.286275, 1)
border_width_left = 1
border_width_top = 1
border_color = Color(0.286275, 0.0784314, 0.172549, 1)
corner_radius_top_left = 10
corner_detail = 1
anti_aliasing = false
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_sphu5"]
bg_color = Color(0.584314, 0.345098, 0.309804, 1)
border_width_left = 1
border_width_top = 1
border_color = Color(0.137255, 0.137255, 0.137255, 1)
corner_radius_top_left = 10
corner_detail = 1
anti_aliasing = false
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_ynkwh"]
bg_color = Color(0.466667, 0.266667, 0.235294, 1)
border_width_left = 1
border_width_top = 1
border_color = Color(0.137255, 0.137255, 0.137255, 1)
corner_radius_top_left = 10
corner_detail = 1
anti_aliasing = false
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_vl5pg"]
bg_color = Color(0.294118, 0.156863, 0.137255, 1)
border_width_left = 1
border_width_top = 1
border_color = Color(0.494118, 0.0235294, 0.145098, 1)
corner_radius_top_left = 5
corner_detail = 1
anti_aliasing = false
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_hf10d"] [sub_resource type="StyleBoxFlat" id="StyleBoxFlat_hf10d"]
bg_color = Color(0.403922, 0.0117647, 0.0627451, 0.188235) bg_color = Color(0.403922, 0.0117647, 0.0627451, 0.188235)
@ -10,6 +56,11 @@ bg_color = Color(0.803922, 0.152941, 0.188235, 1)
[resource] [resource]
Button/fonts/font = ExtResource("1_i16b1") Button/fonts/font = ExtResource("1_i16b1")
Button/styles/disabled = SubResource("StyleBoxFlat_atud8")
Button/styles/focus = SubResource("StyleBoxFlat_5vpqh")
Button/styles/hover = SubResource("StyleBoxFlat_sphu5")
Button/styles/normal = SubResource("StyleBoxFlat_ynkwh")
Button/styles/pressed = SubResource("StyleBoxFlat_vl5pg")
Label/fonts/font = ExtResource("1_i16b1") Label/fonts/font = ExtResource("1_i16b1")
PanelContainer/styles/panel = null PanelContainer/styles/panel = null
ProgressBar/styles/background = SubResource("StyleBoxFlat_hf10d") ProgressBar/styles/background = SubResource("StyleBoxFlat_hf10d")