MartinHowarth / shimmer

Create games in python, without hassle - batteries included!

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Create free form box layout definition

MartinHowarth opened this issue · comments

Allows definition based layout of boxes (in arbitrary ways rather than just rows and columns). Also add an edit mode where users can drag boxes and it prints out the new layout definition?

See also #60

Something like this?

Alignment = Tuple[HorizontalAlignment, VerticalAlignment, inside: bool, spacing: bool]
# inside is a bool - if True then box is placed inside parent according to alignment, otherwise placed outside of parent bounds

Box.add_child_with_alignment(child, alignment)

and

Box.add_sibling_with_alignment(sibling, alignment)

Fixed by #84