1
0
Fork 0
mirror of https://github.com/Orama-Interactive/Pixelorama.git synced 2025-01-18 17:19:50 +00:00

Use an anchor and offset preset for the CollapsibleContainer's texture rect

This commit is contained in:
Emmanouil Papadeas 2024-10-15 16:31:04 +03:00
parent 4561c1fee4
commit 1ae34bf57a

View file

@ -33,12 +33,9 @@ func _ready() -> void:
_button.mouse_default_cursor_shape = Control.CURSOR_POINTING_HAND _button.mouse_default_cursor_shape = Control.CURSOR_POINTING_HAND
_button.toggled.connect(set_visible_children) _button.toggled.connect(set_visible_children)
add_child(_button, false, Node.INTERNAL_MODE_FRONT) add_child(_button, false, Node.INTERNAL_MODE_FRONT)
_texture_rect.anchor_top = 0.5 _texture_rect.set_anchors_and_offsets_preset(
_texture_rect.anchor_bottom = 0.5 Control.PRESET_CENTER_LEFT, Control.PRESET_MODE_MINSIZE
_texture_rect.offset_left = 2 )
_texture_rect.offset_top = -6
_texture_rect.offset_right = 14
_texture_rect.offset_bottom = 6
_texture_rect.rotation_degrees = -90 _texture_rect.rotation_degrees = -90
_texture_rect.pivot_offset = Vector2(6, 6) _texture_rect.pivot_offset = Vector2(6, 6)
_texture_rect.add_to_group("UIButtons") _texture_rect.add_to_group("UIButtons")