Skip to content

Commit

Permalink
Prettier buttons
Browse files Browse the repository at this point in the history
  • Loading branch information
kiwijuice56 committed Jul 9, 2024
1 parent 7f3678b commit f34e785
Show file tree
Hide file tree
Showing 14 changed files with 155 additions and 123 deletions.
29 changes: 1 addition & 28 deletions game/main/Main.tscn
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[gd_scene load_steps=35 format=3 uid="uid://ggbp6fch244c"]
[gd_scene load_steps=32 format=3 uid="uid://ggbp6fch244c"]

[ext_resource type="Script" path="res://main/main.gd" id="1_2pidp"]
[ext_resource type="Theme" uid="uid://co20v1mxv2dfm" path="res://main/ui/_theme/theme.tres" id="2_nb65v"]
Expand Down Expand Up @@ -31,30 +31,6 @@
bg_color = Color(0.509804, 0.517647, 0.560784, 1)
expand_margin_top = 30.0

[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_dha6b"]
bg_color = Color(0.4, 0.4, 0.45098, 1)
corner_radius_top_left = 4
corner_radius_top_right = 4
corner_radius_bottom_right = 4
corner_radius_bottom_left = 4
anti_aliasing = false

[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_3h7k3"]
bg_color = Color(0.188235, 0.188235, 0.239216, 1)
corner_radius_top_left = 4
corner_radius_top_right = 4
corner_radius_bottom_right = 4
corner_radius_bottom_left = 4
anti_aliasing = false

[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_7pq0y"]
bg_color = Color(0.313726, 0.313726, 0.360784, 1)
corner_radius_top_left = 4
corner_radius_top_right = 4
corner_radius_bottom_right = 4
corner_radius_bottom_left = 4
anti_aliasing = false

[sub_resource type="Animation" id="Animation_sr1iu"]
length = 0.001
tracks/0/type = "value"
Expand Down Expand Up @@ -220,9 +196,6 @@ layout_mode = 2
size_flags_horizontal = 2
focus_mode = 0
theme_override_font_sizes/font_size = 18
theme_override_styles/hover = SubResource("StyleBoxFlat_dha6b")
theme_override_styles/pressed = SubResource("StyleBoxFlat_3h7k3")
theme_override_styles/normal = SubResource("StyleBoxFlat_7pq0y")
icon = ExtResource("9_1ns3c")
icon_alignment = 1

Expand Down
Binary file not shown.
Binary file not shown.

This file was deleted.

Binary file not shown.

This file was deleted.

9 changes: 8 additions & 1 deletion game/main/ui/_theme/theme.tres
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
[gd_resource type="Theme" load_steps=26 format=3 uid="uid://co20v1mxv2dfm"]
[gd_resource type="Theme" load_steps=27 format=3 uid="uid://co20v1mxv2dfm"]

[ext_resource type="Texture2D" uid="uid://cm0u56vk6gqu3" path="res://main/ui/_icons/toggle1.png" id="1_coee0"]
[ext_resource type="Texture2D" uid="uid://l1h1lwsmjxdv" path="res://main/ui/_icons/icon_circle.png" id="1_mvg4m"]
[ext_resource type="FontFile" uid="uid://b8lxwo5dkwrs4" path="res://main/ui/_theme/font/Poppins-Regular.ttf" id="1_p73bs"]
[ext_resource type="Texture2D" uid="uid://cwrw6b4hfr57h" path="res://main/ui/_icons/icon_circle2.png" id="1_q36yb"]
[ext_resource type="Texture2D" uid="uid://dbcnelrjqy5sr" path="res://main/ui/_icons/toggle2.png" id="2_1j6w3"]
[ext_resource type="Texture2D" uid="uid://du0y3fdwj5xc1" path="res://main/ui/empty.png" id="5_vmfmg"]
[ext_resource type="Texture2D" uid="uid://c27djxlyp41fw" path="res://main/ui/empty_big.png" id="6_5xet3"]

[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_dsk6v"]
bg_color = Color(0.223529, 0.215686, 0.278431, 0.321569)
Expand All @@ -17,6 +18,8 @@ anti_aliasing = false

[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_xa765"]
bg_color = Color(0.313726, 0.313726, 0.360784, 1)
border_width_bottom = 4
border_color = Color(0.223529, 0.215686, 0.278431, 1)
corner_radius_top_left = 4
corner_radius_top_right = 4
corner_radius_bottom_right = 4
Expand Down Expand Up @@ -152,6 +155,10 @@ CheckButton/icons/unchecked = ExtResource("2_1j6w3")
ColorPicker/icons/sample_bg = ExtResource("5_vmfmg")
ColorPickerButton/icons/bg = ExtResource("5_vmfmg")
ColorPickerButton/styles/normal = SubResource("StyleBoxFlat_e4p0n")
HSlider/icons/grabber = ExtResource("6_5xet3")
HSlider/icons/grabber_disabled = ExtResource("6_5xet3")
HSlider/icons/grabber_highlight = ExtResource("6_5xet3")
HSlider/icons/tick = null
MenuButton/styles/hover = SubResource("StyleBoxFlat_11w6c")
OptionButton/font_sizes/font_size = 21
PopupMenu/colors/font_color = Color(1, 1, 1, 1)
Expand Down
Binary file added game/main/ui/empty_big.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://c8x4qb3gijjgs"
path="res://.godot/imported/crystal.png-df106500142a796b9e5a9bbf87dd430a.ctex"
uid="uid://c27djxlyp41fw"
path="res://.godot/imported/empty_big.png-de6f9eea7dbd3b2e592218e41e2ade46.ctex"
metadata={
"vram_texture": false
}

[deps]

source_file="res://main/element_manager/element_material/textures/crystal.png"
dest_files=["res://.godot/imported/crystal.png-df106500142a796b9e5a9bbf87dd430a.ctex"]
source_file="res://main/ui/empty_big.png"
dest_files=["res://.godot/imported/empty_big.png-de6f9eea7dbd3b2e592218e41e2ade46.ctex"]

[params]

Expand Down
60 changes: 57 additions & 3 deletions game/main/ui/submenu/element_editor/ElementEditor.tscn
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
[gd_scene load_steps=26 format=3 uid="uid://bqwqmevgndrm0"]
[gd_scene load_steps=29 format=3 uid="uid://bqwqmevgndrm0"]

[ext_resource type="Theme" uid="uid://co20v1mxv2dfm" path="res://main/ui/_theme/theme.tres" id="1_gu8tf"]
[ext_resource type="Script" path="res://main/ui/submenu/element_editor/element_editor_menu.gd" id="2_ae0hb"]
[ext_resource type="FontFile" uid="uid://b8lxwo5dkwrs4" path="res://main/ui/_theme/font/Poppins-Regular.ttf" id="3_gc23u"]
[ext_resource type="Texture2D" uid="uid://skg5bmd8m812" path="res://main/ui/_icons/close.png" id="4_8lnwy"]
[ext_resource type="Texture2D" uid="uid://c27djxlyp41fw" path="res://main/ui/empty_big.png" id="5_a6efk"]
[ext_resource type="PackedScene" uid="uid://dw3yr1ktgbep0" path="res://main/ui/element_selector/ElementPickerButton.tscn" id="5_d2qg0"]
[ext_resource type="PackedScene" uid="uid://danjqv04qm3f6" path="res://main/ui/element_selector/ElementSelector.tscn" id="7_jk2v0"]

Expand Down Expand Up @@ -109,6 +110,23 @@ expand_margin_top = 5.0
expand_margin_bottom = 5.0
anti_aliasing = false

[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_pfoya"]
bg_color = Color(0.278431, 0.0470588, 0.12549, 1)
border_color = Color(0.28, 0.0476, 0.125067, 1)
corner_radius_top_left = 4
corner_radius_top_right = 4
corner_radius_bottom_right = 4
corner_radius_bottom_left = 4

[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_o53s1"]
bg_color = Color(0.4, 0.088, 0.1088, 1)
border_width_bottom = 4
border_color = Color(0.28, 0.0476, 0.125067, 1)
corner_radius_top_left = 4
corner_radius_top_right = 4
corner_radius_bottom_right = 4
corner_radius_bottom_left = 4

[sub_resource type="Animation" id="Animation_swdin"]
length = 0.001
tracks/0/type = "value"
Expand Down Expand Up @@ -320,7 +338,7 @@ text = "Element Editor"
custom_minimum_size = Vector2(50, 50)
layout_mode = 2
size_flags_horizontal = 8
size_flags_vertical = 0
size_flags_vertical = 8
focus_mode = 0
icon = ExtResource("4_8lnwy")
icon_alignment = 1
Expand All @@ -330,6 +348,7 @@ unique_name_in_owner = true
layout_mode = 2
size_flags_vertical = 3
theme_override_styles/panel = SubResource("StyleBoxEmpty_hcor6")
scroll_vertical = 100
vertical_scroll_mode = 2

[node name="MarginContainer" type="MarginContainer" parent="SettingsContainer/PanelContainer/VBoxContainer/ScrollContainer"]
Expand Down Expand Up @@ -513,9 +532,13 @@ size_flags_horizontal = 3

[node name="Density" type="HSlider" parent="SettingsContainer/PanelContainer/VBoxContainer/ScrollContainer/MarginContainer/VBoxContainer/DensityGrouping/VBoxContainer"]
unique_name_in_owner = true
texture_filter = 1
layout_mode = 2
size_flags_horizontal = 3
size_flags_vertical = 4
focus_mode = 0
theme_override_icons/grabber = ExtResource("5_a6efk")
theme_override_icons/grabber_highlight = ExtResource("5_a6efk")
theme_override_styles/slider = SubResource("StyleBoxFlat_70ulr")
theme_override_styles/grabber_area = SubResource("StyleBoxFlat_o5yxv")
theme_override_styles/grabber_area_highlight = SubResource("StyleBoxFlat_5uj0p")
Expand Down Expand Up @@ -556,6 +579,9 @@ unique_name_in_owner = true
layout_mode = 2
size_flags_horizontal = 3
size_flags_vertical = 4
focus_mode = 0
theme_override_icons/grabber = ExtResource("5_a6efk")
theme_override_icons/grabber_highlight = ExtResource("5_a6efk")
theme_override_styles/slider = SubResource("StyleBoxFlat_70ulr")
theme_override_styles/grabber_area = SubResource("StyleBoxFlat_o5yxv")
theme_override_styles/grabber_area_highlight = SubResource("StyleBoxFlat_5uj0p")
Expand Down Expand Up @@ -596,6 +622,9 @@ unique_name_in_owner = true
layout_mode = 2
size_flags_horizontal = 3
size_flags_vertical = 4
focus_mode = 0
theme_override_icons/grabber = ExtResource("5_a6efk")
theme_override_icons/grabber_highlight = ExtResource("5_a6efk")
theme_override_styles/slider = SubResource("StyleBoxFlat_70ulr")
theme_override_styles/grabber_area = SubResource("StyleBoxFlat_o5yxv")
theme_override_styles/grabber_area_highlight = SubResource("StyleBoxFlat_5uj0p")
Expand Down Expand Up @@ -636,6 +665,9 @@ unique_name_in_owner = true
layout_mode = 2
size_flags_horizontal = 3
size_flags_vertical = 4
focus_mode = 0
theme_override_icons/grabber = ExtResource("5_a6efk")
theme_override_icons/grabber_highlight = ExtResource("5_a6efk")
theme_override_styles/slider = SubResource("StyleBoxFlat_70ulr")
theme_override_styles/grabber_area = SubResource("StyleBoxFlat_o5yxv")
theme_override_styles/grabber_area_highlight = SubResource("StyleBoxFlat_5uj0p")
Expand Down Expand Up @@ -675,6 +707,9 @@ unique_name_in_owner = true
layout_mode = 2
size_flags_horizontal = 3
size_flags_vertical = 4
focus_mode = 0
theme_override_icons/grabber = ExtResource("5_a6efk")
theme_override_icons/grabber_highlight = ExtResource("5_a6efk")
theme_override_styles/slider = SubResource("StyleBoxFlat_70ulr")
theme_override_styles/grabber_area = SubResource("StyleBoxFlat_o5yxv")
theme_override_styles/grabber_area_highlight = SubResource("StyleBoxFlat_5uj0p")
Expand Down Expand Up @@ -715,6 +750,9 @@ unique_name_in_owner = true
layout_mode = 2
size_flags_horizontal = 3
size_flags_vertical = 4
focus_mode = 0
theme_override_icons/grabber = ExtResource("5_a6efk")
theme_override_icons/grabber_highlight = ExtResource("5_a6efk")
theme_override_styles/slider = SubResource("StyleBoxFlat_70ulr")
theme_override_styles/grabber_area = SubResource("StyleBoxFlat_o5yxv")
theme_override_styles/grabber_area_highlight = SubResource("StyleBoxFlat_5uj0p")
Expand Down Expand Up @@ -754,6 +792,9 @@ unique_name_in_owner = true
layout_mode = 2
size_flags_horizontal = 3
size_flags_vertical = 4
focus_mode = 0
theme_override_icons/grabber = ExtResource("5_a6efk")
theme_override_icons/grabber_highlight = ExtResource("5_a6efk")
theme_override_styles/slider = SubResource("StyleBoxFlat_70ulr")
theme_override_styles/grabber_area = SubResource("StyleBoxFlat_o5yxv")
theme_override_styles/grabber_area_highlight = SubResource("StyleBoxFlat_5uj0p")
Expand Down Expand Up @@ -794,6 +835,9 @@ unique_name_in_owner = true
layout_mode = 2
size_flags_horizontal = 3
size_flags_vertical = 4
focus_mode = 0
theme_override_icons/grabber = ExtResource("5_a6efk")
theme_override_icons/grabber_highlight = ExtResource("5_a6efk")
theme_override_styles/slider = SubResource("StyleBoxFlat_70ulr")
theme_override_styles/grabber_area = SubResource("StyleBoxFlat_o5yxv")
theme_override_styles/grabber_area_highlight = SubResource("StyleBoxFlat_5uj0p")
Expand Down Expand Up @@ -1032,11 +1076,21 @@ unique_name_in_owner = true
layout_mode = 2
element_picker = NodePath("../../../../../../../../../ElementPickerContainer/ElementSelector")

[node name="DeleteButton" type="Button" parent="SettingsContainer/PanelContainer/VBoxContainer/ScrollContainer/MarginContainer/VBoxContainer"]
[node name="DeleteButton" type="Button" parent="SettingsContainer/PanelContainer/VBoxContainer/ScrollContainer/MarginContainer/VBoxContainer" groups=["keep_style"]]
unique_name_in_owner = true
layout_mode = 2
focus_mode = 0
theme_override_colors/font_color = Color(1, 1, 1, 1)
theme_override_colors/font_focus_color = Color(1, 1, 1, 1)
theme_override_colors/font_pressed_color = Color(1, 1, 1, 1)
theme_override_colors/font_hover_color = Color(1, 1, 1, 1)
theme_override_colors/font_hover_pressed_color = Color(1, 1, 1, 1)
theme_override_font_sizes/font_size = 21
theme_override_styles/hover_pressed_mirrored = SubResource("StyleBoxFlat_pfoya")
theme_override_styles/hover = SubResource("StyleBoxFlat_o53s1")
theme_override_styles/pressed_mirrored = SubResource("StyleBoxFlat_pfoya")
theme_override_styles/pressed = SubResource("StyleBoxFlat_pfoya")
theme_override_styles/normal = SubResource("StyleBoxFlat_o53s1")
text = "delete element"

[node name="AnimationPlayer" type="AnimationPlayer" parent="."]
Expand Down
Loading

0 comments on commit f34e785

Please sign in to comment.