scummvm/scummvm — pull request #168 by bluegr (2012-01-11 19:27:33+00:00)
Title: Per-engine and per-game GUI options

This pull request adds per-engine and per-game GUI options to the GUI "Add game" and "Edit game" dialogs.

Here's some highlights:
- Engines can provide their own custom options, which can vary depending on the target name
- All options are added in a new tab, "Engine", which only appears if there are any custom options to show
- All options are checkboxes

The global custom options dialog is not done in this pull request, as this requires a scroll list where the
widgets can be included. Once this functionality is added, it'll be a matter of querying all of the compiled
plugins for global game options (i.e. without supplying game IDs).

The missing functionality above means that up to 10 options can be added per engine/game, but this
shouldn't be a big issue (no game has more than 10 custom options right now).

Also, the flow layout used for the widgets is vertical, and is adapted to fit up to 10 options in a 320x200
screen.

Some per-engine and per-game options for the SCI engine have been added in this pull request, and
other engines can be added later on.

TODO:
- Global game options
- A more dynamic widget layout
- Currently, only checkboxes can be used. Perhaps it could be feasible to add other widget types too,
but engines needing such functionality are few (e.g. kyra has a walkspeed setting, sword2 a
gfx_details setting and t7g a t7g_speed setting). Checkboxes cover the majority of the custom engine
options.