Ruin0x11 / OpenNefia

(Archived) Moddable engine reimplementation of the Japanese roguelike Elona.
MIT License
116 stars 18 forks source link

Declaratively specify UI widgets instead of needing to call `Gui.add_hud_widget()`/`Gui.add_global_widget()` #362

Open Ruin0x11 opened 3 years ago

Ruin0x11 commented 3 years ago

In general, I find declarative to be better than imperative. The "tag" for each widget can just become its _id.

However, resource consumption also needs to be taken into account. There shouldn't be a need to keep around widgets in memory that are not visible on the screen.