Work On UI
- Theme - Main Menu
This commit is contained in:
parent
5f90ff5d5c
commit
da639880b5
6 changed files with 4528 additions and 100 deletions
4419
Assets/Base.tres
Normal file
4419
Assets/Base.tres
Normal file
File diff suppressed because one or more lines are too long
BIN
Assets/joystix monospace.otf
Normal file
BIN
Assets/joystix monospace.otf
Normal file
Binary file not shown.
33
Assets/joystix monospace.otf.import
Normal file
33
Assets/joystix monospace.otf.import
Normal file
|
@ -0,0 +1,33 @@
|
|||
[remap]
|
||||
|
||||
importer="font_data_dynamic"
|
||||
type="FontFile"
|
||||
uid="uid://bc1t8vh4eym4q"
|
||||
path="res://.godot/imported/joystix monospace.otf-efcfed741360efa0393f5edcae146f12.fontdata"
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://Assets/joystix monospace.otf"
|
||||
dest_files=["res://.godot/imported/joystix monospace.otf-efcfed741360efa0393f5edcae146f12.fontdata"]
|
||||
|
||||
[params]
|
||||
|
||||
Rendering=null
|
||||
antialiasing=1
|
||||
generate_mipmaps=false
|
||||
multichannel_signed_distance_field=false
|
||||
msdf_pixel_range=8
|
||||
msdf_size=48
|
||||
allow_system_fallback=true
|
||||
force_autohinter=false
|
||||
hinting=1
|
||||
subpixel_positioning=1
|
||||
oversampling=0.0
|
||||
Fallbacks=null
|
||||
fallbacks=[]
|
||||
Compress=null
|
||||
compress=true
|
||||
preload=[]
|
||||
language_support={}
|
||||
script_support={}
|
||||
opentype_features={}
|
100
Scene/Game.tscn
100
Scene/Game.tscn
|
@ -1,9 +1,8 @@
|
|||
[gd_scene load_steps=6 format=3 uid="uid://drs4bhpd3vrh2"]
|
||||
[gd_scene load_steps=5 format=3 uid="uid://drs4bhpd3vrh2"]
|
||||
|
||||
[ext_resource type="Script" path="res://Scripts/GameManager.gd" id="1_lps27"]
|
||||
[ext_resource type="Texture2D" uid="uid://vv33w22kwgpc" path="res://Assets/tile.png" id="2_wiemx"]
|
||||
[ext_resource type="Script" path="res://Scripts/TileColors.gd" id="3_gnesl"]
|
||||
[ext_resource type="Script" path="res://Scripts/UI/SliderLabel.gd" id="4_7lfe4"]
|
||||
|
||||
[sub_resource type="Resource" id="Resource_22g0s"]
|
||||
script = ExtResource("3_gnesl")
|
||||
|
@ -24,100 +23,3 @@ gaps = 5
|
|||
tile_color = SubResource("Resource_22g0s")
|
||||
|
||||
[node name="Camera2D" type="Camera2D" parent="."]
|
||||
|
||||
[node name="HBoxContainer" type="HBoxContainer" parent="."]
|
||||
anchors_preset = 8
|
||||
anchor_left = 0.5
|
||||
anchor_top = 0.5
|
||||
anchor_right = 0.5
|
||||
anchor_bottom = 0.5
|
||||
offset_left = -117.5
|
||||
offset_top = -104.5
|
||||
offset_right = 117.5
|
||||
offset_bottom = 104.5
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
size_flags_horizontal = 3
|
||||
size_flags_vertical = 3
|
||||
|
||||
[node name="Buttons" type="VBoxContainer" parent="HBoxContainer"]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
theme_override_constants/separation = 8
|
||||
|
||||
[node name="PanelContainer" type="PanelContainer" parent="HBoxContainer/Buttons"]
|
||||
layout_mode = 2
|
||||
|
||||
[node name="Resume" type="Button" parent="HBoxContainer/Buttons"]
|
||||
layout_mode = 2
|
||||
text = "Resume"
|
||||
|
||||
[node name="Restart" type="Button" parent="HBoxContainer/Buttons"]
|
||||
layout_mode = 2
|
||||
text = "Restart"
|
||||
|
||||
[node name="Quit" type="Button" parent="HBoxContainer/Buttons"]
|
||||
layout_mode = 2
|
||||
text = "Quit"
|
||||
|
||||
[node name="Sliders" type="VBoxContainer" parent="HBoxContainer"]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
theme_override_constants/separation = -1
|
||||
|
||||
[node name="Grid Size" type="VBoxContainer" parent="HBoxContainer/Sliders"]
|
||||
layout_mode = 2
|
||||
size_flags_vertical = 4
|
||||
theme_override_constants/separation = -12
|
||||
|
||||
[node name="Label" type="Label" parent="HBoxContainer/Sliders/Grid Size"]
|
||||
layout_mode = 2
|
||||
text = "Grid Size"
|
||||
horizontal_alignment = 1
|
||||
|
||||
[node name="HBoxContainer" type="HBoxContainer" parent="HBoxContainer/Sliders/Grid Size"]
|
||||
layout_mode = 2
|
||||
|
||||
[node name="HSlider" type="HSlider" parent="HBoxContainer/Sliders/Grid Size/HBoxContainer"]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
size_flags_vertical = 4
|
||||
min_value = 5.0
|
||||
max_value = 32.0
|
||||
value = 5.0
|
||||
|
||||
[node name="Count" type="Label" parent="HBoxContainer/Sliders/Grid Size/HBoxContainer" node_paths=PackedStringArray("slider")]
|
||||
layout_mode = 2
|
||||
text = "12"
|
||||
vertical_alignment = 1
|
||||
script = ExtResource("4_7lfe4")
|
||||
slider = NodePath("../HSlider")
|
||||
|
||||
[node name="Speed" type="VBoxContainer" parent="HBoxContainer/Sliders"]
|
||||
layout_mode = 2
|
||||
size_flags_vertical = 4
|
||||
theme_override_constants/separation = -12
|
||||
|
||||
[node name="Label" type="Label" parent="HBoxContainer/Sliders/Speed"]
|
||||
layout_mode = 2
|
||||
text = "Speed
|
||||
"
|
||||
horizontal_alignment = 1
|
||||
|
||||
[node name="HBoxContainer" type="HBoxContainer" parent="HBoxContainer/Sliders/Speed"]
|
||||
layout_mode = 2
|
||||
|
||||
[node name="HSlider" type="HSlider" parent="HBoxContainer/Sliders/Speed/HBoxContainer"]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
size_flags_vertical = 4
|
||||
min_value = 1.0
|
||||
max_value = 10.0
|
||||
value = 1.0
|
||||
|
||||
[node name="Count" type="Label" parent="HBoxContainer/Sliders/Speed/HBoxContainer" node_paths=PackedStringArray("slider")]
|
||||
layout_mode = 2
|
||||
text = "12"
|
||||
vertical_alignment = 1
|
||||
script = ExtResource("4_7lfe4")
|
||||
slider = NodePath("../HSlider")
|
||||
|
|
73
Scene/Main Menu.tscn
Normal file
73
Scene/Main Menu.tscn
Normal file
|
@ -0,0 +1,73 @@
|
|||
[gd_scene load_steps=2 format=3 uid="uid://gn5or2td1tmd"]
|
||||
|
||||
[ext_resource type="Theme" uid="uid://clkt54a4wy6tn" path="res://Assets/Base.tres" id="1_b1d2h"]
|
||||
|
||||
[node name="Control" type="Control"]
|
||||
layout_mode = 3
|
||||
anchors_preset = 15
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
|
||||
[node name="ColorRect" type="ColorRect" parent="."]
|
||||
layout_mode = 1
|
||||
anchors_preset = 15
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
theme = ExtResource("1_b1d2h")
|
||||
color = Color(0.262745, 0.321569, 0.239216, 1)
|
||||
|
||||
[node name="MarginContainer" type="MarginContainer" parent="."]
|
||||
layout_mode = 1
|
||||
anchors_preset = 15
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
offset_left = 144.0
|
||||
offset_top = 48.0
|
||||
offset_right = -144.0
|
||||
offset_bottom = -165.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
|
||||
[node name="VBoxContainer" type="VBoxContainer" parent="MarginContainer"]
|
||||
layout_mode = 2
|
||||
|
||||
[node name="Title" type="Label" parent="MarginContainer/VBoxContainer"]
|
||||
layout_mode = 2
|
||||
size_flags_vertical = 2
|
||||
theme = ExtResource("1_b1d2h")
|
||||
theme_override_font_sizes/font_size = 128
|
||||
text = "Snake"
|
||||
horizontal_alignment = 1
|
||||
vertical_alignment = 1
|
||||
|
||||
[node name="Menu Butons" type="VBoxContainer" parent="MarginContainer/VBoxContainer"]
|
||||
layout_mode = 2
|
||||
|
||||
[node name="Button" type="Button" parent="MarginContainer/VBoxContainer/Menu Butons"]
|
||||
layout_mode = 2
|
||||
theme = ExtResource("1_b1d2h")
|
||||
theme_override_font_sizes/font_size = 96
|
||||
text = "Start"
|
||||
|
||||
[node name="Button2" type="Button" parent="MarginContainer/VBoxContainer/Menu Butons"]
|
||||
layout_mode = 2
|
||||
theme = ExtResource("1_b1d2h")
|
||||
theme_override_font_sizes/font_size = 96
|
||||
text = "Settings"
|
||||
|
||||
[node name="Button3" type="Button" parent="MarginContainer/VBoxContainer/Menu Butons"]
|
||||
layout_mode = 2
|
||||
theme = ExtResource("1_b1d2h")
|
||||
theme_override_font_sizes/font_size = 96
|
||||
text = "About
|
||||
"
|
||||
|
||||
[node name="Button4" type="Button" parent="MarginContainer/VBoxContainer/Menu Butons"]
|
||||
layout_mode = 2
|
||||
theme = ExtResource("1_b1d2h")
|
||||
theme_override_font_sizes/font_size = 96
|
||||
text = "Quit"
|
|
@ -19,7 +19,8 @@ config/icon="res://icon.svg"
|
|||
|
||||
window/size/viewport_width=1920
|
||||
window/size/viewport_height=1080
|
||||
window/stretch/aspect="keep_width"
|
||||
window/stretch/mode="viewport"
|
||||
window/stretch/aspect="expand"
|
||||
|
||||
[input]
|
||||
|
||||
|
|
Loading…
Reference in a new issue