From 1b365e05e48c87334ced024dc25af2896b9608ca Mon Sep 17 00:00:00 2001 From: Ruslan Ignatov Date: Thu, 25 Dec 2025 16:06:14 +0300 Subject: [PATCH] Added slider textures --- game/data/weapons/cannon_data.tres | 5 +- game/data/weapons/gatling_data.tres | 3 +- game/data/weapons/laser_data.tres | 3 +- game/data/weapons/launcher_data.tres | 5 +- game/data/weapons/minelayer_data.tres | 5 +- game/data/weapons/plasma_data.tres | 3 +- game/data/weapons/railgun_data.tres | 3 +- game/data/weapons/shrapnel_data.tres | 3 +- game/data/weapons/tesla_data.tres | 3 +- game/menu/common/options.tscn | 16 ++++-- game/menu/ingame/pause_menu.tscn | 6 +-- game/menu/ingame/weapon_selector.tscn | 36 ++++++------- game/menu/main/seed_selection_menu.tscn | 1 + images/menu/menu_buttons.png | 4 +- styles/label.tres | 6 --- styles/label_theme.tres | 6 +++ styles/menu_theme.tres | 67 ++++++++++++++++++++++++- 17 files changed, 130 insertions(+), 45 deletions(-) delete mode 100644 styles/label.tres create mode 100644 styles/label_theme.tres diff --git a/game/data/weapons/cannon_data.tres b/game/data/weapons/cannon_data.tres index 72398dc..821c321 100644 --- a/game/data/weapons/cannon_data.tres +++ b/game/data/weapons/cannon_data.tres @@ -9,10 +9,11 @@ script = ExtResource("1_c34y3") id = "cannon" name = "Cannon" group = "explosion" -description = "High damage (explosion) +description = "High damage +(explosion) Low firerate Moderate velocity -High explosion radius" +High radiuss" enemy_scene = ExtResource("1_2gkq7") player_scene = ExtResource("2_qvf4o") metadata/_custom_type_script = "uid://870r1efinhqd" diff --git a/game/data/weapons/gatling_data.tres b/game/data/weapons/gatling_data.tres index 311472b..f509d1c 100644 --- a/game/data/weapons/gatling_data.tres +++ b/game/data/weapons/gatling_data.tres @@ -9,7 +9,8 @@ script = ExtResource("1_bt4k8") id = "gatling" name = "Gatling" group = "kinetic" -description = "Low damage (kinetic) +description = "Low damage +(kinetic) High firerate Moderate velocity" enemy_scene = ExtResource("1_punrp") diff --git a/game/data/weapons/laser_data.tres b/game/data/weapons/laser_data.tres index 604f75f..d7bbb51 100644 --- a/game/data/weapons/laser_data.tres +++ b/game/data/weapons/laser_data.tres @@ -9,7 +9,8 @@ script = ExtResource("1_ipxhy") id = "laser" name = "Laser" group = "energy" -description = "Low damage (energetic) +description = "Low damage +(energetic) High firerate Infinite velocity" enemy_scene = ExtResource("1_mdqmb") diff --git a/game/data/weapons/launcher_data.tres b/game/data/weapons/launcher_data.tres index c75a383..5ce42a6 100644 --- a/game/data/weapons/launcher_data.tres +++ b/game/data/weapons/launcher_data.tres @@ -9,10 +9,11 @@ script = ExtResource("1_tcis2") id = "launcher" name = "Launcher" group = "explosion" -description = "Moderate damage (explosion) +description = "Moderate damage +(explosion) Moderate firerate Low velocity -Small explosion radius +Small radius Homing" enemy_scene = ExtResource("1_vypk3") player_scene = ExtResource("2_sdkfu") diff --git a/game/data/weapons/minelayer_data.tres b/game/data/weapons/minelayer_data.tres index 6ea4bb2..969777c 100644 --- a/game/data/weapons/minelayer_data.tres +++ b/game/data/weapons/minelayer_data.tres @@ -9,10 +9,11 @@ script = ExtResource("1_152qt") id = "minelayer" name = "Minelayer" group = "explosion" -description = "High damage (explosion) +description = "High damage +(explosion) Low firerate Low velocity -Medium explosion radius +Medium radius Short range" enemy_scene = ExtResource("1_bpafq") player_scene = ExtResource("2_77jvm") diff --git a/game/data/weapons/plasma_data.tres b/game/data/weapons/plasma_data.tres index 7e689c0..bcb7a73 100644 --- a/game/data/weapons/plasma_data.tres +++ b/game/data/weapons/plasma_data.tres @@ -9,7 +9,8 @@ script = ExtResource("1_3fasx") id = "plasma" name = "Plasma" group = "energy" -description = "Moderate damage (energetic) +description = "Moderate damage +(energetic) Moderate firerate Moderate velocity" enemy_scene = ExtResource("1_h185p") diff --git a/game/data/weapons/railgun_data.tres b/game/data/weapons/railgun_data.tres index 6852d30..1806eeb 100644 --- a/game/data/weapons/railgun_data.tres +++ b/game/data/weapons/railgun_data.tres @@ -9,7 +9,8 @@ script = ExtResource("1_6lcn5") id = "railgun" name = "Railgun" group = "kinetic" -description = "High damage (kinetic) +description = "High damage +(kinetic) Low firerate High velocity Can pierce enemies" diff --git a/game/data/weapons/shrapnel_data.tres b/game/data/weapons/shrapnel_data.tres index 7dd0b59..3e438d6 100644 --- a/game/data/weapons/shrapnel_data.tres +++ b/game/data/weapons/shrapnel_data.tres @@ -9,7 +9,8 @@ script = ExtResource("1_xds2o") id = "shrapnel" name = "Shrapnel" group = "kinetic" -description = "High damage (kinetic) +description = "High damage +(kinetic) Moderate firerate Moderate velocity Short range diff --git a/game/data/weapons/tesla_data.tres b/game/data/weapons/tesla_data.tres index 761e874..a0b7751 100644 --- a/game/data/weapons/tesla_data.tres +++ b/game/data/weapons/tesla_data.tres @@ -9,7 +9,8 @@ script = ExtResource("1_a16gw") id = "tesla" name = "Tesla" group = "energy" -description = "Moderate damage (energetic) +description = "Moderate damage +(energetic) Low firerate High velocity Hits nearest target diff --git a/game/menu/common/options.tscn b/game/menu/common/options.tscn index fbc8aa0..3a05826 100644 --- a/game/menu/common/options.tscn +++ b/game/menu/common/options.tscn @@ -111,7 +111,6 @@ text = "Menu Volume" [node name="MasterSlider" type="HSlider" parent="ScrollContainer/OptionsGridContainer"] unique_name_in_owner = true -custom_minimum_size = Vector2(100, 0) layout_mode = 2 mouse_filter = 2 theme = ExtResource("2_1tdpy") @@ -119,6 +118,9 @@ step = 10.0 value = 100.0 rounded = true scrollable = false +tick_count = 11 +ticks_on_borders = true +ticks_position = 3 [node name="UILabel" type="Label" parent="ScrollContainer/OptionsGridContainer"] layout_mode = 2 @@ -127,7 +129,6 @@ text = "UI Volume" [node name="UISlider" type="HSlider" parent="ScrollContainer/OptionsGridContainer"] unique_name_in_owner = true -custom_minimum_size = Vector2(100, 0) layout_mode = 2 mouse_filter = 2 theme = ExtResource("2_1tdpy") @@ -135,6 +136,9 @@ step = 10.0 value = 100.0 rounded = true scrollable = false +tick_count = 11 +ticks_on_borders = true +ticks_position = 3 [node name="SFXLabel" type="Label" parent="ScrollContainer/OptionsGridContainer"] layout_mode = 2 @@ -143,7 +147,6 @@ text = "SFX Volume" [node name="SFXSlider" type="HSlider" parent="ScrollContainer/OptionsGridContainer"] unique_name_in_owner = true -custom_minimum_size = Vector2(100, 0) layout_mode = 2 mouse_filter = 2 theme = ExtResource("2_1tdpy") @@ -151,6 +154,9 @@ step = 10.0 value = 100.0 rounded = true scrollable = false +tick_count = 11 +ticks_on_borders = true +ticks_position = 3 [node name="MusicLabel" type="Label" parent="ScrollContainer/OptionsGridContainer"] layout_mode = 2 @@ -159,7 +165,6 @@ text = "Music Volume" [node name="MusicSlider" type="HSlider" parent="ScrollContainer/OptionsGridContainer"] unique_name_in_owner = true -custom_minimum_size = Vector2(100, 0) layout_mode = 2 mouse_filter = 2 theme = ExtResource("2_1tdpy") @@ -167,6 +172,9 @@ step = 10.0 value = 100.0 rounded = true scrollable = false +tick_count = 11 +ticks_on_borders = true +ticks_position = 3 [node name="HBoxContainer" type="HBoxContainer" parent="."] layout_mode = 2 diff --git a/game/menu/ingame/pause_menu.tscn b/game/menu/ingame/pause_menu.tscn index eb6632c..d20d8a3 100644 --- a/game/menu/ingame/pause_menu.tscn +++ b/game/menu/ingame/pause_menu.tscn @@ -26,14 +26,14 @@ layout_mode = 2 mouse_filter = 2 theme = ExtResource("2_vy7sn") shortcut = SubResource("Shortcut_lgp46") -text = "CONTINUE" +text = "Continue" [node name="OptionsButton" type="Button" parent="VBoxContainer"] z_index = 100 layout_mode = 2 mouse_filter = 2 theme = ExtResource("2_vy7sn") -text = "OPTIONS" +text = "Options" [node name="MainMenuButton" type="Button" parent="VBoxContainer"] unique_name_in_owner = true @@ -41,7 +41,7 @@ z_index = 100 layout_mode = 2 mouse_filter = 2 theme = ExtResource("2_vy7sn") -text = "MAIN MENU" +text = "Main Menu" [connection signal="visibility_changed" from="." to="." method="_on_visibility_changed"] [connection signal="pressed" from="VBoxContainer/ContinueButton" to="." method="_on_continue_button_pressed"] diff --git a/game/menu/ingame/weapon_selector.tscn b/game/menu/ingame/weapon_selector.tscn index d85fa93..2023e7e 100644 --- a/game/menu/ingame/weapon_selector.tscn +++ b/game/menu/ingame/weapon_selector.tscn @@ -1,12 +1,15 @@ -[gd_scene load_steps=3 format=3 uid="uid://1o3idp54lil2"] +[gd_scene load_steps=4 format=3 uid="uid://1o3idp54lil2"] [ext_resource type="Script" uid="uid://beiydi6w6gqqc" path="res://game/menu/ingame/weapon_selector.gd" id="1_4acia"] [ext_resource type="Theme" uid="uid://dtnd3tqllufey" path="res://styles/menu_theme.tres" id="2_g83h6"] +[ext_resource type="Theme" uid="uid://bqqtjq710luul" path="res://styles/label_theme.tres" id="3_dsio1"] [node name="WeaponSelector" type="MarginContainer"] anchors_preset = 15 anchor_right = 1.0 anchor_bottom = 1.0 +offset_right = -440.0 +offset_bottom = -240.0 grow_horizontal = 2 grow_vertical = 2 theme_override_constants/margin_left = 10 @@ -15,32 +18,31 @@ theme_override_constants/margin_right = 10 theme_override_constants/margin_bottom = 10 script = ExtResource("1_4acia") -[node name="Button" type="Button" parent="."] -unique_name_in_owner = true -layout_mode = 2 -theme = ExtResource("2_g83h6") - -[node name="MarginContainer" type="MarginContainer" parent="."] -layout_mode = 2 -theme_override_constants/margin_left = 10 -theme_override_constants/margin_top = 10 -theme_override_constants/margin_right = 10 -theme_override_constants/margin_bottom = 10 - -[node name="VBoxContainer" type="VBoxContainer" parent="MarginContainer"] +[node name="VBoxContainer" type="VBoxContainer" parent="."] layout_mode = 2 -[node name="NameLabel" type="Label" parent="MarginContainer/VBoxContainer"] +[node name="NameLabel" type="Label" parent="VBoxContainer"] unique_name_in_owner = true layout_mode = 2 theme = ExtResource("2_g83h6") horizontal_alignment = 1 -[node name="DescriptionLabel" type="Label" parent="MarginContainer/VBoxContainer"] +[node name="DescriptionLabel" type="Label" parent="VBoxContainer"] unique_name_in_owner = true custom_minimum_size = Vector2(160, 0) layout_mode = 2 +theme = ExtResource("3_dsio1") theme_override_font_sizes/font_size = 8 horizontal_alignment = 1 -[connection signal="pressed" from="Button" to="." method="_on_button_pressed"] +[node name="Control" type="Control" parent="VBoxContainer"] +layout_mode = 2 +size_flags_vertical = 3 + +[node name="Button" type="Button" parent="VBoxContainer"] +unique_name_in_owner = true +layout_mode = 2 +theme = ExtResource("2_g83h6") +text = "Select" + +[connection signal="pressed" from="VBoxContainer/Button" to="." method="_on_button_pressed"] diff --git a/game/menu/main/seed_selection_menu.tscn b/game/menu/main/seed_selection_menu.tscn index d1ec38b..226ac78 100644 --- a/game/menu/main/seed_selection_menu.tscn +++ b/game/menu/main/seed_selection_menu.tscn @@ -31,6 +31,7 @@ offset_right = 107.5 offset_bottom = 33.0 grow_horizontal = 2 grow_vertical = 2 +theme_override_constants/v_separation = 25 columns = 2 [node name="RandomEdit" type="LineEdit" parent="GridContainer"] diff --git a/images/menu/menu_buttons.png b/images/menu/menu_buttons.png index 0960f2f..a3379c6 100644 --- a/images/menu/menu_buttons.png +++ b/images/menu/menu_buttons.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:ce229d4079f31200108c662a259fe6abe0c8b16c304f7d14a03317eefede7476 -size 1097 +oid sha256:ffe2feafbfb96ff7185029836f2f027b2c5259abb2161bc17eab82f69c80b0e3 +size 1362 diff --git a/styles/label.tres b/styles/label.tres deleted file mode 100644 index be4cfdc..0000000 --- a/styles/label.tres +++ /dev/null @@ -1,6 +0,0 @@ -[gd_resource type="Theme" load_steps=2 format=3 uid="uid://cigren10ijb75"] - -[ext_resource type="FontFile" uid="uid://b3xawfjtsnm5b" path="res://images/fonts/font8.png" id="1_h3mgl"] - -[resource] -default_font = ExtResource("1_h3mgl") diff --git a/styles/label_theme.tres b/styles/label_theme.tres new file mode 100644 index 0000000..705df1e --- /dev/null +++ b/styles/label_theme.tres @@ -0,0 +1,6 @@ +[gd_resource type="Theme" load_steps=2 format=3 uid="uid://bqqtjq710luul"] + +[ext_resource type="FontFile" uid="uid://b3xawfjtsnm5b" path="res://images/fonts/font8.png" id="1_4d1s8"] + +[resource] +default_font = ExtResource("1_4d1s8") diff --git a/styles/menu_theme.tres b/styles/menu_theme.tres index c051468..b901b14 100644 --- a/styles/menu_theme.tres +++ b/styles/menu_theme.tres @@ -1,4 +1,4 @@ -[gd_resource type="Theme" load_steps=33 format=3 uid="uid://dtnd3tqllufey"] +[gd_resource type="Theme" load_steps=46 format=3 uid="uid://dtnd3tqllufey"] [ext_resource type="FontFile" uid="uid://bw1vqxkgbaekh" path="res://images/fonts/font16.png" id="1_2vd5j"] [ext_resource type="Texture2D" uid="uid://dhmquapac0fco" path="res://images/menu/menu_buttons.png" id="2_6ro36"] @@ -196,6 +196,64 @@ texture_margin_right = 40.0 texture_margin_bottom = 12.0 region_rect = Rect2(96, 32, 64, 32) +[sub_resource type="AtlasTexture" id="AtlasTexture_2vd5j"] +atlas = ExtResource("2_6ro36") +region = Rect2(256, 48, 16, 16) + +[sub_resource type="CompressedTexture2D" id="CompressedTexture2D_l7q8y"] +load_path = "res://.godot/imported/menu_buttons.png-57be3916c3bbcc2912e1eb0a800254c2.ctex" + +[sub_resource type="AtlasTexture" id="AtlasTexture_ph311"] +atlas = SubResource("CompressedTexture2D_l7q8y") +region = Rect2(240, 64, 16, 16) + +[sub_resource type="CompressedTexture2D" id="CompressedTexture2D_rqpqp"] +load_path = "res://.godot/imported/menu_buttons.png-57be3916c3bbcc2912e1eb0a800254c2.ctex" + +[sub_resource type="AtlasTexture" id="AtlasTexture_r1n7q"] +atlas = SubResource("CompressedTexture2D_rqpqp") +region = Rect2(240, 48, 16, 16) + +[sub_resource type="CompressedTexture2D" id="CompressedTexture2D_hvlke"] +load_path = "res://.godot/imported/menu_buttons.png-57be3916c3bbcc2912e1eb0a800254c2.ctex" + +[sub_resource type="AtlasTexture" id="AtlasTexture_abqku"] +atlas = SubResource("CompressedTexture2D_hvlke") +region = Rect2(256, 64, 16, 16) + +[sub_resource type="CompressedTexture2D" id="CompressedTexture2D_r1n7q"] +load_path = "res://.godot/imported/menu_buttons.png-57be3916c3bbcc2912e1eb0a800254c2.ctex" + +[sub_resource type="StyleBoxTexture" id="StyleBoxTexture_whlbl"] +texture = SubResource("CompressedTexture2D_r1n7q") +texture_margin_left = 3.0 +texture_margin_top = 7.0 +texture_margin_right = 3.0 +texture_margin_bottom = 8.0 +region_rect = Rect2(240, 0, 32, 16) + +[sub_resource type="CompressedTexture2D" id="CompressedTexture2D_idplf"] +load_path = "res://.godot/imported/menu_buttons.png-57be3916c3bbcc2912e1eb0a800254c2.ctex" + +[sub_resource type="StyleBoxTexture" id="StyleBoxTexture_lkot7"] +texture = SubResource("CompressedTexture2D_idplf") +texture_margin_left = 3.0 +texture_margin_top = 7.0 +texture_margin_right = 3.0 +texture_margin_bottom = 8.0 +region_rect = Rect2(240, 16, 32, 16) + +[sub_resource type="CompressedTexture2D" id="CompressedTexture2D_muh7f"] +load_path = "res://.godot/imported/menu_buttons.png-57be3916c3bbcc2912e1eb0a800254c2.ctex" + +[sub_resource type="StyleBoxTexture" id="StyleBoxTexture_r1n7q"] +texture = SubResource("CompressedTexture2D_muh7f") +texture_margin_left = 3.0 +texture_margin_top = 7.0 +texture_margin_right = 3.0 +texture_margin_bottom = 8.0 +region_rect = Rect2(240, 32, 32, 16) + [sub_resource type="StyleBoxTexture" id="StyleBoxTexture_6ro36"] content_margin_left = 10.0 content_margin_top = 16.0 @@ -283,6 +341,13 @@ CheckButton/styles/normal = SubResource("StyleBoxTexture_l7q8y") CheckButton/styles/normal_mirrored = SubResource("StyleBoxTexture_l7q8y") CheckButton/styles/pressed = SubResource("StyleBoxTexture_bullh") CheckButton/styles/pressed_mirrored = SubResource("StyleBoxTexture_bullh") +HSlider/icons/grabber = SubResource("AtlasTexture_2vd5j") +HSlider/icons/grabber_disabled = SubResource("AtlasTexture_ph311") +HSlider/icons/grabber_highlight = SubResource("AtlasTexture_r1n7q") +HSlider/icons/tick = SubResource("AtlasTexture_abqku") +HSlider/styles/grabber_area = SubResource("StyleBoxTexture_whlbl") +HSlider/styles/grabber_area_highlight = SubResource("StyleBoxTexture_lkot7") +HSlider/styles/slider = SubResource("StyleBoxTexture_r1n7q") Label/colors/font_color = Color(0.95686275, 0.95686275, 0.95686275, 1) LineEdit/colors/caret_color = Color(0.2, 0.23529412, 0.34117648, 1) LineEdit/colors/font_color = Color(0.14509805, 0.44313726, 0.4745098, 1)