- removed unneeded imports to reduce the dumb amount of warnings from the compiler
- added a bounds check in frame.rs to avoid a panic when a frame tries to render a character out of bounds, instead returning an error
it works.
the input function is working now, passing it a reference to your root gui widget and a reference to it's own widget and a function to check if it should exit works now
gg
gui library works frrr
implementation:
- containers now store a Widget type.
- every widget has a unique id
- there is a data store that maps the id to the internally stored gui component.
- the compoenents can be fetched from the datastore using their Widget type
- the datastore uses a hashmap so fetching shouldnt have any real performance penalty.
- widgets can be fetched, inserted, updated and rendered from the datastore
- the render method can be called directly from the Widget type without having to know the underlying type that it references
updated grapher to use new widtgets system (not working yet but close)
made a basic app using the widgets system
implemented CgTextEdit for CgLineEdit (now fully working, but there may be bugs so i'll address them tomorrow)
- implemented CgStatusBar widget which is a specific version of the CgIndicatorBar widget with predefined fields
- std::io::Screen is now an enum that makes switching between display modes more intuitive
- created a basic CgLineEdit implementation that allows for a user to type in a character and have it re-render that widget
- other more minor changes like fixes for existing apps to work with new features