diff --git a/es-core/src/components/TextListComponent.h b/es-core/src/components/TextListComponent.h index 550934ac6..bde21b899 100644 --- a/es-core/src/components/TextListComponent.h +++ b/es-core/src/components/TextListComponent.h @@ -27,22 +27,17 @@ struct TextListData { // A scrollable text list supporting multiple row colors. template class TextListComponent : public IList { + using List = IList; + protected: - using IList::mEntries; - using IList::listUpdate; - using IList::listInput; - using IList::listRenderTitleOverlay; - using IList::getTransform; - using IList::mSize; - using IList::mCursor; - using IList::mWindow; - using IList::IList; + using List::mCursor; + using List::mEntries; + using List::mSize; + using List::mWindow; public: - using IList::size; - using IList::isScrolling; - using IList::stopScrolling; using GuiComponent::setColor; + using List::size; TextListComponent(Window* window); @@ -164,7 +159,7 @@ template void TextListComponent::render(const glm::mat4& parentT if (size() == 0) return; - glm::mat4 trans {parentTrans * getTransform()}; + glm::mat4 trans {parentTrans * List::getTransform()}; std::shared_ptr& font {mFont}; int startEntry {0}; @@ -299,7 +294,7 @@ template void TextListComponent::render(const glm::mat4& parentT y += entrySize; } Renderer::popClipRect(); - listRenderTitleOverlay(trans); + List::listRenderTitleOverlay(trans); GuiComponent::renderChildren(trans); } @@ -308,21 +303,21 @@ template bool TextListComponent::input(InputConfig* config, Inpu if (size() > 0) { if (input.value != 0) { if (config->isMappedLike("down", input)) { - listInput(1); + List::listInput(1); return true; } if (config->isMappedLike("up", input)) { - listInput(-1); + List::listInput(-1); return true; } if (config->isMappedLike("rightshoulder", input)) { - listInput(10); + List::listInput(10); return true; } if (config->isMappedLike("leftshoulder", input)) { - listInput(-10); + List::listInput(-10); return true; } @@ -340,7 +335,7 @@ template bool TextListComponent::input(InputConfig* config, Inpu config->isMappedLike("leftshoulder", input) || config->isMappedLike("lefttrigger", input) || config->isMappedLike("righttrigger", input)) - stopScrolling(); + List::stopScrolling(); } } @@ -349,12 +344,12 @@ template bool TextListComponent::input(InputConfig* config, Inpu template void TextListComponent::update(int deltaTime) { - listUpdate(deltaTime); + List::listUpdate(deltaTime); if (mWindow->isScreensaverActive() || !mWindow->getAllowTextScrolling()) - stopScrolling(); + List::stopScrolling(); - if (!isScrolling() && size() > 0) { + if (!List::isScrolling() && size() > 0) { // Always reset the loop offsets. mLoopOffset = 0; mLoopOffset2 = 0;