assets | ||
docs | ||
src | ||
.gitignore | ||
BeefProj.toml | ||
BeefSpace.toml | ||
README.md |
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
- Container
- Screen
- Button
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.