Simple library to create graphical user interfaces
Find a file
2024-06-15 23:26:23 +02:00
assets Finished dropdowns and added basic right click behaviour 2024-06-15 23:26:23 +02:00
docs example image 2024-06-07 18:47:05 +02:00
src Finished dropdowns and added basic right click behaviour 2024-06-15 23:26:23 +02:00
.gitignore Initial commit 2024-05-12 11:45:38 +02:00
BeefProj.toml implemented basic window and letterboxing 2024-05-12 13:06:45 +02:00
BeefSpace.toml implemented basic window and letterboxing 2024-05-12 13:06:45 +02:00
README.md Update README.md 2024-06-07 18:45:29 +02:00

TheaterGui A simple ui library

Tg is inspired by Winforms, so most components require their own new classes, generated by the "New File" functionality of BeefIDE

Components

Layouting

Tg uses a layouting system thats partially inspired by HTML, though its significantly less powerful but easier to implement and to grasp.
All components are put next to their immidiate left neighbor.
If an object would overflow outside of the view width, it will instead be forced down onto the next row. Calling EndRow() manually will also force components into the next row.
The vertical position of the next row is determined by the height of the largest component in the row above, so that they never overlap.
If the screen height is larger than the view it will scroll.
Containers are a component, that can be used for more complicated layouts.
A container grows to fits its children but is still treated like a normal components.
So if part of your layout needs to be vertical you would put it inside of a container and then add the container normally Every component also has a Margin property, to make things look better.

Whenever a component changes its size, the app will need to reorder its layout to fit everything.
App.ForceReorder() Is used for that. Most components will call it themselves if their size changes If you want to change alot of sizes at once consider turning of App.AllowReorder and then manually call App.ForceReorder() after you are done to decrease useless reorders.