[Scummvm-devel] PS2 #14 : user-friendliness : console specific options : nice
max at quendi.de
Tue Mar 3 00:07:44 CET 2009
Am 02.03.2009 um 01:04 schrieb sunmax at libero.it:
> There are a few things that would be useful for each user
> to fine-tune on their own setup (force PAL or NTSC [*] if
> detection fails, TV size and centering, HD partition
> where games are kept, just to name a few).
> How should we handle them?
> Where do we store them (instead of hard coding like we
> are doing now)?
> How do we let the user change them in an intuitive way?
The idea to handle this was a long time ago to allow backends to add a
backend-specific tab to the global options dialog in the launcher. But
it was never completed.
We can something like that again, though. As a quick and dirty hack,
you could modify gui/options.cpp, and then add a new tab to the
GlobalOptionsDialog: Modify the constructor to add a new tab and
populate it; modify open/close to set the control settings from the
config manager, resp. vice versa. You'd also have to modify the theme
files accordingly, I guess... hm.
A more generic way would be if we allowed to dynamically hook new
stuff into the global options dialog. Like, by providing a new OSystem
API, getOptionsDialogExtras() or so, which returns an instance of a
special class, with methods like these:
init(GlobalOptionsDialog *d) -> add tab(s) and widgets in it etc.
open() -> setup the widgets with data from config man
close() -> read current value of the widgets (only called if "OK"
is used, not upon cancel)
handleCommand() -> to handle button presses
The options dialog would store this object, and invoke its method in
the appropriate places, and finally delete it when it gets deleted
(alternatively, we could add a deinit() method and leave it up to the
backend to delete it, whatever).
More information about the Scummvm-devel