You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It would be good to move towards the MVC (Model View Controller) pattern for the UI to make the code a bit cleaner. At the moment classes like the EpubList and EpubReader have everything in them with some of the controller code in the main.cpp as well.
Ideally, we'd have a model class that contains the state, a controller class that responds to user events and updates the model and then a view class that renders the current state of the model.
User Event (touch, button_press) -> Controller -> Model Update -> View Rendered
This will be a fairly chunky refactor.
The text was updated successfully, but these errors were encountered:
The thing is that of course to use that will add a lot of code and reduce our own space to code. But the benefit is that it has that what you describe, kind of Model-View with ready made UX elements and also allows you to make Buttons that are directly attached to callback functions (With much more events, like onPress, onRelease, etc)
This is just a pointer and idea so you try it out and maybe just get some ideas from Lvgl.
It would be good to move towards the MVC (Model View Controller) pattern for the UI to make the code a bit cleaner. At the moment classes like the EpubList and EpubReader have everything in them with some of the controller code in the main.cpp as well.
Ideally, we'd have a model class that contains the state, a controller class that responds to user events and updates the model and then a view class that renders the current state of the model.
User Event (touch, button_press) -> Controller -> Model Update -> View Rendered
This will be a fairly chunky refactor.
The text was updated successfully, but these errors were encountered: