mirror of
https://github.com/Relintai/broken_seals.git
synced 2024-11-13 20:47:19 +01:00
25 lines
427 B
GDScript
25 lines
427 B
GDScript
tool
|
|
extends MarginContainer
|
|
|
|
var edited_resource : WorldGenBaseResource = null
|
|
|
|
func _draw():
|
|
draw_rect(Rect2(get_position(), get_size()), Color(1, 1, 1, 1))
|
|
|
|
func refresh() -> void:
|
|
if !edited_resource:
|
|
return
|
|
|
|
var rect : Rect2 = edited_resource.get_rect()
|
|
|
|
rect_position = rect.position
|
|
rect_size = rect.size
|
|
|
|
update()
|
|
|
|
func set_edited_resource(res : WorldGenBaseResource):
|
|
edited_resource = res
|
|
|
|
refresh()
|
|
|