diff --git a/locales/en.po b/locales/en.po index 8b6b17d..cf726d8 100644 --- a/locales/en.po +++ b/locales/en.po @@ -307,3 +307,21 @@ msgstr "Nothing" msgid "win_developper" msgstr "Developper" + +msgid "stigi_name" +msgstr "stigi" + +msgid "samayun_name" +msgstr "samayun" + +msgid "zabr_name" +msgstr "zabr" + +msgid "lab_sky_panel" +msgstr "Sky parameters" + +msgid "lab_position" +msgstr "Position" + +msgid "lab_size" +msgstr "Size" diff --git a/locales/fr.po b/locales/fr.po index 462a0dc..0de8ac5 100644 --- a/locales/fr.po +++ b/locales/fr.po @@ -307,3 +307,21 @@ msgstr "Rien n'est sélectionné" msgid "win_developper" msgstr "Développeur" + +msgid "stigi_name" +msgstr "stigi" + +msgid "samayun_name" +msgstr "samayun" + +msgid "zabr_name" +msgstr "zabr" + +msgid "lab_sky_panel" +msgstr "Paramètres célestes" + +msgid "lab_position" +msgstr "Position" + +msgid "lab_size" +msgstr "Taille" diff --git a/locales/messages.mo b/locales/messages.mo index 6862cf4..73b2808 100644 Binary files a/locales/messages.mo and b/locales/messages.mo differ diff --git a/locales/messages.pot b/locales/messages.pot index 103d3b2..cfc4346 100644 --- a/locales/messages.pot +++ b/locales/messages.pot @@ -299,3 +299,20 @@ msgstr "" msgid "win_developper" msgstr "" +msgid "stigi_name" +msgstr "" + +msgid "samayun_name" +msgstr "" + +msgid "zabr_name" +msgstr "" + +msgid "lab_sky_panel" +msgstr "" + +msgid "lab_position" +msgstr "" + +msgid "lab_size" +msgstr "" diff --git a/maps/basic_setup.gd b/maps/basic_setup.gd index 8d099f7..002d99b 100644 --- a/maps/basic_setup.gd +++ b/maps/basic_setup.gd @@ -1,15 +1,15 @@ extends Node3D + # Called when the node enters the scene tree for the first time. func _ready(): - var celestial_positions = get_celestial_position() - print(celestial_positions) + pass # Called every frame. 'delta' is the elapsed time since the previous frame. func _process(delta): pass -func get_celestial_position(): +func get_celestial_coordinates(): var stigi_pos = get_node("WorldEnvironment").environment.sky.sky_material.get_shader_param("stigi_position") var stigi_arc = get_node("WorldEnvironment").environment.sky.sky_material.get_shader_param("stigi_arc") diff --git a/maps/basic_setup.tscn b/maps/basic_setup.tscn index 24d5bb3..9358e56 100644 --- a/maps/basic_setup.tscn +++ b/maps/basic_setup.tscn @@ -1,7 +1,8 @@ -[gd_scene load_steps=24 format=3 uid="uid://b8p2h0rmwy7qn"] +[gd_scene load_steps=25 format=3 uid="uid://b8p2h0rmwy7qn"] [ext_resource type="Material" uid="uid://dpegsmygxcfmv" path="res://maps/materials/basic_ground.material" id="1_lodye"] [ext_resource type="Shader" path="res://maps/shaders/khanat_sky.gdshader" id="1_mheqi"] +[ext_resource type="Script" path="res://maps/basic_setup.gd" id="1_narkk"] [ext_resource type="Texture2D" uid="uid://b5jer2nm17ld" path="res://maps/textures/samayun_tex_001.png" id="1_thm7k"] [ext_resource type="PackedScene" uid="uid://cveshwnu272vf" path="res://maps/objects/ramp-complex.tscn" id="2_4eueh"] [ext_resource type="Texture2D" uid="uid://y0ka7tysfp6b" path="res://maps/textures/zabr_tex_001.png" id="3_bgghj"] @@ -59,6 +60,7 @@ material = ExtResource( "1_lodye" ) data = PackedVector3Array(-0.5, 0.5, 0.5, 0.5, 0.5, 0.5, -0.5, -0.5, 0.5, 0.5, 0.5, 0.5, 0.5, -0.5, 0.5, -0.5, -0.5, 0.5, 0.5, 0.5, -0.5, -0.5, 0.5, -0.5, 0.5, -0.5, -0.5, -0.5, 0.5, -0.5, -0.5, -0.5, -0.5, 0.5, -0.5, -0.5, 0.5, 0.5, 0.5, 0.5, 0.5, -0.5, 0.5, -0.5, 0.5, 0.5, 0.5, -0.5, 0.5, -0.5, -0.5, 0.5, -0.5, 0.5, -0.5, 0.5, -0.5, -0.5, 0.5, 0.5, -0.5, -0.5, -0.5, -0.5, 0.5, 0.5, -0.5, -0.5, 0.5, -0.5, -0.5, -0.5, 0.5, 0.5, 0.5, -0.5, 0.5, 0.5, 0.5, 0.5, -0.5, -0.5, 0.5, 0.5, -0.5, 0.5, -0.5, 0.5, 0.5, -0.5, -0.5, -0.5, 0.5, 0.5, -0.5, 0.5, -0.5, -0.5, -0.5, 0.5, -0.5, 0.5, 0.5, -0.5, -0.5, -0.5, -0.5, -0.5) [node name="basic_setup" type="Node3D"] +script = ExtResource( "1_narkk" ) [node name="sunlight" type="DirectionalLight3D" parent="."] transform = Transform3D(1, 0, 0, 0, 0.278991, 0.960294, 0, -0.960294, 0.278991, -1.75049, 15.9707, 4.39927) diff --git a/scenes/developper/developper.gd b/scenes/developper/developper.gd index ed6211c..aab1323 100644 --- a/scenes/developper/developper.gd +++ b/scenes/developper/developper.gd @@ -2,6 +2,7 @@ extends Control + # Called when the node enters the scene tree for the first time. func _ready(): pass diff --git a/scenes/developper/developper.tscn b/scenes/developper/developper.tscn index 88b5e80..11e2a8b 100644 --- a/scenes/developper/developper.tscn +++ b/scenes/developper/developper.tscn @@ -1,11 +1,12 @@ -[gd_scene load_steps=4 format=3 uid="uid://cua4782cbjhla"] +[gd_scene load_steps=5 format=3 uid="uid://cua4782cbjhla"] [ext_resource type="Script" path="res://scenes/developper/developper.gd" id="1_qf0rd"] [ext_resource type="Texture2D" uid="uid://se0t5xwdxyq7" path="res://scenes/themes/textures/base_panel.png" id="2_fmcto"] [ext_resource type="Theme" uid="uid://bi1js53ni6ehd" path="res://UI/themes/zbasu/zbasu.theme" id="3_ols6l"] +[ext_resource type="Script" path="res://scenes/developper/sky_panel.gd" id="4_b4n1m"] [node name="developper_panel" type="Control"] -minimum_size = Vector2(350, 250) +minimum_size = Vector2(350, 400) anchor_left = 0.5 anchor_top = 0.5 anchor_right = 0.5 @@ -26,7 +27,7 @@ grow_horizontal = 2 grow_vertical = 2 texture = ExtResource( "2_fmcto" ) patch_margin_left = 50 -patch_margin_top = 10 +patch_margin_top = 25 patch_margin_right = 25 patch_margin_bottom = 25 axis_stretch_horizontal = 2 @@ -63,25 +64,166 @@ size_flags_vertical = 3 metadata/_edit_use_custom_anchors = false metadata/_edit_layout_mode = 1 -[node name="VBoxContainer2" type="VBoxContainer" parent="main"] +[node name="sky_panel" type="VBoxContainer" parent="main"] offset_right = 328.0 -offset_bottom = 27.0 +offset_bottom = 296.0 size_flags_vertical = 0 +script = ExtResource( "4_b4n1m" ) -[node name="TabBar" type="TabBar" parent="main/VBoxContainer2"] +[node name="sky_panel" type="Label" parent="main/sky_panel"] offset_right = 328.0 -offset_bottom = 27.0 -theme = ExtResource( "3_ols6l" ) -tab_count = 2 -tab_0/title = "tab_sky" -tab_1/title = "tab_weather" +offset_bottom = 26.0 +size_flags_horizontal = 3 +size_flags_vertical = 3 +text = "lab_sky_panel" + +[node name="stigi_panel" type="VBoxContainer" parent="main/sky_panel"] +offset_top = 30.0 +offset_right = 328.0 +offset_bottom = 116.0 + +[node name="stigi_name" type="Label" parent="main/sky_panel/stigi_panel"] +offset_right = 328.0 +offset_bottom = 26.0 +text = "stigi_name" + +[node name="position_panel" type="HBoxContainer" parent="main/sky_panel/stigi_panel"] +offset_top = 30.0 +offset_right = 328.0 +offset_bottom = 56.0 + +[node name="lab_position" type="Label" parent="main/sky_panel/stigi_panel/position_panel"] +offset_right = 94.0 +offset_bottom = 26.0 +size_flags_horizontal = 0 +text = "lab_position" + +[node name="stigi_pos" type="Label" parent="main/sky_panel/stigi_panel/position_panel"] +offset_left = 98.0 +offset_top = 1.0 +offset_right = 328.0 +offset_bottom = 24.0 +size_flags_horizontal = 3 + +[node name="size_panel" type="HBoxContainer" parent="main/sky_panel/stigi_panel"] +offset_top = 60.0 +offset_right = 328.0 +offset_bottom = 86.0 + +[node name="lab_size" type="Label" parent="main/sky_panel/stigi_panel/size_panel"] +offset_right = 60.0 +offset_bottom = 26.0 +size_flags_horizontal = 0 +text = "lab_size" + +[node name="stigi_arc" type="Label" parent="main/sky_panel/stigi_panel/size_panel"] +offset_left = 64.0 +offset_top = 1.0 +offset_right = 328.0 +offset_bottom = 24.0 +size_flags_horizontal = 3 + +[node name="samayun_panel" type="VBoxContainer" parent="main/sky_panel"] +offset_top = 120.0 +offset_right = 328.0 +offset_bottom = 206.0 + +[node name="samayun_name" type="Label" parent="main/sky_panel/samayun_panel"] +offset_right = 328.0 +offset_bottom = 26.0 +text = "samayun_name" + +[node name="position_panel" type="HBoxContainer" parent="main/sky_panel/samayun_panel"] +offset_top = 30.0 +offset_right = 328.0 +offset_bottom = 56.0 + +[node name="lab_position" type="Label" parent="main/sky_panel/samayun_panel/position_panel"] +offset_right = 94.0 +offset_bottom = 26.0 +size_flags_horizontal = 0 +text = "lab_position" + +[node name="samayun_pos" type="Label" parent="main/sky_panel/samayun_panel/position_panel"] +offset_left = 98.0 +offset_top = 1.0 +offset_right = 328.0 +offset_bottom = 24.0 +size_flags_horizontal = 3 + +[node name="size_panel" type="HBoxContainer" parent="main/sky_panel/samayun_panel"] +offset_top = 60.0 +offset_right = 328.0 +offset_bottom = 86.0 + +[node name="lab_size" type="Label" parent="main/sky_panel/samayun_panel/size_panel"] +offset_right = 60.0 +offset_bottom = 26.0 +size_flags_horizontal = 0 +text = "lab_size" + +[node name="samayun_arc" type="Label" parent="main/sky_panel/samayun_panel/size_panel"] +offset_left = 64.0 +offset_top = 1.0 +offset_right = 328.0 +offset_bottom = 24.0 +size_flags_horizontal = 3 + +[node name="zabr_panel" type="VBoxContainer" parent="main/sky_panel"] +offset_top = 210.0 +offset_right = 328.0 +offset_bottom = 296.0 + +[node name="zabr_name" type="Label" parent="main/sky_panel/zabr_panel"] +offset_right = 328.0 +offset_bottom = 26.0 +text = "zabr_name" + +[node name="position_panel" type="HBoxContainer" parent="main/sky_panel/zabr_panel"] +offset_top = 30.0 +offset_right = 328.0 +offset_bottom = 56.0 + +[node name="lab_position" type="Label" parent="main/sky_panel/zabr_panel/position_panel"] +offset_right = 94.0 +offset_bottom = 26.0 +size_flags_horizontal = 0 +text = "lab_position" + +[node name="zabr_pos" type="Label" parent="main/sky_panel/zabr_panel/position_panel"] +offset_left = 98.0 +offset_top = 1.0 +offset_right = 328.0 +offset_bottom = 24.0 +size_flags_horizontal = 3 + +[node name="size_panel" type="HBoxContainer" parent="main/sky_panel/zabr_panel"] +offset_top = 60.0 +offset_right = 328.0 +offset_bottom = 86.0 + +[node name="lab_size" type="Label" parent="main/sky_panel/zabr_panel/size_panel"] +offset_right = 60.0 +offset_bottom = 26.0 +size_flags_horizontal = 0 +text = "lab_size" + +[node name="zabr_arc" type="Label" parent="main/sky_panel/zabr_panel/size_panel"] +offset_left = 64.0 +offset_top = 1.0 +offset_right = 328.0 +offset_bottom = 24.0 +size_flags_horizontal = 3 [node name="footer" type="VBoxContainer" parent="."] minimum_size = Vector2(0, 30) -offset_left = 3.0 -offset_top = 213.0 -offset_right = 347.0 -offset_bottom = 247.0 +anchor_left = 0.5 +anchor_top = 1.0 +anchor_right = 0.5 +anchor_bottom = 1.0 +offset_left = -172.0 +offset_top = -34.0 +offset_right = 172.0 size_flags_vertical = 10 metadata/_edit_layout_mode = 0 metadata/_edit_use_custom_anchors = false diff --git a/scenes/developper/sky_panel.gd b/scenes/developper/sky_panel.gd new file mode 100644 index 0000000..1f675e2 --- /dev/null +++ b/scenes/developper/sky_panel.gd @@ -0,0 +1,17 @@ +extends VBoxContainer + + +# Called when the node enters the scene tree for the first time. +func _ready(): + var positions = get_parent().get_parent().get_parent().get_parent().get_node("terrain_basic_setup").get_celestial_coordinates() + get_node("stigi_panel/position_panel/stigi_pos").text = str(positions["stigi_pos"]) + get_node("samayun_panel/position_panel/samayun_pos").text = str(positions["samayun_pos"]) + get_node("zabr_panel/position_panel/zabr_pos").text = str(positions["zabr_pos"]) + get_node("stigi_panel/size_panel/stigi_arc").text = str(positions["stigi_arc"]) + get_node("samayun_panel/size_panel/samayun_arc").text = str(positions["samayun_arc"]) + get_node("zabr_panel/size_panel/zabr_arc").text = str(positions["zabr_arc"]) + + +# Called every frame. 'delta' is the elapsed time since the previous frame. +func _process(delta): + pass