Added "Mass Add" dialog.

svn-id: r34802
This commit is contained in:
Vicent Marti 2008-10-14 17:53:52 +00:00
parent 820a45d851
commit 1c374dcf35
9 changed files with 142 additions and 17 deletions

View file

@ -116,10 +116,10 @@ bool XMLParser::parseActiveKey(bool closed) {
}
if (keyCount > 0)
return parserError("Unhandled property inside key '%s': '%s'", key->name.c_str(), localMap.begin()->_key.c_str());
return parserError("Unhandled property inside key '%s'.", key->name.c_str());
} else {
return parserError("Unexpected key in the active scope: '%s'.", key->name.c_str());
return parserError("Unexpected key in the active scope ('%s').", key->name.c_str());
}
// check if any of the parents must be ignored.

View file

@ -59,7 +59,7 @@ enum {
MassAddDialog::MassAddDialog(const Common::FSNode &startDir)
: Dialog("massadddialog"),
: Dialog("MassAdd"),
_dirsScanned(0),
_okButton(0),
_dirProgressText(0),
@ -68,27 +68,22 @@ MassAddDialog::MassAddDialog(const Common::FSNode &startDir)
// The dir we start our scan at
_scanStack.push(startDir);
// Removed for now... Why would you put a title on mass add dialog called "Mass Add Dialog"?
// new StaticTextWidget(this, "massadddialog_caption", "Mass Add Dialog");
// Create dialog items
// We need:
// - "OK" button, only enabled after the scan has finished
// - "Cancel" / "Abort" button, always active
// - static text as headline for the dialog
// - static text displaying the progress text
// - (future) a listbox showing all the games we added/are going to add
new StaticTextWidget(this, "massadddialog_caption", "Mass Add Dialog");
_dirProgressText = new StaticTextWidget(this, "massadddialog_dirprogress",
_dirProgressText = new StaticTextWidget(this, "MassAdd.DirProgressText",
"... progress ...");
_gameProgressText = new StaticTextWidget(this, "massadddialog_gameprogress",
_gameProgressText = new StaticTextWidget(this, "MassAdd.GameProgressText",
"... progress ...");
_dirProgressText->setAlign(Graphics::kTextAlignCenter);
_gameProgressText->setAlign(Graphics::kTextAlignCenter);
_okButton = new ButtonWidget(this, "massadddialog_ok", "OK", kOkCmd, Common::ASCII_RETURN);
_okButton = new ButtonWidget(this, "MassAdd.Ok", "OK", kOkCmd, Common::ASCII_RETURN);
_okButton->setEnabled(false);
new ButtonWidget(this, "massadddialog_cancel", "Cancel", kCancelCmd, Common::ASCII_ESCAPE);
new ButtonWidget(this, "MassAdd.Cancel", "Cancel", kCancelCmd, Common::ASCII_ESCAPE);
// Build a map from all configured game paths to the targets using them
const Common::ConfigManager::DomainMap &domains = ConfMan.getGameDomains();

View file

@ -885,6 +885,27 @@
"</layout> "
"</layout> "
"</dialog> "
"<dialog name = 'MassAdd' overlays = 'screen_center' shading = 'dim'> "
"<layout type = 'vertical' padding = '8, 8, 32, 8' center = 'true'> "
"<widget name = 'DirProgressText' "
"width = '250' "
"height = 'Globals.Line.Height' "
"/> "
"<widget name = 'GameProgressText' "
"width = '250' "
"height = 'Globals.Line.Height' "
"/> "
"<space size = '32' /> "
"<layout type = 'horizontal' padding = '8, 8, 8, 8'> "
"<widget name = 'Ok' "
"type = 'Button' "
"/> "
"<widget name = 'Cancel' "
"type = 'Button' "
"/> "
"</layout> "
"</layout> "
"</dialog> "
"</layout_info> "
"<layout_info resolution = '320xY, 256x240'> "
"<globals> "
@ -1459,4 +1480,25 @@
"</layout> "
"</layout> "
"</dialog> "
"<dialog name = 'MassAdd' overlays = 'screen_center' shading = 'dim'> "
"<layout type = 'vertical' padding = '4, 4, 16, 4' center = 'true'> "
"<widget name = 'DirProgressText' "
"width = '240' "
"height = 'Globals.Line.Height' "
"/> "
"<widget name = 'GameProgressText' "
"width = '240' "
"height = 'Globals.Line.Height' "
"/> "
"<space size = '16' /> "
"<layout type = 'horizontal' padding = '4, 4, 4, 4'> "
"<widget name = 'Ok' "
"type = 'Button' "
"/> "
"<widget name = 'Cancel' "
"type = 'Button' "
"/> "
"</layout> "
"</layout> "
"</dialog> "
"</layout_info> "

Binary file not shown.

View file

@ -632,4 +632,26 @@
</layout>
</layout>
</dialog>
<dialog name = 'MassAdd' overlays = 'screen_center' shading = 'dim'>
<layout type = 'vertical' padding = '8, 8, 32, 8' center = 'true'>
<widget name = 'DirProgressText'
width = '250'
height = 'Globals.Line.Height'
/>
<widget name = 'GameProgressText'
width = '250'
height = 'Globals.Line.Height'
/>
<space size = '32' />
<layout type = 'horizontal' padding = '8, 8, 8, 8'>
<widget name = 'Ok'
type = 'Button'
/>
<widget name = 'Cancel'
type = 'Button'
/>
</layout>
</layout>
</dialog>
</layout_info>

View file

@ -625,4 +625,26 @@
</layout>
</layout>
</dialog>
<dialog name = 'MassAdd' overlays = 'screen_center' shading = 'dim'>
<layout type = 'vertical' padding = '4, 4, 16, 4' center = 'true'>
<widget name = 'DirProgressText'
width = '240'
height = 'Globals.Line.Height'
/>
<widget name = 'GameProgressText'
width = '240'
height = 'Globals.Line.Height'
/>
<space size = '16' />
<layout type = 'horizontal' padding = '4, 4, 4, 4'>
<widget name = 'Ok'
type = 'Button'
/>
<widget name = 'Cancel'
type = 'Button'
/>
</layout>
</layout>
</dialog>
</layout_info>

Binary file not shown.

View file

@ -644,4 +644,26 @@
</layout>
</layout>
</dialog>
<dialog name = 'MassAdd' overlays = 'screen_center' shading = 'dim'>
<layout type = 'vertical' padding = '8, 8, 32, 8' center = 'true'>
<widget name = 'DirProgressText'
width = '250'
height = 'Globals.Line.Height'
/>
<widget name = 'GameProgressText'
width = '250'
height = 'Globals.Line.Height'
/>
<space size = '32' />
<layout type = 'horizontal' padding = '8, 8, 8, 8'>
<widget name = 'Ok'
type = 'Button'
/>
<widget name = 'Cancel'
type = 'Button'
/>
</layout>
</layout>
</dialog>
</layout_info>

View file

@ -622,4 +622,26 @@
</layout>
</layout>
</dialog>
<dialog name = 'MassAdd' overlays = 'screen_center' shading = 'dim'>
<layout type = 'vertical' padding = '4, 4, 16, 4' center = 'true'>
<widget name = 'DirProgressText'
width = '240'
height = 'Globals.Line.Height'
/>
<widget name = 'GameProgressText'
width = '240'
height = 'Globals.Line.Height'
/>
<space size = '16' />
<layout type = 'horizontal' padding = '4, 4, 4, 4'>
<widget name = 'Ok'
type = 'Button'
/>
<widget name = 'Cancel'
type = 'Button'
/>
</layout>
</layout>
</dialog>
</layout_info>