Closed Assemberist closed 1 year ago
As mentioned in https://github.com/Assemberist/cppRpg/issues/17 menu class can be changed to template class.
That has been done.
Or handling of different classes can be moved from classes.
I mean that several print() functions can be implemented for one class, but it looks bad and the logic is complicate. Also this variant was discarded due to one type of elements require only one print().
Class text_field should not use game-related classes. So new file created that use as text_filed as game classes. Class menu rewritten as templated. And it is abstract base class for all menus.
Wrong id was in last 2-3 commits. It should be #19.
There is several types of menu class. They handle different data types by different ways. As mentioned in #17 menu class can be changed to template class. Or handling of different classes can be moved from classes. I guess second way is better because new state is planned for observation mode and it can require to handle menu as associated array.
New structure can use more memory or actions because it is interface.