Extract into update_minify_button
This commit is contained in:
parent
5d9a6e6bcf
commit
1784176d24
1 changed files with 6 additions and 3 deletions
|
@ -3,9 +3,7 @@ extends Control
|
|||
|
||||
func _process(_delta):
|
||||
update_layer_number()
|
||||
var expanded = is_scene_expanded(get_scene())
|
||||
$VBoxContainer/Minify.visible = expanded
|
||||
$VBoxContainer/Expand.visible = !expanded
|
||||
update_minify_button()
|
||||
|
||||
func _on_new_pressed():
|
||||
var dialog = EditorFileDialog.new()
|
||||
|
@ -95,6 +93,11 @@ func _on_create_baseplate_pressed():
|
|||
for cell in map.get_used_cells():
|
||||
heightmap.set_cell_item(Vector3i(cell.x, -1, cell.y), cube)
|
||||
|
||||
func update_minify_button():
|
||||
var expanded = is_scene_expanded(get_scene())
|
||||
$VBoxContainer/Minify.visible = expanded
|
||||
$VBoxContainer/Expand.visible = !expanded
|
||||
|
||||
func move_up_or_down(direction: int):
|
||||
var selection = EditorInterface.get_selection().get_selected_nodes()
|
||||
if len(selection) != 1: return await error_not_editing_tilemap()
|
||||
|
|
Loading…
Add table
Reference in a new issue