update doc for removed "show all files" option
eliminated magic number for initially focus widget in LauncherDialog.cxx
Before Width: | Height: | Size: 28 KiB After Width: | Height: | Size: 28 KiB |
Before Width: | Height: | Size: 30 KiB After Width: | Height: | Size: 30 KiB |
Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 15 KiB |
Before Width: | Height: | Size: 43 KiB After Width: | Height: | Size: 43 KiB |
Before Width: | Height: | Size: 197 B |
Before Width: | Height: | Size: 187 B |
@ -2120,11 +2120,6 @@
|
||||
<td>Control + D</td>
|
||||
<td>Control + D</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Toggle show all files</td>
|
||||
<td>Control + A</td>
|
||||
<td>Control + A</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Toggle favorites sorting (normal or alternative)</td>
|
||||
<td>Control + S</td>
|
||||
@ -4144,10 +4139,6 @@
|
||||
wildcards. E.g. for '(198?)*atari' only ROMs from the 1980s made by
|
||||
Atari will be listed.
|
||||
</li><li>
|
||||
<img src="graphics/show_roms.png" style="vertical-align: middle; margin-top: 4px; margin-bottom: 4px">
|
||||
<img src="graphics/show_all.png" style="vertical-align: middle; margin-top: 4px; margin-bottom: 4px; margin-right: 4px">
|
||||
Display either files which do have a valid ROM extension or all files.
|
||||
</li><li>
|
||||
<img src="graphics/show_current_dir.png" style="vertical-align: middle; margin-top: 4px; margin-bottom: 4px">
|
||||
<img src="graphics/show_sub_dirs.png" style="vertical-align: middle; margin-top: 4px; margin-bottom: 4px; margin-right: 4px">
|
||||
Display either files from current directory only or all subdirectories too.
|
||||
@ -4243,10 +4234,6 @@
|
||||
<p><b>Toggle alternative sorting</b> (or 'Control + S'): Toggles
|
||||
alternative sorting in the virtual directories.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p><b>Show all files/only ROMs</b> (or 'Control + A'): Toggles display of
|
||||
non-ROM files.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p><b>Include/exclude subdirectories</b> (or 'Control + D'): Toggles searching
|
||||
of ROMs in current directory only or all subdirectories too.</p>
|
||||
|
@ -404,7 +404,7 @@ void Dialog::addFocusWidget(Widget* w)
|
||||
}
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
void Dialog::addToFocusList(const WidgetArray& list)
|
||||
int Dialog::addToFocusList(const WidgetArray& list)
|
||||
{
|
||||
// All focusable widgets should retain focus
|
||||
for(const auto& w: list)
|
||||
@ -415,14 +415,16 @@ void Dialog::addToFocusList(const WidgetArray& list)
|
||||
|
||||
if(!list.empty())
|
||||
_myFocus.widget = list[0];
|
||||
|
||||
return static_cast<int>(_focusList.size());
|
||||
}
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
void Dialog::addToFocusList(const WidgetArray& list, const TabWidget* w, int tabId)
|
||||
int Dialog::addToFocusList(const WidgetArray& list, const TabWidget* w, int tabId)
|
||||
{
|
||||
// Only add the list if the tab actually exists
|
||||
if(!w || w->getID() >= _myTabList.size())
|
||||
return;
|
||||
return 0;
|
||||
|
||||
assert(w == _myTabList[w->getID()].widget);
|
||||
|
||||
@ -448,6 +450,8 @@ void Dialog::addToFocusList(const WidgetArray& list, const TabWidget* w, int tab
|
||||
|
||||
if(!list.empty())
|
||||
focus[id].widget = list[0];
|
||||
|
||||
return static_cast<int>(focus.size());
|
||||
}
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
|
@ -76,8 +76,8 @@ class Dialog : public GuiObject
|
||||
void tick() override;
|
||||
|
||||
void addFocusWidget(Widget* w) override;
|
||||
void addToFocusList(const WidgetArray& list) override;
|
||||
void addToFocusList(const WidgetArray& list, const TabWidget* w, int tabId);
|
||||
int addToFocusList(const WidgetArray& list) override;
|
||||
int addToFocusList(const WidgetArray& list, const TabWidget* w, int tabId);
|
||||
void addBGroupToFocusList(const WidgetArray& list) { _buttonGroup = list; }
|
||||
void addTabWidget(TabWidget* w);
|
||||
void addDefaultWidget(ButtonWidget* w) { _defaultWidget = w; }
|
||||
|
@ -130,7 +130,7 @@ class GuiObject : public CommandReceiver
|
||||
|
||||
/** Add given widget(s) to the focus list */
|
||||
virtual void addFocusWidget(Widget* w) = 0;
|
||||
virtual void addToFocusList(const WidgetArray& list) = 0;
|
||||
virtual int addToFocusList(const WidgetArray& list) = 0;
|
||||
|
||||
/** Return focus list for this object */
|
||||
WidgetArray& getFocusList() { return _focusList; }
|
||||
|
@ -83,17 +83,13 @@ LauncherDialog::LauncherDialog(OSystem& osystem, DialogContainer& parent,
|
||||
addPathWidgets(ypos);
|
||||
addFilteringWidgets(ypos); //-- filtering widget line has file count
|
||||
}
|
||||
addRomWidgets(ypos);
|
||||
mySelectedItem = addRomWidgets(ypos) - 1; // Highlight 'Rom Listing'
|
||||
if(!myUseMinimalUI && bottomButtons)
|
||||
addButtonWidgets(ypos);
|
||||
myNavigationBar->setList(myList);
|
||||
|
||||
tooltip().setFont(_font);
|
||||
|
||||
if(myUseMinimalUI) // Highlight 'Rom Listing'
|
||||
mySelectedItem = 0; // skip nothing
|
||||
mySelectedItem = 9; // skip filter items and 6 navigation/help buttons
|
||||
// FIXME: MAGIC NUMBER HERE!!!
|
||||
applyFiltering();
|
||||
setHelpAnchor("ROMInfo");
|
||||
}
|
||||
@ -276,7 +272,7 @@ void LauncherDialog::addPathWidgets(int& ypos)
|
||||
}
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
void LauncherDialog::addRomWidgets(int ypos)
|
||||
int LauncherDialog::addRomWidgets(int ypos)
|
||||
{
|
||||
const bool bottomButtons = instance().settings().getBool("launcherbuttons");
|
||||
const int fontWidth = Dialog::fontWidth(),
|
||||
@ -333,7 +329,7 @@ void LauncherDialog::addRomWidgets(int ypos)
|
||||
myRomInfoWidget = new RomInfoWidget(this, *myROMInfoFont,
|
||||
xpos, ypos + yofs, imageWidth, myList->getHeight() - yofs);
|
||||
}
|
||||
addToFocusList(wid);
|
||||
return addToFocusList(wid);
|
||||
}
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
|
@ -126,7 +126,7 @@ class LauncherDialog : public Dialog, CommandSender
|
||||
void addTitleWidget(int& ypos);
|
||||
void addFilteringWidgets(int& ypos);
|
||||
void addPathWidgets(int& ypos);
|
||||
void addRomWidgets(int ypos);
|
||||
int addRomWidgets(int ypos);
|
||||
void addButtonWidgets(int& ypos);
|
||||
string getRomDir();
|
||||
|
||||
|
@ -88,8 +88,9 @@ class Widget : public GuiObject
|
||||
void receivedFocus();
|
||||
void lostFocus();
|
||||
void addFocusWidget(Widget* w) override { _focusList.push_back(w); }
|
||||
void addToFocusList(const WidgetArray& list) override {
|
||||
int addToFocusList(const WidgetArray& list) override {
|
||||
Vec::append(_focusList, list);
|
||||
return static_cast<int>(_focusList.size());
|
||||
}
|
||||
|
||||
/** Set/clear FLAG_ENABLED */
|
||||
|