Working on developper panel UI
This commit is contained in:
parent
e8cddd9bb6
commit
ed7a0b6f2c
2 changed files with 65 additions and 114 deletions
|
@ -6,7 +6,7 @@
|
|||
[ext_resource type="Script" path="res://scenes/developper/sky_panel.gd" id="4_b4n1m"]
|
||||
|
||||
[node name="developper_panel" type="Control"]
|
||||
minimum_size = Vector2(350, 400)
|
||||
minimum_size = Vector2(350, 450)
|
||||
anchor_left = 0.5
|
||||
anchor_top = 0.5
|
||||
anchor_right = 0.5
|
||||
|
@ -53,10 +53,10 @@ text = "win_developper"
|
|||
[node name="main" type="VBoxContainer" parent="."]
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
offset_left = 5.0
|
||||
offset_left = 12.0
|
||||
offset_top = 33.0
|
||||
offset_right = -17.0
|
||||
offset_bottom = -11.0
|
||||
offset_right = -10.0
|
||||
offset_bottom = -37.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
size_flags_horizontal = 3
|
||||
|
@ -66,8 +66,7 @@ metadata/_edit_layout_mode = 1
|
|||
|
||||
[node name="sky_panel" type="VBoxContainer" parent="main"]
|
||||
offset_right = 328.0
|
||||
offset_bottom = 296.0
|
||||
size_flags_vertical = 0
|
||||
offset_bottom = 206.0
|
||||
script = ExtResource( "4_b4n1m" )
|
||||
|
||||
[node name="sky_panel" type="Label" parent="main/sky_panel"]
|
||||
|
@ -77,143 +76,100 @@ size_flags_horizontal = 3
|
|||
size_flags_vertical = 3
|
||||
text = "lab_sky_panel"
|
||||
|
||||
[node name="stigi_panel" type="VBoxContainer" parent="main/sky_panel"]
|
||||
[node name="samayun_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
|
||||
size_flags_vertical = 3
|
||||
|
||||
[node name="samayun_name" type="Label" parent="main/sky_panel/samayun_panel"]
|
||||
offset_right = 328.0
|
||||
offset_bottom = 26.0
|
||||
text = "samayun_name"
|
||||
horizontal_alignment = 1
|
||||
|
||||
[node name="position_panel" type="HBoxContainer" parent="main/sky_panel/samayun_panel"]
|
||||
[node name="data_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
|
||||
[node name="samayun_pos" type="Label" parent="main/sky_panel/samayun_panel/data_panel"]
|
||||
offset_right = 162.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
|
||||
text = "samayun_pos"
|
||||
|
||||
[node name="size_panel" type="HBoxContainer" parent="main/sky_panel/samayun_panel"]
|
||||
offset_top = 60.0
|
||||
[node name="samayun_arc" type="Label" parent="main/sky_panel/samayun_panel/data_panel"]
|
||||
offset_left = 166.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
|
||||
size_flags_vertical = 0
|
||||
text = "samayun_arc"
|
||||
|
||||
[node name="zabr_panel" type="VBoxContainer" parent="main/sky_panel"]
|
||||
offset_top = 210.0
|
||||
offset_top = 90.0
|
||||
offset_right = 328.0
|
||||
offset_bottom = 296.0
|
||||
offset_bottom = 146.0
|
||||
size_flags_vertical = 3
|
||||
|
||||
[node name="zabr_name" type="Label" parent="main/sky_panel/zabr_panel"]
|
||||
offset_right = 328.0
|
||||
offset_bottom = 26.0
|
||||
text = "zabr_name"
|
||||
horizontal_alignment = 1
|
||||
|
||||
[node name="position_panel" type="HBoxContainer" parent="main/sky_panel/zabr_panel"]
|
||||
[node name="data_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
|
||||
[node name="zabr_pos" type="Label" parent="main/sky_panel/zabr_panel/data_panel"]
|
||||
offset_right = 162.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
|
||||
text = "zabr_pos
|
||||
"
|
||||
|
||||
[node name="size_panel" type="HBoxContainer" parent="main/sky_panel/zabr_panel"]
|
||||
offset_top = 60.0
|
||||
[node name="zabr_arc" type="Label" parent="main/sky_panel/zabr_panel/data_panel"]
|
||||
offset_left = 166.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
|
||||
size_flags_vertical = 0
|
||||
text = "zabr_arc"
|
||||
|
||||
[node name="stigi_panel" type="VBoxContainer" parent="main/sky_panel"]
|
||||
offset_top = 150.0
|
||||
offset_right = 328.0
|
||||
offset_bottom = 206.0
|
||||
size_flags_vertical = 3
|
||||
|
||||
[node name="stigi_name" type="Label" parent="main/sky_panel/stigi_panel"]
|
||||
offset_right = 328.0
|
||||
offset_bottom = 26.0
|
||||
text = "stigi_name"
|
||||
horizontal_alignment = 1
|
||||
|
||||
[node name="data_panel" type="HBoxContainer" parent="main/sky_panel/stigi_panel"]
|
||||
offset_top = 30.0
|
||||
offset_right = 328.0
|
||||
offset_bottom = 56.0
|
||||
|
||||
[node name="stigi_pos" type="Label" parent="main/sky_panel/stigi_panel/data_panel"]
|
||||
offset_right = 162.0
|
||||
offset_bottom = 26.0
|
||||
size_flags_horizontal = 3
|
||||
text = "stigi_pos"
|
||||
|
||||
[node name="stigi_arc" type="Label" parent="main/sky_panel/stigi_panel/data_panel"]
|
||||
offset_left = 166.0
|
||||
offset_right = 328.0
|
||||
offset_bottom = 26.0
|
||||
size_flags_horizontal = 3
|
||||
size_flags_vertical = 0
|
||||
text = "stigi_arc"
|
||||
|
||||
[node name="footer" type="VBoxContainer" parent="."]
|
||||
minimum_size = Vector2(0, 30)
|
||||
|
|
|
@ -1,17 +1,12 @@
|
|||
extends VBoxContainer
|
||||
|
||||
|
||||
# Called when the node enters the scene tree for the first time.
|
||||
func _ready():
|
||||
# Get the initial positions of celestial objects from shader paramaters
|
||||
# to display them in proper panel
|
||||
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"])
|
||||
for planet in ["stigi", "zabr","samayun"]:
|
||||
get_node("%s_panel/data_panel/%s_pos" %[planet, planet]).text = "%s :\n - X %2f\n - Y %2f\n - Z %2f" % [tr("lab_position"), positions["%s_pos" %[planet]][0], positions["%s_pos" %[planet]][1], positions["%s_pos" %[planet]][2]]
|
||||
get_node("%s_panel/data_panel/%s_arc" %[planet, planet]).text = "%s : %s" % [tr("lab_size"), positions["%s_arc" %[planet]]]
|
||||
|
||||
|
||||
# Called every frame. 'delta' is the elapsed time since the previous frame.
|
||||
func _process(delta):
|
||||
pass
|
||||
|
|
Loading…
Reference in a new issue