mirror of
https://github.com/RetroDECK/ES-DE.git
synced 2024-11-26 16:15:39 +00:00
Fixed an issue with incorrect scroll indicators in the Alternative Emulators screen.
This commit is contained in:
parent
eb47511bbc
commit
c1fe919e4d
|
@ -220,7 +220,14 @@ void GuiAlternativeEmulators::selectorWindow(SystemData* system)
|
||||||
auto menuPos = s->getMenuPosition();
|
auto menuPos = s->getMenuPosition();
|
||||||
|
|
||||||
s->setMenuPosition(glm::vec3 {(s->getSize().x - menuSize.x) / 2.0f, menuPos.y, menuPos.z});
|
s->setMenuPosition(glm::vec3 {(s->getSize().x - menuSize.x) / 2.0f, menuPos.y, menuPos.z});
|
||||||
s->refreshList();
|
|
||||||
|
// Hack to properly update the window and set the scroll indicators. Why this is required
|
||||||
|
// is currently a mystery.
|
||||||
|
auto list = s->getMenu().getList();
|
||||||
|
list->update(1);
|
||||||
|
int cursor {list->getCursorId()};
|
||||||
|
list->setCursor(list->getFirst());
|
||||||
|
list->moveCursor(cursor);
|
||||||
|
|
||||||
mWindow->pushGui(s);
|
mWindow->pushGui(s);
|
||||||
}
|
}
|
||||||
|
|
|
@ -38,11 +38,11 @@ public:
|
||||||
bool isPassword = false);
|
bool isPassword = false);
|
||||||
void addSaveFunc(const std::function<void()>& func) { mSaveFuncs.push_back(func); }
|
void addSaveFunc(const std::function<void()>& func) { mSaveFuncs.push_back(func); }
|
||||||
|
|
||||||
|
MenuComponent& getMenu() { return mMenu; }
|
||||||
glm::vec2 getMenuSize() { return mMenu.getSize(); }
|
glm::vec2 getMenuSize() { return mMenu.getSize(); }
|
||||||
void setMenuSize(glm::vec2 size) { mMenu.setSize(size); }
|
void setMenuSize(glm::vec2 size) { mMenu.setSize(size); }
|
||||||
glm::vec3 getMenuPosition() { return mMenu.getPosition(); }
|
glm::vec3 getMenuPosition() { return mMenu.getPosition(); }
|
||||||
void setMenuPosition(glm::vec3 position) { mMenu.setPosition(glm::round(position)); }
|
void setMenuPosition(glm::vec3 position) { mMenu.setPosition(glm::round(position)); }
|
||||||
void refreshList() { mMenu.getList()->onSizeChanged(); }
|
|
||||||
|
|
||||||
void setNeedsSaving(bool state = true) { mNeedsSaving = state; }
|
void setNeedsSaving(bool state = true) { mNeedsSaving = state; }
|
||||||
void setNeedsReloadHelpPrompts() { mNeedsReloadHelpPrompts = true; }
|
void setNeedsReloadHelpPrompts() { mNeedsReloadHelpPrompts = true; }
|
||||||
|
|
Loading…
Reference in a new issue