diff --git a/es-app/src/guis/GuiGamelistOptions.cpp b/es-app/src/guis/GuiGamelistOptions.cpp index 436b131c46..8a64c81dff 100644 --- a/es-app/src/guis/GuiGamelistOptions.cpp +++ b/es-app/src/guis/GuiGamelistOptions.cpp @@ -13,7 +13,7 @@ #include "components/TextListComponent.h" GuiGamelistOptions::GuiGamelistOptions(Window* window, SystemData* system) : GuiComponent(window), - mSystem(system), mMenu(window, "OPTIONS"), mFromPlaceholder(false), mFiltersChanged(false), + mSystem(system), mMenu(window, "OPTIONS", Font::get(FONT_SIZE_LARGE), LIST_ALWAYS_LOOP), mFromPlaceholder(false), mFiltersChanged(false), mJumpToSelected(false), mMetadataChanged(false) { addChild(&mMenu); diff --git a/es-app/src/guis/GuiMenu.cpp b/es-app/src/guis/GuiMenu.cpp index b3150db4a5..dcb4243382 100644 --- a/es-app/src/guis/GuiMenu.cpp +++ b/es-app/src/guis/GuiMenu.cpp @@ -23,7 +23,7 @@ #include "views/gamelist/IGameListView.h" #include "guis/GuiInfoPopup.h" -GuiMenu::GuiMenu(Window* window) : GuiComponent(window), mMenu(window, "MAIN MENU"), mVersion(window) +GuiMenu::GuiMenu(Window* window) : GuiComponent(window), mMenu(window, "MAIN MENU", Font::get(FONT_SIZE_LARGE), LIST_ALWAYS_LOOP), mVersion(window) { bool isFullUI = UIModeController::getInstance()->isUIModeFull(); diff --git a/es-core/src/components/ComponentList.cpp b/es-core/src/components/ComponentList.cpp index 1ae1c67562..ad56e7e792 100644 --- a/es-core/src/components/ComponentList.cpp +++ b/es-core/src/components/ComponentList.cpp @@ -2,7 +2,7 @@ #define TOTAL_HORIZONTAL_PADDING_PX 20 -ComponentList::ComponentList(Window* window) : IList(window, LIST_SCROLL_STYLE_SLOW, LIST_NEVER_LOOP) +ComponentList::ComponentList(Window* window, ListLoopType loop_type) : IList(window, LIST_SCROLL_STYLE_SLOW, loop_type) { mSelectorBarOffset = 0; mCameraOffset = 0; diff --git a/es-core/src/components/ComponentList.h b/es-core/src/components/ComponentList.h index c5c0f9c2e9..590dae5c98 100644 --- a/es-core/src/components/ComponentList.h +++ b/es-core/src/components/ComponentList.h @@ -46,7 +46,7 @@ struct ComponentListRow class ComponentList : public IList { public: - ComponentList(Window* window); + ComponentList(Window* window, ListLoopType loop_type = LIST_NEVER_LOOP); void addRow(const ComponentListRow& row, bool setCursorHere = false); diff --git a/es-core/src/components/MenuComponent.cpp b/es-core/src/components/MenuComponent.cpp index 2e60b59459..8daee86afd 100644 --- a/es-core/src/components/MenuComponent.cpp +++ b/es-core/src/components/MenuComponent.cpp @@ -7,7 +7,7 @@ #define TITLE_HEIGHT (mTitle->getFont()->getLetterHeight() + TITLE_VERT_PADDING) -MenuComponent::MenuComponent(Window* window, const char* title, const std::shared_ptr& titleFont) : GuiComponent(window), +MenuComponent::MenuComponent(Window* window, const char* title, const std::shared_ptr& titleFont, ListLoopType loop_type) : GuiComponent(window), mBackground(window), mGrid(window, Vector2i(1, 3)) { addChild(&mBackground); @@ -23,7 +23,7 @@ MenuComponent::MenuComponent(Window* window, const char* title, const std::share mGrid.setEntry(mTitle, Vector2i(0, 0), false); // set up list which will never change (externally, anyway) - mList = std::make_shared(mWindow); + mList = std::make_shared(mWindow, loop_type); mGrid.setEntry(mList, Vector2i(0, 1), true); updateGrid(); diff --git a/es-core/src/components/MenuComponent.h b/es-core/src/components/MenuComponent.h index ad2f69db10..44ad5a08d3 100644 --- a/es-core/src/components/MenuComponent.h +++ b/es-core/src/components/MenuComponent.h @@ -19,7 +19,7 @@ std::shared_ptr makeArrow(Window* window); class MenuComponent : public GuiComponent { public: - MenuComponent(Window* window, const char* title, const std::shared_ptr& titleFont = Font::get(FONT_SIZE_LARGE)); + MenuComponent(Window* window, const char* title, const std::shared_ptr& titleFont = Font::get(FONT_SIZE_LARGE), ListLoopType loop_type = LIST_NEVER_LOOP); void onSizeChanged() override;