Added KeyConfiguration dialog to classic theme(320 and normal). Updated KeysDialog to follow xml syntax properly.

svn-id: r35416
This commit is contained in:
Lars Persson 2008-12-17 21:19:46 +00:00
parent de0a2f40cd
commit a56af219d9
6 changed files with 117 additions and 11 deletions

View file

@ -39,17 +39,17 @@ enum {
};
KeysDialog::KeysDialog(const Common::String &title)
: GUI::Dialog("keysdialog") {
: GUI::Dialog("KeysDialog") {
new ButtonWidget(this, "keysdialog_map", "Map", kMapCmd, 0);
new ButtonWidget(this, "keysdialog_ok", "OK", kOKCmd, 0);
new ButtonWidget(this, "keysdialog_cancel", "Cancel", kCloseCmd, 0);
new ButtonWidget(this, "KeysDialog.Map", "Map", kMapCmd, 0);
new ButtonWidget(this, "KeysDialog.Ok", "OK", kOKCmd, 0);
new ButtonWidget(this, "KeysDialog.Cancel", "Cancel", kCloseCmd, 0);
_actionsList = new ListWidget(this, "keysdialog_list");
_actionsList = new ListWidget(this, "KeysDialog.List");
_actionsList->setNumberingMode(kListNumberingZero);
_actionTitle = new StaticTextWidget(this, "keysdialog_action", title);
_keyMapping = new StaticTextWidget(this, "keysdialog_mapping", "Select an action and click 'Map'");
_actionTitle = new StaticTextWidget(this, "KeysDialog.Action", title);
_keyMapping = new StaticTextWidget(this, "KeysDialog.Mapping", "Select an action and click 'Map'");
_actionTitle->setFlags(WIDGET_CLEARBG);
_keyMapping->setFlags(WIDGET_CLEARBG);

View file

@ -720,10 +720,6 @@ GlobalOptionsDialog::GlobalOptionsDialog()
#endif
#endif
#ifdef SMALL_SCREEN_DEVICE
new ButtonWidget(tab, "GlobalOptions_Paths.KeysButton", "Keys", kChooseKeyMappingCmd, 0);
#endif
tab->addTab("Misc");
new ButtonWidget(tab, "GlobalOptions_Misc.ThemeButton", "Theme:", kChooseThemeCmd, 0);
@ -743,6 +739,10 @@ GlobalOptionsDialog::GlobalOptionsDialog()
_autosavePeriodPopUp->appendEntry(savePeriodLabels[i], savePeriodValues[i]);
}
#ifdef SMALL_SCREEN_DEVICE
new ButtonWidget(tab, "GlobalOptions_Misc.KeysButton", "Keys", kChooseKeyMappingCmd, 0);
#endif
// TODO: joystick setting

View file

@ -607,6 +607,32 @@
"<widget name='AutosavePeriod' "
"type='PopUp' "
"/> "
"<widget name='KeysButton' "
"type='Button' "
"/> "
"</layout> "
"</dialog> "
"<dialog name='KeysDialog' overlays='Dialog.GlobalOptions' shading='dim'> "
"<layout type='vertical' padding='8,8,8,8' center='true'> "
"<widget name='List'/> "
"<widget name='Action' "
"height='Globals.Line.Height' "
"/> "
"<widget name='Mapping' "
"height='Globals.Line.Height' "
"/> "
"<layout type='horizontal' padding='0,0,16,0'> "
"<widget name='Map' "
"type='Button' "
"/> "
"<space/> "
"<widget name='Cancel' "
"type='Button' "
"/> "
"<widget name='Ok' "
"type='Button' "
"/> "
"</layout> "
"</layout> "
"</dialog> "
"<dialog name='GameOptions' overlays='Dialog.Launcher.GameList' shading='dim'> "
@ -1217,6 +1243,32 @@
"<widget name='AutosavePeriod' "
"type='PopUp' "
"/> "
"<widget name='KeysButton' "
"type='Button' "
"/> "
"</layout> "
"</dialog> "
"<dialog name='KeysDialog' overlays='Dialog.GlobalOptions' shading='dim'> "
"<layout type='vertical' padding='8,8,8,8' center='true'> "
"<widget name='List'/> "
"<widget name='Action' "
"height='Globals.Line.Height' "
"/> "
"<widget name='Mapping' "
"height='Globals.Line.Height' "
"/> "
"<layout type='horizontal' padding='0,0,16,0'> "
"<widget name='Map' "
"type='Button' "
"/> "
"<space/> "
"<widget name='Cancel' "
"type='Button' "
"/> "
"<widget name='Ok' "
"type='Button' "
"/> "
"</layout> "
"</layout> "
"</dialog> "
"<dialog name='GameOptions' overlays='screen' inset='16' shading='dim'> "

Binary file not shown.

View file

@ -341,8 +341,35 @@
<widget name = 'AutosavePeriod'
type = 'PopUp'
/>
<widget name='KeysButton'
type='Button'
/>
</layout>
</dialog>
<dialog name='KeysDialog' overlays='Dialog.GlobalOptions' shading='dim'>
<layout type='vertical' padding='8,8,8,8' center='true'>
<widget name='List'/>
<widget name='Action'
height='Globals.Line.Height'
/>
<widget name='Mapping'
height='Globals.Line.Height'
/>
<layout type='horizontal' padding='0,0,16,0'>
<widget name='Map'
type='Button'
/>
<space/>
<widget name='Cancel'
type='Button'
/>
<widget name='Ok'
type='Button'
/>
</layout>
</layout>
</dialog>
<dialog name = 'GameOptions' overlays = 'Dialog.Launcher.GameList' shading = 'dim'>
<layout type = 'vertical' padding = '0, 0, 0, 0' spacing = '16'>

View file

@ -338,9 +338,36 @@
<widget name = 'AutosavePeriod'
type = 'PopUp'
/>
<widget name='KeysButton'
type='Button'
/>
</layout>
</dialog>
<dialog name='KeysDialog' overlays='Dialog.GlobalOptions' shading='dim'>
<layout type='vertical' padding='8,8,8,8' center='true'>
<widget name='List'/>
<widget name='Action'
height='Globals.Line.Height'
/>
<widget name='Mapping'
height='Globals.Line.Height'
/>
<layout type='horizontal' padding='0,0,16,0'>
<widget name='Map'
type='Button'
/>
<space/>
<widget name='Cancel'
type='Button'
/>
<widget name='Ok'
type='Button'
/>
</layout>
</layout>
</dialog>
<dialog name = 'GameOptions' overlays = 'screen' inset = '16' shading = 'dim'>
<layout type = 'vertical' padding = '0, 0, 0, 0' spacing = '16'>
<widget name = 'TabWidget'/>