diff --git a/docs/graphics/launcher.png b/docs/graphics/launcher.png index 67692a656..d01426c4d 100644 Binary files a/docs/graphics/launcher.png and b/docs/graphics/launcher.png differ diff --git a/docs/graphics/rominfo_1x_large.png b/docs/graphics/rominfo_1x_large.png index a1324a1b1..80032b74d 100644 Binary files a/docs/graphics/rominfo_1x_large.png and b/docs/graphics/rominfo_1x_large.png differ diff --git a/docs/graphics/rominfo_1x_small.png b/docs/graphics/rominfo_1x_small.png index 10edd223c..f1c3ca7f5 100644 Binary files a/docs/graphics/rominfo_1x_small.png and b/docs/graphics/rominfo_1x_small.png differ diff --git a/docs/graphics/rominfo_2x_small.png b/docs/graphics/rominfo_2x_small.png index ee0f4f587..ee9a2c723 100644 Binary files a/docs/graphics/rominfo_2x_small.png and b/docs/graphics/rominfo_2x_small.png differ diff --git a/docs/graphics/show_all.png b/docs/graphics/show_all.png deleted file mode 100644 index a4a2f1ba7..000000000 Binary files a/docs/graphics/show_all.png and /dev/null differ diff --git a/docs/graphics/show_roms.png b/docs/graphics/show_roms.png deleted file mode 100644 index e3908c5f7..000000000 Binary files a/docs/graphics/show_roms.png and /dev/null differ diff --git a/docs/index.html b/docs/index.html index 537fa8ee5..575f6c525 100644 --- a/docs/index.html +++ b/docs/index.html @@ -2120,11 +2120,6 @@ Control + D Control + D - - Toggle show all files - Control + A - Control + A - Toggle favorites sorting (normal or alternative) Control + S @@ -4144,10 +4139,6 @@ wildcards. E.g. for '(198?)*atari' only ROMs from the 1980s made by Atari will be listed.
  • - - - Display either files which do have a valid ROM extension or all files. -
  • Display either files from current directory only or all subdirectories too. @@ -4243,10 +4234,6 @@

    Toggle alternative sorting (or 'Control + S'): Toggles alternative sorting in the virtual directories.

  • -
  • -

    Show all files/only ROMs (or 'Control + A'): Toggles display of - non-ROM files.

    -
  • Include/exclude subdirectories (or 'Control + D'): Toggles searching of ROMs in current directory only or all subdirectories too.

    diff --git a/src/gui/Dialog.cxx b/src/gui/Dialog.cxx index 274fc5f9d..b4f9e37f9 100644 --- a/src/gui/Dialog.cxx +++ b/src/gui/Dialog.cxx @@ -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(_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(focus.size()); } // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/gui/Dialog.hxx b/src/gui/Dialog.hxx index 921ff3c50..3149048cb 100644 --- a/src/gui/Dialog.hxx +++ b/src/gui/Dialog.hxx @@ -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; } diff --git a/src/gui/GuiObject.hxx b/src/gui/GuiObject.hxx index a4d95d3a6..b187a48a2 100644 --- a/src/gui/GuiObject.hxx +++ b/src/gui/GuiObject.hxx @@ -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; } diff --git a/src/gui/LauncherDialog.cxx b/src/gui/LauncherDialog.cxx index 0c3549e1b..5ed2fe9b6 100644 --- a/src/gui/LauncherDialog.cxx +++ b/src/gui/LauncherDialog.cxx @@ -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); } // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/gui/LauncherDialog.hxx b/src/gui/LauncherDialog.hxx index 419bbe162..f12935f4c 100644 --- a/src/gui/LauncherDialog.hxx +++ b/src/gui/LauncherDialog.hxx @@ -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(); diff --git a/src/gui/Widget.hxx b/src/gui/Widget.hxx index 145d63843..aaf7af8be 100644 --- a/src/gui/Widget.hxx +++ b/src/gui/Widget.hxx @@ -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(_focusList.size()); } /** Set/clear FLAG_ENABLED */