2024-01-24 18:43:44 +02:00
|
|
|
extends Node3D
|
|
|
|
|
|
|
|
@onready var edit_button = $EditButton
|
|
|
|
@onready var fix_button = $FixButton
|
|
|
|
|
|
|
|
var active = false:
|
|
|
|
set(value):
|
|
|
|
if value:
|
|
|
|
edit_button.label = "save"
|
|
|
|
fix_button.disabled = true
|
|
|
|
fix_button.visible = false
|
|
|
|
else:
|
|
|
|
edit_button.label = "edit"
|
|
|
|
fix_button.disabled = false
|
|
|
|
fix_button.visible = true
|
|
|
|
active = value
|
|
|
|
|
|
|
|
func _ready():
|
|
|
|
|
|
|
|
edit_button.on_button_down.connect(func():
|
|
|
|
if active:
|
2024-05-22 19:38:28 +03:00
|
|
|
App.house.save_reference()
|
2024-01-24 18:43:44 +02:00
|
|
|
else:
|
2024-05-22 19:38:28 +03:00
|
|
|
App.house.edit_reference()
|
|
|
|
active=!active
|
2024-01-24 18:43:44 +02:00
|
|
|
)
|
|
|
|
|
|
|
|
fix_button.on_button_down.connect(func():
|
2024-05-22 19:38:28 +03:00
|
|
|
App.house.fix_reference()
|
|
|
|
active=true
|
2024-01-24 18:43:44 +02:00
|
|
|
)
|