Added "Mass Add" dialog.
svn-id: r34802
This commit is contained in:
parent
820a45d851
commit
1c374dcf35
9 changed files with 142 additions and 17 deletions
|
@ -116,10 +116,10 @@ bool XMLParser::parseActiveKey(bool closed) {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (keyCount > 0)
|
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 {
|
} 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.
|
// check if any of the parents must be ignored.
|
||||||
|
|
|
@ -59,7 +59,7 @@ enum {
|
||||||
|
|
||||||
|
|
||||||
MassAddDialog::MassAddDialog(const Common::FSNode &startDir)
|
MassAddDialog::MassAddDialog(const Common::FSNode &startDir)
|
||||||
: Dialog("massadddialog"),
|
: Dialog("MassAdd"),
|
||||||
_dirsScanned(0),
|
_dirsScanned(0),
|
||||||
_okButton(0),
|
_okButton(0),
|
||||||
_dirProgressText(0),
|
_dirProgressText(0),
|
||||||
|
@ -68,27 +68,22 @@ MassAddDialog::MassAddDialog(const Common::FSNode &startDir)
|
||||||
// The dir we start our scan at
|
// The dir we start our scan at
|
||||||
_scanStack.push(startDir);
|
_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
|
_dirProgressText = new StaticTextWidget(this, "MassAdd.DirProgressText",
|
||||||
// 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",
|
|
||||||
"... progress ...");
|
"... progress ...");
|
||||||
|
|
||||||
_gameProgressText = new StaticTextWidget(this, "massadddialog_gameprogress",
|
_gameProgressText = new StaticTextWidget(this, "MassAdd.GameProgressText",
|
||||||
"... progress ...");
|
"... 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);
|
_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
|
// Build a map from all configured game paths to the targets using them
|
||||||
const Common::ConfigManager::DomainMap &domains = ConfMan.getGameDomains();
|
const Common::ConfigManager::DomainMap &domains = ConfMan.getGameDomains();
|
||||||
|
|
|
@ -885,6 +885,27 @@
|
||||||
"</layout> "
|
"</layout> "
|
||||||
"</layout> "
|
"</layout> "
|
||||||
"</dialog> "
|
"</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> "
|
||||||
"<layout_info resolution = '320xY, 256x240'> "
|
"<layout_info resolution = '320xY, 256x240'> "
|
||||||
"<globals> "
|
"<globals> "
|
||||||
|
@ -1459,4 +1480,25 @@
|
||||||
"</layout> "
|
"</layout> "
|
||||||
"</layout> "
|
"</layout> "
|
||||||
"</dialog> "
|
"</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> "
|
"</layout_info> "
|
||||||
|
|
Binary file not shown.
|
@ -632,4 +632,26 @@
|
||||||
</layout>
|
</layout>
|
||||||
</layout>
|
</layout>
|
||||||
</dialog>
|
</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>
|
|
@ -625,4 +625,26 @@
|
||||||
</layout>
|
</layout>
|
||||||
</layout>
|
</layout>
|
||||||
</dialog>
|
</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>
|
</layout_info>
|
Binary file not shown.
|
@ -644,4 +644,26 @@
|
||||||
</layout>
|
</layout>
|
||||||
</layout>
|
</layout>
|
||||||
</dialog>
|
</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>
|
|
@ -622,4 +622,26 @@
|
||||||
</layout>
|
</layout>
|
||||||
</layout>
|
</layout>
|
||||||
</dialog>
|
</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>
|
</layout_info>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue