diff --git a/game/addons/world_generator/test/test_world.tres b/game/addons/world_generator/test/test_world.tres index c9b6808d..c2e7a1bb 100644 --- a/game/addons/world_generator/test/test_world.tres +++ b/game/addons/world_generator/test/test_world.tres @@ -5,25 +5,25 @@ [sub_resource type="Resource" id=1] script = ExtResource( 2 ) -rect = Rect2( 0, 0, 100, 100 ) +rect = Rect2( 133, 63, 224, 158 ) locked = false zones = [ ] [sub_resource type="Resource" id=2] script = ExtResource( 2 ) -rect = Rect2( 0, 0, 1, 1 ) +rect = Rect2( 107, 271, 100, 49 ) locked = false zones = [ ] [sub_resource type="Resource" id=3] script = ExtResource( 2 ) -rect = Rect2( 0, 0, 1, 1 ) +rect = Rect2( 498, 185, 100, 100 ) locked = false zones = [ ] [sub_resource type="Resource" id=4] script = ExtResource( 2 ) -rect = Rect2( 0, 0, 1, 1 ) +rect = Rect2( 522, 29, 63, 54 ) locked = false zones = [ ] diff --git a/game/addons/world_generator/ui/RectViewNode.gd b/game/addons/world_generator/ui/RectViewNode.gd index d1ef8d87..5b01ed5a 100644 --- a/game/addons/world_generator/ui/RectViewNode.gd +++ b/game/addons/world_generator/ui/RectViewNode.gd @@ -124,6 +124,8 @@ func _gui_input(p_event : InputEvent) -> void: set_size(rect.size) set_position(rect.position) + + edited_resource.set_rect(rect) #based on / ported from engine/scene/gui/dialogs.h and .cpp func _drag_hit_test(pos : Vector2) -> int: