Merge branch 'main' of ssh://code.booklordofthe.dev:2003/Theater/TheaterGui
This commit is contained in:
commit
5a37276fa5
1 changed files with 3 additions and 21 deletions
24
README.md
24
README.md
|
@ -1,23 +1,5 @@
|
|||
# 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
|
||||
# TheaterGui - *A simple ui library*
|
||||
|
||||
### Components
|
||||
- Container
|
||||
- Screen
|
||||
- [Button](docs/Button.md)
|
||||
__Visit the wiki tab to get information on how to get started or on how this library works internally__
|
||||
|
||||
### 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.
|
||||

|
Loading…
Add table
Reference in a new issue