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>
|
||||||
<td>Control + D</td>
|
<td>Control + D</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
|
||||||
<td>Toggle show all files</td>
|
|
||||||
<td>Control + A</td>
|
|
||||||
<td>Control + A</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
<tr>
|
||||||
<td>Toggle favorites sorting (normal or alternative)</td>
|
<td>Toggle favorites sorting (normal or alternative)</td>
|
||||||
<td>Control + S</td>
|
<td>Control + S</td>
|
||||||
|
@ -4144,10 +4139,6 @@
|
||||||
wildcards. E.g. for '(198?)*atari' only ROMs from the 1980s made by
|
wildcards. E.g. for '(198?)*atari' only ROMs from the 1980s made by
|
||||||
Atari will be listed.
|
Atari will be listed.
|
||||||
</li><li>
|
</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_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">
|
<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.
|
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
|
<p><b>Toggle alternative sorting</b> (or 'Control + S'): Toggles
|
||||||
alternative sorting in the virtual directories.</p>
|
alternative sorting in the virtual directories.</p>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
|
||||||
<p><b>Show all files/only ROMs</b> (or 'Control + A'): Toggles display of
|
|
||||||
non-ROM files.</p>
|
|
||||||
</li>
|
|
||||||
<li>
|
<li>
|
||||||
<p><b>Include/exclude subdirectories</b> (or 'Control + D'): Toggles searching
|
<p><b>Include/exclude subdirectories</b> (or 'Control + D'): Toggles searching
|
||||||
of ROMs in current directory only or all subdirectories too.</p>
|
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
|
// All focusable widgets should retain focus
|
||||||
for(const auto& w: list)
|
for(const auto& w: list)
|
||||||
|
@ -415,14 +415,16 @@ void Dialog::addToFocusList(const WidgetArray& list)
|
||||||
|
|
||||||
if(!list.empty())
|
if(!list.empty())
|
||||||
_myFocus.widget = list[0];
|
_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
|
// Only add the list if the tab actually exists
|
||||||
if(!w || w->getID() >= _myTabList.size())
|
if(!w || w->getID() >= _myTabList.size())
|
||||||
return;
|
return 0;
|
||||||
|
|
||||||
assert(w == _myTabList[w->getID()].widget);
|
assert(w == _myTabList[w->getID()].widget);
|
||||||
|
|
||||||
|
@ -448,6 +450,8 @@ void Dialog::addToFocusList(const WidgetArray& list, const TabWidget* w, int tab
|
||||||
|
|
||||||
if(!list.empty())
|
if(!list.empty())
|
||||||
focus[id].widget = list[0];
|
focus[id].widget = list[0];
|
||||||
|
|
||||||
|
return static_cast<int>(focus.size());
|
||||||
}
|
}
|
||||||
|
|
||||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
|
|
|
@ -76,8 +76,8 @@ class Dialog : public GuiObject
|
||||||
void tick() override;
|
void tick() override;
|
||||||
|
|
||||||
void addFocusWidget(Widget* w) override;
|
void addFocusWidget(Widget* w) override;
|
||||||
void addToFocusList(const WidgetArray& list) override;
|
int addToFocusList(const WidgetArray& list) override;
|
||||||
void addToFocusList(const WidgetArray& list, const TabWidget* w, int tabId);
|
int addToFocusList(const WidgetArray& list, const TabWidget* w, int tabId);
|
||||||
void addBGroupToFocusList(const WidgetArray& list) { _buttonGroup = list; }
|
void addBGroupToFocusList(const WidgetArray& list) { _buttonGroup = list; }
|
||||||
void addTabWidget(TabWidget* w);
|
void addTabWidget(TabWidget* w);
|
||||||
void addDefaultWidget(ButtonWidget* w) { _defaultWidget = w; }
|
void addDefaultWidget(ButtonWidget* w) { _defaultWidget = w; }
|
||||||
|
|
|
@ -130,7 +130,7 @@ class GuiObject : public CommandReceiver
|
||||||
|
|
||||||
/** Add given widget(s) to the focus list */
|
/** Add given widget(s) to the focus list */
|
||||||
virtual void addFocusWidget(Widget* w) = 0;
|
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 */
|
/** Return focus list for this object */
|
||||||
WidgetArray& getFocusList() { return _focusList; }
|
WidgetArray& getFocusList() { return _focusList; }
|
||||||
|
|
|
@ -83,17 +83,13 @@ LauncherDialog::LauncherDialog(OSystem& osystem, DialogContainer& parent,
|
||||||
addPathWidgets(ypos);
|
addPathWidgets(ypos);
|
||||||
addFilteringWidgets(ypos); //-- filtering widget line has file count
|
addFilteringWidgets(ypos); //-- filtering widget line has file count
|
||||||
}
|
}
|
||||||
addRomWidgets(ypos);
|
mySelectedItem = addRomWidgets(ypos) - 1; // Highlight 'Rom Listing'
|
||||||
if(!myUseMinimalUI && bottomButtons)
|
if(!myUseMinimalUI && bottomButtons)
|
||||||
addButtonWidgets(ypos);
|
addButtonWidgets(ypos);
|
||||||
myNavigationBar->setList(myList);
|
myNavigationBar->setList(myList);
|
||||||
|
|
||||||
tooltip().setFont(_font);
|
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();
|
applyFiltering();
|
||||||
setHelpAnchor("ROMInfo");
|
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 bool bottomButtons = instance().settings().getBool("launcherbuttons");
|
||||||
const int fontWidth = Dialog::fontWidth(),
|
const int fontWidth = Dialog::fontWidth(),
|
||||||
|
@ -333,7 +329,7 @@ void LauncherDialog::addRomWidgets(int ypos)
|
||||||
myRomInfoWidget = new RomInfoWidget(this, *myROMInfoFont,
|
myRomInfoWidget = new RomInfoWidget(this, *myROMInfoFont,
|
||||||
xpos, ypos + yofs, imageWidth, myList->getHeight() - yofs);
|
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 addTitleWidget(int& ypos);
|
||||||
void addFilteringWidgets(int& ypos);
|
void addFilteringWidgets(int& ypos);
|
||||||
void addPathWidgets(int& ypos);
|
void addPathWidgets(int& ypos);
|
||||||
void addRomWidgets(int ypos);
|
int addRomWidgets(int ypos);
|
||||||
void addButtonWidgets(int& ypos);
|
void addButtonWidgets(int& ypos);
|
||||||
string getRomDir();
|
string getRomDir();
|
||||||
|
|
||||||
|
|
|
@ -88,8 +88,9 @@ class Widget : public GuiObject
|
||||||
void receivedFocus();
|
void receivedFocus();
|
||||||
void lostFocus();
|
void lostFocus();
|
||||||
void addFocusWidget(Widget* w) override { _focusList.push_back(w); }
|
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);
|
Vec::append(_focusList, list);
|
||||||
|
return static_cast<int>(_focusList.size());
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Set/clear FLAG_ENABLED */
|
/** Set/clear FLAG_ENABLED */
|
||||||
|
|