scummvm/scummvm — pull request #169 by bluegr (2012-01-12 16:00:30+00:00)
Title: Per-engine and per-game GUI options (version 2)

This is a squashed version of pull request 168:
https://github.com/scummvm/scummvm/pull/168

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 7 options can be added per engine/game, but this
shouldn't be a big issue (no game has more than 7 custom options right now) - 7 because that's how many fit
on screen with the classic theme at 320x200.

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.