Hide some buttons from the mapping dock
This commit is contained in:
parent
aed8b58954
commit
5d9a6e6bcf
3 changed files with 59 additions and 0 deletions
|
@ -3,6 +3,9 @@ extends Control
|
||||||
|
|
||||||
func _process(_delta):
|
func _process(_delta):
|
||||||
update_layer_number()
|
update_layer_number()
|
||||||
|
var expanded = is_scene_expanded(get_scene())
|
||||||
|
$VBoxContainer/Minify.visible = expanded
|
||||||
|
$VBoxContainer/Expand.visible = !expanded
|
||||||
|
|
||||||
func _on_new_pressed():
|
func _on_new_pressed():
|
||||||
var dialog = EditorFileDialog.new()
|
var dialog = EditorFileDialog.new()
|
||||||
|
|
|
@ -42,6 +42,7 @@ icon = ExtResource("3_iorsj")
|
||||||
expand_icon = true
|
expand_icon = true
|
||||||
|
|
||||||
[node name="Minify" type="Button" parent="VBoxContainer"]
|
[node name="Minify" type="Button" parent="VBoxContainer"]
|
||||||
|
visible = false
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
tooltip_text = "Removes editor-only elements from the map."
|
tooltip_text = "Removes editor-only elements from the map."
|
||||||
text = "Minify map"
|
text = "Minify map"
|
||||||
|
@ -85,6 +86,7 @@ icon = ExtResource("4_ie2iw")
|
||||||
expand_icon = true
|
expand_icon = true
|
||||||
|
|
||||||
[node name="Update" type="Button" parent="VBoxContainer"]
|
[node name="Update" type="Button" parent="VBoxContainer"]
|
||||||
|
visible = false
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
text = "Update projected map"
|
text = "Update projected map"
|
||||||
icon = ExtResource("8_aph12")
|
icon = ExtResource("8_aph12")
|
||||||
|
|
54
test.tscn
Normal file
54
test.tscn
Normal file
|
@ -0,0 +1,54 @@
|
||||||
|
[gd_scene load_steps=8 format=4 uid="uid://bo6kr5a4d2w63"]
|
||||||
|
|
||||||
|
[ext_resource type="TileSet" uid="uid://coub5ioem1v7o" path="res://Assets/tileset.tres" id="1_fso1u"]
|
||||||
|
[ext_resource type="Shader" path="res://Assets/Editor/Project.gdshader" id="2_004uw"]
|
||||||
|
[ext_resource type="Texture2D" uid="uid://773fvksy2hdp" path="res://Assets/Editor/voronoi-cube.png" id="3_q6ftp"]
|
||||||
|
|
||||||
|
[sub_resource type="ViewportTexture" id="ViewportTexture_4uckl"]
|
||||||
|
viewport_path = NodePath("ProjectionViewport")
|
||||||
|
|
||||||
|
[sub_resource type="ShaderMaterial" id="ShaderMaterial_5cr1a"]
|
||||||
|
render_priority = 0
|
||||||
|
shader = ExtResource("2_004uw")
|
||||||
|
shader_parameter/scale = Vector2(5, 6)
|
||||||
|
shader_parameter/offset = Vector2(1, 2)
|
||||||
|
shader_parameter/tilemap_camera = SubResource("ViewportTexture_4uckl")
|
||||||
|
|
||||||
|
[sub_resource type="BoxMesh" id="BoxMesh_o31w4"]
|
||||||
|
material = SubResource("ShaderMaterial_5cr1a")
|
||||||
|
|
||||||
|
[sub_resource type="MeshLibrary" id="MeshLibrary_uhodc"]
|
||||||
|
item/0/name = "Full Cube"
|
||||||
|
item/0/mesh = SubResource("BoxMesh_o31w4")
|
||||||
|
item/0/mesh_transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0)
|
||||||
|
item/0/shapes = []
|
||||||
|
item/0/navigation_mesh_transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0)
|
||||||
|
item/0/navigation_layers = 1
|
||||||
|
item/0/preview = ExtResource("3_q6ftp")
|
||||||
|
|
||||||
|
[node name="test" type="Node2D"]
|
||||||
|
metadata/_edit_lock_ = true
|
||||||
|
metadata/_edit_group_ = true
|
||||||
|
|
||||||
|
[node name="NotMinified" type="Node" parent="."]
|
||||||
|
|
||||||
|
[node name="TileMap" type="Node2D" parent="."]
|
||||||
|
metadata/_edit_lock_ = true
|
||||||
|
|
||||||
|
[node name="TileMap Layer 1" type="TileMapLayer" parent="TileMap"]
|
||||||
|
tile_map_data = PackedByteArray("AAAAAAAAAgAAAAAAAAABAAAAAgAAAAAAAAACAAAAAAAAAAAAAAACAAEAAAAAAAAAAAADAAEAAAAAAAAAAAADAAIAAAAAAAAAAAACAAIAAAAAAAAAAAACAAMAAAAAAAAAAAABAAMAAAAAAAAAAAAAAAMAAAAAAAAAAAAAAAIAAQAAAAAAAAD//wIAAAAAAAAAAAD//wEAAAAAAAAAAAD//wAAAAAAAAAAAAD/////AAAAAAAAAAAAAP//AwAAAAAAAAAAAP7/AAAAAAAAAAABAP7/AAAAAAAAAAACAP//AAAAAAAAAAADAP//AAAAAAAAAAADAAAAAAAAAAAAAAABAAIAAQAAAAAAAAAAAAEAAQAAAAAAAAABAP//AwAAAAAAAAABAAEAAQAAAAAAAAA=")
|
||||||
|
tile_set = ExtResource("1_fso1u")
|
||||||
|
metadata/_edit_lock_ = true
|
||||||
|
|
||||||
|
[node name="HeightMap" type="GridMap" parent="."]
|
||||||
|
mesh_library = SubResource("MeshLibrary_uhodc")
|
||||||
|
cell_size = Vector3(1, 1, 1)
|
||||||
|
data = {
|
||||||
|
"cells": PackedInt32Array(-65536, 0, 0, -65535, 0, 0, -65534, 0, 0, -65534, 1, 0, -65533, 1, 0, -65533, 2, 0, -65534, 2, 0, -65534, 3, 0, -65535, 3, 0, -65536, 3, 0, -65536, 2, 0, -1, 2, 0, -1, 1, 0, -1, 0, 0, -1, 65535, 0, -65536, 65535, 0, -65536, 65534, 0, -65535, 65534, 0, -65534, 65535, 0, -65533, 65535, 0, -65533, 0, 0, -65535, 2, 0, -65536, 1, 0, -65535, 65535, 0, -65535, 1, 0, 1, 1, 0, 0, 1, 0, 0, 2, 0, 1, 2, 0, 65537, 1, 0, 65536, 1, 0, 65536, 2, 0, 65537, 2, 0)
|
||||||
|
}
|
||||||
|
metadata/_edit_lock_ = true
|
||||||
|
metadata/_editor_floor_ = Vector3(0, 1, 0)
|
||||||
|
|
||||||
|
[node name="ProjectionViewport" type="SubViewport" parent="."]
|
||||||
|
disable_3d = true
|
||||||
|
size = Vector2i(640, 768)
|
Loading…
Add table
Reference in a new issue