Issue #2 open

Modal Dialogs

Jason McKesson
repo owner created an issue

The code for making modeless dialogs would work for modeless. But modal dialogs have a lot of specialized code for getting values, putting those values in the right places, etc. This is vital for a modeless dialog, but not for a modal one.

Instead, what we can do is pass a modal dialog a Lua table. The keys in the table are ids of controls, and the values represent the initial state/data of those controls. When the dialog is closed, the values of the struct are set to the values entered.

This would also make it possible to have range controls and such.

If you don't pass a table, it simply initializes all of the fields with nothing, and passes back a table of control ids and data.

Comments (2)

  1. Jason McKesson reporter

    This is mostly complete in changelist 19: da804a8ca880. Features missing:

    - Bounds or other forms of data checking.

    - Getting data from controls without a table (automatic filling in of data). You currently must pass in a table.

  2. Log in to comment