mirror of
https://github.com/Relintai/broken_seals.git
synced 2025-04-26 17:44:59 +02:00
Added a class and script property by default to the property inspector.
This commit is contained in:
parent
cfc3bc5ff7
commit
e13be6f3f5
@ -106,7 +106,7 @@ func generate_terra_chunk(chunk: TerraChunk, pseed : int, spawn_mobs: bool) -> v
|
|||||||
_generate_terra_chunk_fallback(chunk, pseed, spawn_mobs)
|
_generate_terra_chunk_fallback(chunk, pseed, spawn_mobs)
|
||||||
return
|
return
|
||||||
|
|
||||||
for i in range(stack.size() - 1, -1, -1):
|
for i in range(stack.size()):
|
||||||
stack[i]._generate_terra_chunk(chunk, pseed, spawn_mobs, stack, i)
|
stack[i]._generate_terra_chunk(chunk, pseed, spawn_mobs, stack, i)
|
||||||
|
|
||||||
func _generate_terra_chunk(chunk: TerraChunk, pseed : int, spawn_mobs: bool, stack : Array, stack_index : int) -> void:
|
func _generate_terra_chunk(chunk: TerraChunk, pseed : int, spawn_mobs: bool, stack : Array, stack_index : int) -> void:
|
||||||
|
@ -348,9 +348,21 @@ func clear() -> void:
|
|||||||
func refresh() -> void:
|
func refresh() -> void:
|
||||||
clear()
|
clear()
|
||||||
|
|
||||||
|
var cls_str : String = "[none]"
|
||||||
|
var script_str : String = "[none]"
|
||||||
|
|
||||||
if _edited_resource:
|
if _edited_resource:
|
||||||
|
cls_str = _edited_resource.get_class()
|
||||||
|
|
||||||
|
var scr = _edited_resource.get_script()
|
||||||
|
|
||||||
|
if scr:
|
||||||
|
script_str = scr.resource_path
|
||||||
|
|
||||||
_edited_resource.setup_property_inspector(self)
|
_edited_resource.setup_property_inspector(self)
|
||||||
|
|
||||||
|
$MainContainer/HBoxContainer/ClassLE.text = cls_str
|
||||||
|
$MainContainer/HBoxContainer2/ScriptLE.text = script_str
|
||||||
|
|
||||||
func edit_resource(wgw) -> void:
|
func edit_resource(wgw) -> void:
|
||||||
if _edited_resource:
|
if _edited_resource:
|
||||||
|
@ -14,7 +14,7 @@ __meta__ = {
|
|||||||
|
|
||||||
[node name="MainContainer" type="VBoxContainer" parent="."]
|
[node name="MainContainer" type="VBoxContainer" parent="."]
|
||||||
margin_right = 1024.0
|
margin_right = 1024.0
|
||||||
margin_bottom = 18.0
|
margin_bottom = 74.0
|
||||||
size_flags_horizontal = 3
|
size_flags_horizontal = 3
|
||||||
|
|
||||||
[node name="Label" type="Label" parent="MainContainer"]
|
[node name="Label" type="Label" parent="MainContainer"]
|
||||||
@ -24,8 +24,48 @@ text = "Properties"
|
|||||||
align = 1
|
align = 1
|
||||||
valign = 1
|
valign = 1
|
||||||
|
|
||||||
[node name="Content" type="VBoxContainer" parent="MainContainer"]
|
[node name="HBoxContainer" type="HBoxContainer" parent="MainContainer"]
|
||||||
margin_top = 18.0
|
margin_top = 18.0
|
||||||
margin_right = 1024.0
|
margin_right = 1024.0
|
||||||
margin_bottom = 18.0
|
margin_bottom = 42.0
|
||||||
|
size_flags_horizontal = 3
|
||||||
|
|
||||||
|
[node name="Label" type="Label" parent="MainContainer/HBoxContainer"]
|
||||||
|
margin_top = 5.0
|
||||||
|
margin_right = 37.0
|
||||||
|
margin_bottom = 19.0
|
||||||
|
text = "Class "
|
||||||
|
valign = 1
|
||||||
|
|
||||||
|
[node name="ClassLE" type="LineEdit" parent="MainContainer/HBoxContainer"]
|
||||||
|
margin_left = 41.0
|
||||||
|
margin_right = 1024.0
|
||||||
|
margin_bottom = 24.0
|
||||||
|
size_flags_horizontal = 3
|
||||||
|
editable = false
|
||||||
|
|
||||||
|
[node name="HBoxContainer2" type="HBoxContainer" parent="MainContainer"]
|
||||||
|
margin_top = 46.0
|
||||||
|
margin_right = 1024.0
|
||||||
|
margin_bottom = 70.0
|
||||||
|
size_flags_horizontal = 3
|
||||||
|
|
||||||
|
[node name="Label" type="Label" parent="MainContainer/HBoxContainer2"]
|
||||||
|
margin_top = 5.0
|
||||||
|
margin_right = 36.0
|
||||||
|
margin_bottom = 19.0
|
||||||
|
text = "Script"
|
||||||
|
valign = 1
|
||||||
|
|
||||||
|
[node name="ScriptLE" type="LineEdit" parent="MainContainer/HBoxContainer2"]
|
||||||
|
margin_left = 40.0
|
||||||
|
margin_right = 1024.0
|
||||||
|
margin_bottom = 24.0
|
||||||
|
size_flags_horizontal = 3
|
||||||
|
editable = false
|
||||||
|
|
||||||
|
[node name="Content" type="VBoxContainer" parent="MainContainer"]
|
||||||
|
margin_top = 74.0
|
||||||
|
margin_right = 1024.0
|
||||||
|
margin_bottom = 74.0
|
||||||
size_flags_horizontal = 3
|
size_flags_horizontal = 3
|
||||||
|
Loading…
Reference in New Issue
Block a user