Added Clear button for search box. Looks a bit off, but we do not yet have
skinned buttons. svn-id: r41355
This commit is contained in:
parent
6dd009c153
commit
eb4f887ec3
9 changed files with 79 additions and 0 deletions
|
@ -66,6 +66,7 @@ enum {
|
||||||
kQuitCmd = 'QUIT',
|
kQuitCmd = 'QUIT',
|
||||||
kSearchCmd = 'SRCH',
|
kSearchCmd = 'SRCH',
|
||||||
kListSearchCmd = 'LSSR',
|
kListSearchCmd = 'LSSR',
|
||||||
|
kSearchClearCmd = 'SRCL',
|
||||||
|
|
||||||
kCmdGlobalGraphicsOverride = 'OGFX',
|
kCmdGlobalGraphicsOverride = 'OGFX',
|
||||||
kCmdGlobalAudioOverride = 'OSFX',
|
kCmdGlobalAudioOverride = 'OSFX',
|
||||||
|
@ -524,6 +525,7 @@ LauncherDialog::LauncherDialog()
|
||||||
_searchDesc = new StaticTextWidget(this, "Launcher.SearchDesc", "Search:");
|
_searchDesc = new StaticTextWidget(this, "Launcher.SearchDesc", "Search:");
|
||||||
|
|
||||||
_searchWidget = new EditTextWidget(this, "Launcher.Search", _search, kSearchCmd);
|
_searchWidget = new EditTextWidget(this, "Launcher.Search", _search, kSearchCmd);
|
||||||
|
_searchClearButton = new ButtonWidget(this, "Launcher.SearchClearButton", "C", kSearchClearCmd, 0);
|
||||||
|
|
||||||
// Add list with game titles
|
// Add list with game titles
|
||||||
_list = new ListWidget(this, "Launcher.GameList", kListSearchCmd);
|
_list = new ListWidget(this, "Launcher.GameList", kListSearchCmd);
|
||||||
|
@ -936,6 +938,10 @@ void LauncherDialog::handleCommand(CommandSender *sender, uint32 cmd, uint32 dat
|
||||||
case kSearchCmd:
|
case kSearchCmd:
|
||||||
_list->setFilter(_searchWidget->getEditString());
|
_list->setFilter(_searchWidget->getEditString());
|
||||||
break;
|
break;
|
||||||
|
case kSearchClearCmd:
|
||||||
|
_searchWidget->setEditString("");
|
||||||
|
_list->setFilter("");
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
Dialog::handleCommand(sender, cmd, data);
|
Dialog::handleCommand(sender, cmd, data);
|
||||||
}
|
}
|
||||||
|
|
|
@ -63,6 +63,7 @@ protected:
|
||||||
GraphicsWidget *_searchPic;
|
GraphicsWidget *_searchPic;
|
||||||
#endif
|
#endif
|
||||||
StaticTextWidget *_searchDesc;
|
StaticTextWidget *_searchDesc;
|
||||||
|
ButtonWidget *_searchClearButton;
|
||||||
StringList _domains;
|
StringList _domains;
|
||||||
BrowserDialog *_browser;
|
BrowserDialog *_browser;
|
||||||
SaveLoadChooser *_loadDialog;
|
SaveLoadChooser *_loadDialog;
|
||||||
|
|
|
@ -334,6 +334,9 @@
|
||||||
"<def var='ShowGlobalMenuLogo' value='0'/> "
|
"<def var='ShowGlobalMenuLogo' value='0'/> "
|
||||||
"<def var='ShowSearchPic' value='0'/> "
|
"<def var='ShowSearchPic' value='0'/> "
|
||||||
"<def var='ScummSaveLoad.ExtInfo.Visible' value='1'/> "
|
"<def var='ScummSaveLoad.ExtInfo.Visible' value='1'/> "
|
||||||
|
"<def var='KeyRemapper.Spacing' value='10'/> "
|
||||||
|
"<def var='KeyRemapper.LabelWidth' value='100'/> "
|
||||||
|
"<def var='KeyRemapper.ButtonWidth' value='80'/> "
|
||||||
"<widget name='OptionsLabel' "
|
"<widget name='OptionsLabel' "
|
||||||
"size='110,Globals.Line.Height' "
|
"size='110,Globals.Line.Height' "
|
||||||
"textalign='right' "
|
"textalign='right' "
|
||||||
|
@ -395,6 +398,10 @@
|
||||||
"width='150' "
|
"width='150' "
|
||||||
"height='Globals.Line.Height' "
|
"height='Globals.Line.Height' "
|
||||||
"/> "
|
"/> "
|
||||||
|
"<widget name='SearchClearButton' "
|
||||||
|
"height='Globals.Line.Height' "
|
||||||
|
"width='Globals.Line.Height' "
|
||||||
|
"/> "
|
||||||
"<space /> "
|
"<space /> "
|
||||||
"</layout> "
|
"</layout> "
|
||||||
"<widget name='GameList'/> "
|
"<widget name='GameList'/> "
|
||||||
|
@ -1048,6 +1055,27 @@
|
||||||
"</layout> "
|
"</layout> "
|
||||||
"</layout> "
|
"</layout> "
|
||||||
"</dialog> "
|
"</dialog> "
|
||||||
|
"<dialog name='KeyRemapper' overlays='screen_center' shading='dim'> "
|
||||||
|
"<layout type='vertical' padding='8,8,32,8' spacing='10' center='true'> "
|
||||||
|
"<layout type='horizontal' padding='0,0,0,0' spacing='10' center='true'> "
|
||||||
|
"<widget name='PopupDesc' "
|
||||||
|
"type='OptionsLabel' "
|
||||||
|
"/> "
|
||||||
|
"<widget name='Popup' "
|
||||||
|
"type='PopUp' "
|
||||||
|
"width='400' "
|
||||||
|
"height='Globals.Line.Height' "
|
||||||
|
"/> "
|
||||||
|
"</layout> "
|
||||||
|
"<widget name='KeymapArea' "
|
||||||
|
"width='600' "
|
||||||
|
"height='280' "
|
||||||
|
"/> "
|
||||||
|
"<widget name='Close' "
|
||||||
|
"type='Button' "
|
||||||
|
"/> "
|
||||||
|
"</layout> "
|
||||||
|
"</dialog> "
|
||||||
"</layout_info> "
|
"</layout_info> "
|
||||||
"<layout_info resolution='320xY,256x240,Xx272'> "
|
"<layout_info resolution='320xY,256x240,Xx272'> "
|
||||||
"<globals> "
|
"<globals> "
|
||||||
|
@ -1059,6 +1087,9 @@
|
||||||
"<def var='ShowGlobalMenuLogo' value='0'/> "
|
"<def var='ShowGlobalMenuLogo' value='0'/> "
|
||||||
"<def var='ShowSearchPic' value='0'/> "
|
"<def var='ShowSearchPic' value='0'/> "
|
||||||
"<def var='ScummSaveLoad.ExtInfo.Visible' value='0'/> "
|
"<def var='ScummSaveLoad.ExtInfo.Visible' value='0'/> "
|
||||||
|
"<def var='KeyRemapper.Spacing' value='5'/> "
|
||||||
|
"<def var='KeyRemapper.LabelWidth' value='80'/> "
|
||||||
|
"<def var='KeyRemapper.ButtonWidth' value='60'/> "
|
||||||
"<widget name='Button' "
|
"<widget name='Button' "
|
||||||
"size='72,16' "
|
"size='72,16' "
|
||||||
"/> "
|
"/> "
|
||||||
|
@ -1117,6 +1148,10 @@
|
||||||
"width='150' "
|
"width='150' "
|
||||||
"height='Globals.Line.Height' "
|
"height='Globals.Line.Height' "
|
||||||
"/> "
|
"/> "
|
||||||
|
"<widget name='SearchClearButton' "
|
||||||
|
"height='Globals.Line.Height' "
|
||||||
|
"width='Globals.Line.Height' "
|
||||||
|
"/> "
|
||||||
"<space /> "
|
"<space /> "
|
||||||
"</layout> "
|
"</layout> "
|
||||||
"<widget name='GameList'/> "
|
"<widget name='GameList'/> "
|
||||||
|
@ -1777,4 +1812,25 @@
|
||||||
"</layout> "
|
"</layout> "
|
||||||
"</layout> "
|
"</layout> "
|
||||||
"</dialog> "
|
"</dialog> "
|
||||||
|
"<dialog name='KeyRemapper' overlays='screen_center' shading='dim'> "
|
||||||
|
"<layout type='vertical' padding='8,8,8,8' spacing='10' center='true'> "
|
||||||
|
"<layout type='horizontal' padding='0,0,0,0' spacing='10' center='true'> "
|
||||||
|
"<widget name='PopupDesc' "
|
||||||
|
"type='OptionsLabel' "
|
||||||
|
"/> "
|
||||||
|
"<widget name='Popup' "
|
||||||
|
"type='PopUp' "
|
||||||
|
"width='150' "
|
||||||
|
"height='Globals.Line.Height' "
|
||||||
|
"/> "
|
||||||
|
"</layout> "
|
||||||
|
"<widget name='KeymapArea' "
|
||||||
|
"width='300' "
|
||||||
|
"height='120' "
|
||||||
|
"/> "
|
||||||
|
"<widget name='Close' "
|
||||||
|
"type='Button' "
|
||||||
|
"/> "
|
||||||
|
"</layout> "
|
||||||
|
"</dialog> "
|
||||||
"</layout_info> "
|
"</layout_info> "
|
||||||
|
|
Binary file not shown.
|
@ -106,6 +106,10 @@
|
||||||
width = '150'
|
width = '150'
|
||||||
height = 'Globals.Line.Height'
|
height = 'Globals.Line.Height'
|
||||||
/>
|
/>
|
||||||
|
<widget name = 'SearchClearButton'
|
||||||
|
height = 'Globals.Line.Height'
|
||||||
|
width = 'Globals.Line.Height'
|
||||||
|
/>
|
||||||
<space />
|
<space />
|
||||||
</layout>
|
</layout>
|
||||||
<widget name = 'GameList'/>
|
<widget name = 'GameList'/>
|
||||||
|
|
|
@ -103,6 +103,10 @@
|
||||||
width = '150'
|
width = '150'
|
||||||
height = 'Globals.Line.Height'
|
height = 'Globals.Line.Height'
|
||||||
/>
|
/>
|
||||||
|
<widget name = 'SearchClearButton'
|
||||||
|
height = 'Globals.Line.Height'
|
||||||
|
width = 'Globals.Line.Height'
|
||||||
|
/>
|
||||||
<space />
|
<space />
|
||||||
</layout>
|
</layout>
|
||||||
<widget name = 'GameList'/>
|
<widget name = 'GameList'/>
|
||||||
|
|
Binary file not shown.
|
@ -114,6 +114,10 @@
|
||||||
width = '150'
|
width = '150'
|
||||||
height = 'Globals.Line.Height'
|
height = 'Globals.Line.Height'
|
||||||
/>
|
/>
|
||||||
|
<widget name = 'SearchClearButton'
|
||||||
|
height = 'Globals.Line.Height'
|
||||||
|
width = 'Globals.Line.Height'
|
||||||
|
/>
|
||||||
<space />
|
<space />
|
||||||
</layout>
|
</layout>
|
||||||
<layout type = 'horizontal' padding = '0, 0, 0, 0'>
|
<layout type = 'horizontal' padding = '0, 0, 0, 0'>
|
||||||
|
|
|
@ -101,6 +101,10 @@
|
||||||
width = '150'
|
width = '150'
|
||||||
height = 'Globals.Line.Height'
|
height = 'Globals.Line.Height'
|
||||||
/>
|
/>
|
||||||
|
<widget name = 'SearchClearButton'
|
||||||
|
height = 'Globals.Line.Height'
|
||||||
|
width = 'Globals.Line.Height'
|
||||||
|
/>
|
||||||
<space />
|
<space />
|
||||||
</layout>
|
</layout>
|
||||||
<widget name = 'GameList'/>
|
<widget name = 'GameList'/>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue