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
ASCIIpOrtal does make use of a lot of different "screens" to ensure user interaction (e.g. selecting map pack, showing the menu).
The way it is done for now (drawing everything in the same curses window, the root one) is not very convenient, because:
it involves crazy calculations to display text at the right place
it does not allow parts of the screen to be refreshed as-needed (e.g call the in-game menu, use "Select level", and press to go back to the menu: the small "Choose a level" window does not disappear and becomes part of the background picture)
The right way to do things would be to use a differentcurses window each time we need this kind of interaction. For this, we obviously need a layer of abstraction.
Maybe make use of a library (a small "windows manager" in curses) or write it ourselves. What we basically need is a stack that contains windows: the top window is the one that is displayed to the user, and when it exits, we refresh the underlying windows (from the deepest window, up to the "surface"). It would also be nice to have a bit of logic to handle user input (yes/no, cancel, chose amongst a list of options), as there is a lot of code duplication for now.
If you have any idea or suggestion, feel free to contribute :)
The text was updated successfully, but these errors were encountered:
ASCIIpOrtal does make use of a lot of different "screens" to ensure user interaction (e.g. selecting map pack, showing the menu).
The way it is done for now (drawing everything in the same curses window, the root one) is not very convenient, because:
The right way to do things would be to use a different curses window each time we need this kind of interaction. For this, we obviously need a layer of abstraction.
Maybe make use of a library (a small "windows manager" in curses) or write it ourselves. What we basically need is a stack that contains windows: the top window is the one that is displayed to the user, and when it exits, we refresh the underlying windows (from the deepest window, up to the "surface"). It would also be nice to have a bit of logic to handle user input (yes/no, cancel, chose amongst a list of options), as there is a lot of code duplication for now.
If you have any idea or suggestion, feel free to contribute :)
The text was updated successfully, but these errors were encountered: