Setup basic GUI and scanner selection

This commit was merged in pull request #4.
This commit is contained in:
2024-08-31 17:13:07 +02:00
parent ee46a240c2
commit 5f8052f0a3
13 changed files with 288 additions and 28 deletions

38
scenes/Gui.tscn Normal file
View File

@@ -0,0 +1,38 @@
[gd_scene load_steps=5 format=3 uid="uid://dha8pa1les53a"]
[ext_resource type="Script" path="res://scripts/gui.gd" id="1_6gq27"]
[ext_resource type="PackedScene" uid="uid://bm8nlb7kmaa6k" path="res://objects/gui/Seed_queue.tscn" id="1_lh8u1"]
[ext_resource type="PackedScene" uid="uid://iaf4md4cbwqh" path="res://objects/gui/Seed_card.tscn" id="2_bt3vo"]
[ext_resource type="PackedScene" uid="uid://0so4tpnkk8t2" path="res://objects/gui/Scanner_modes.tscn" id="3_bsm7r"]
[node name="Gui" type="Control"]
layout_mode = 3
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
script = ExtResource("1_6gq27")
[node name="MarginContainer" type="MarginContainer" parent="."]
layout_mode = 1
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
theme_override_constants/margin_left = 20
theme_override_constants/margin_top = 20
theme_override_constants/margin_right = 20
theme_override_constants/margin_bottom = 20
[node name="SeedQueue" parent="MarginContainer" instance=ExtResource("1_lh8u1")]
layout_mode = 2
[node name="SeedCard" parent="MarginContainer" instance=ExtResource("2_bt3vo")]
layout_mode = 2
[node name="ScannerModes" parent="MarginContainer" instance=ExtResource("3_bsm7r")]
layout_mode = 2
[connection signal="scanner_selected" from="MarginContainer/ScannerModes" to="." method="_on_scanner_modes_scanner_selected"]

9
scenes/Map.tscn Normal file
View File

@@ -0,0 +1,9 @@
[gd_scene load_steps=3 format=3 uid="uid://d3hul8b7hlmj7"]
[ext_resource type="Script" path="res://scripts/map.gd" id="1_3np0o"]
[ext_resource type="PackedScene" uid="uid://6ferubyu2uy1" path="res://scenes/Scanners.tscn" id="1_6mlj0"]
[node name="Map" type="Node2D"]
script = ExtResource("1_3np0o")
[node name="Scanners" parent="." instance=ExtResource("1_6mlj0")]

View File

@@ -1,19 +1,18 @@
[gd_scene load_steps=8 format=3 uid="uid://6ferubyu2uy1"]
[gd_scene load_steps=9 format=3 uid="uid://6ferubyu2uy1"]
[ext_resource type="Script" path="res://scripts/scanners.gd" id="1_orxwo"]
[ext_resource type="Shader" path="res://scripts/shaders/Scanner.gdshader" id="2_8t6wf"]
[ext_resource type="Texture2D" uid="uid://be2uusaqcpcpd" path="res://assets/gradients/Fertility.tres" id="3_bt6q7"]
[sub_resource type="Gradient" id="Gradient_pafyk"]
offsets = PackedFloat32Array(0, 0.22549, 0.51634, 0.813725, 1)
colors = PackedColorArray(0.66677, 0.166288, 0, 1, 0.41, 0.328, 0, 1, 0, 0, 0, 1, 0, 0.592306, 0, 1, 0, 0.964706, 0.580392, 1)
[sub_resource type="GradientTexture1D" id="GradientTexture1D_mpkd3"]
gradient = SubResource("Gradient_pafyk")
[sub_resource type="ShaderMaterial" id="ShaderMaterial_yl6st"]
[sub_resource type="ShaderMaterial" id="ShaderMaterial_05bn7"]
shader = ExtResource("2_8t6wf")
shader_parameter/dimension = 1
shader_parameter/gradient = SubResource("GradientTexture1D_mpkd3")
shader_parameter/gradient = ExtResource("3_bt6q7")
[sub_resource type="ShaderMaterial" id="ShaderMaterial_lpu5x"]
shader = ExtResource("2_8t6wf")
shader_parameter/dimension = 0
shader_parameter/gradient = ExtResource("3_bt6q7")
[sub_resource type="Gradient" id="Gradient_sc8ss"]
interpolation_mode = 1
@@ -25,6 +24,11 @@ gradient = SubResource("Gradient_sc8ss")
fill_from = Vector2(0, 1)
fill_to = Vector2(1, 1)
[sub_resource type="ShaderMaterial" id="ShaderMaterial_0lkln"]
shader = ExtResource("2_8t6wf")
shader_parameter/dimension = 2
shader_parameter/gradient = ExtResource("3_bt6q7")
[node name="Scanners" type="Node2D"]
script = ExtResource("1_orxwo")
@@ -34,11 +38,17 @@ centered = false
[node name="Fertility" type="Sprite2D" parent="."]
visible = false
material = SubResource("ShaderMaterial_yl6st")
material = SubResource("ShaderMaterial_05bn7")
centered = false
[node name="Water" type="Sprite2D" parent="."]
visible = false
material = SubResource("ShaderMaterial_yl6st")
material = SubResource("ShaderMaterial_lpu5x")
texture = SubResource("GradientTexture2D_a7oi7")
centered = false
[node name="Presence" type="Sprite2D" parent="."]
visible = false
material = SubResource("ShaderMaterial_0lkln")
texture = SubResource("GradientTexture2D_a7oi7")
centered = false