Declarative API for textmenus #84

Open
opened 2022-10-17 16:37:34 +02:00 by kazhnuz · 5 comments
Owner

Add a declarative API for text menus, to be able to declare the complete structure of the menu.

Questions:

  • Definition API ? Argument ?
  • Part of what object ? Handle with a screen ?
  • How to handle passing a functions ? Signal API ? Callbacks ?
    • If callbacks, where ? On the menu itself ?
  • How to handle position ?
  • Put the menu structure in a spearate text file that can be given as argument to a textmenu ?
Add a declarative API for text menus, to be able to declare the complete structure of the menu. Questions: - Definition API ? Argument ? - Part of what object ? Handle with a screen ? - How to handle passing a functions ? Signal API ? Callbacks ? - If callbacks, where ? On the menu itself ? - How to handle position ? - Put the menu structure in a spearate text file that can be given as argument to a textmenu ?
kazhnuz added this to the epervier 0.8.0 (beta 1) milestone 2022-10-17 16:37:34 +02:00
kazhnuz added the
3. Need investigation
1. Feature
2. Deliverable
labels 2022-10-17 16:37:34 +02:00
Author
Owner

Adding function/callback based constructor for submenu might also be important.

Adding function/callback based constructor for submenu might also be important.
Author
Owner

It would be nice to rework every menu to use that kind of API, and not have to create a lot of different widgets. It would also simplify the text menu codebase, as it would just be a meny with a pre-defined widget.

( Or maybe just a list menu where we pass a "text" widget )

It would be nice to rework every menu to use that kind of API, and not have to create a lot of different widgets. It would also simplify the text menu codebase, as it would just be a meny with a pre-defined widget. ( Or maybe just a list menu where we pass a "text" widget )
Author
Owner

Moreover, it would be nice to add good data-binding to the menu, to populate them more easily. The different type of biding we might need are:

  • Binding to a "fixed" list (that could be an argument, a file, etc).
  • Binding to a data set (listing every possible object, etc... also with possible filters)
  • Binding to a data from the save file (maybe with filters ?)
  • Binding to a pre-processed set of data (for instance "the power that Edmund can use")
  • More complicated code-based binding maybe ? (supporting them won't always be a bad idea.

The more complicated is the second-to-last. How to define in the def file that we want to bind a menu to a runtime object ? Maybe a system of "data-providers" might be usefull ? Or maybe this use case can be entirely supported by the previous ones ?

Also, if we want something like "skills available for the currently active character", how we do it ? It's where I feel that the current "data" system isn't quite adequate. This is the same kind of issue we got with the "character screen" in Radiance, where we have horrible hack to handle it.

Handling that well would make creating an RPG way easier, as we could query more easily info from the currently active character, the visible ennemy, etc.

Moreover, it would be nice to add good data-binding to the menu, to populate them more easily. The different type of biding we might need are: - Binding to a "fixed" list (that could be an argument, a file, etc). - Binding to a data set (listing every possible object, etc... also with possible filters) - Binding to a data from the save file (maybe with filters ?) - Binding to a pre-processed set of data (for instance "the power that Edmund can use") - More complicated code-based binding maybe ? (supporting them won't always be a bad idea. The more complicated is the second-to-last. How to define in the def file that we want to bind a menu to a runtime object ? Maybe a system of "data-providers" might be usefull ? Or maybe this use case can be entirely supported by the previous ones ? Also, if we want something like "skills available for the currently active character", how we do it ? It's where I feel that the current "data" system isn't quite adequate. This is the same kind of issue we got with the "character screen" in Radiance, where we have horrible hack to handle it. Handling that well would make creating an RPG way easier, as we could query more easily info from the currently active character, the visible ennemy, etc.
Author
Owner

It needs to be able to reconstruct easily a menu when the data would give another result, without having to query constently said result.

It needs to be able to reconstruct easily a menu when the data would give another result, without having to query constently said result.
kazhnuz modified the milestone from epervier 0.8.0 (beta 1) to epervier 0.7.0 2024-11-22 15:50:16 +01:00
Author
Owner

Will be simply a type of menu

Will be simply a type of menu
Sign in to join this conversation.
No description provided.