mirror of
https://github.com/RetroDECK/ES-DE.git
synced 2024-11-26 16:15:39 +00:00
Small refactoring of CarouselComponent and TextListComponent.
This commit is contained in:
parent
bbc996f66e
commit
5bedb7a8fa
|
@ -66,14 +66,14 @@ public:
|
||||||
return mLetterCaseGroupedCollections;
|
return mLetterCaseGroupedCollections;
|
||||||
}
|
}
|
||||||
|
|
||||||
void setCursorChangedCallback(const std::function<void(CursorState state)>& func) override
|
|
||||||
{
|
|
||||||
mCursorChangedCallback = func;
|
|
||||||
}
|
|
||||||
void setCancelTransitionsCallback(const std::function<void()>& func) override
|
void setCancelTransitionsCallback(const std::function<void()>& func) override
|
||||||
{
|
{
|
||||||
mCancelTransitionsCallback = func;
|
mCancelTransitionsCallback = func;
|
||||||
}
|
}
|
||||||
|
void setCursorChangedCallback(const std::function<void(CursorState state)>& func) override
|
||||||
|
{
|
||||||
|
mCursorChangedCallback = func;
|
||||||
|
}
|
||||||
|
|
||||||
bool input(InputConfig* config, Input input) override;
|
bool input(InputConfig* config, Input input) override;
|
||||||
void update(int deltaTime) override;
|
void update(int deltaTime) override;
|
||||||
|
|
|
@ -57,14 +57,14 @@ public:
|
||||||
|
|
||||||
void setAlignment(PrimaryAlignment align) override { mAlignment = align; }
|
void setAlignment(PrimaryAlignment align) override { mAlignment = align; }
|
||||||
|
|
||||||
void setCursorChangedCallback(const std::function<void(CursorState state)>& func) override
|
|
||||||
{
|
|
||||||
mCursorChangedCallback = func;
|
|
||||||
}
|
|
||||||
void setCancelTransitionsCallback(const std::function<void()>& func) override
|
void setCancelTransitionsCallback(const std::function<void()>& func) override
|
||||||
{
|
{
|
||||||
mCancelTransitionsCallback = func;
|
mCancelTransitionsCallback = func;
|
||||||
}
|
}
|
||||||
|
void setCursorChangedCallback(const std::function<void(CursorState state)>& func) override
|
||||||
|
{
|
||||||
|
mCursorChangedCallback = func;
|
||||||
|
}
|
||||||
|
|
||||||
void setFont(const std::shared_ptr<Font>& font)
|
void setFont(const std::shared_ptr<Font>& font)
|
||||||
{
|
{
|
||||||
|
@ -111,6 +111,7 @@ private:
|
||||||
|
|
||||||
Renderer* mRenderer;
|
Renderer* mRenderer;
|
||||||
std::function<void()> mCancelTransitionsCallback;
|
std::function<void()> mCancelTransitionsCallback;
|
||||||
|
std::function<void(CursorState state)> mCursorChangedCallback;
|
||||||
float mCamOffset;
|
float mCamOffset;
|
||||||
int mPreviousScrollVelocity;
|
int mPreviousScrollVelocity;
|
||||||
|
|
||||||
|
@ -122,7 +123,6 @@ private:
|
||||||
PrimaryAlignment mAlignment;
|
PrimaryAlignment mAlignment;
|
||||||
float mHorizontalMargin;
|
float mHorizontalMargin;
|
||||||
|
|
||||||
std::function<void(CursorState state)> mCursorChangedCallback;
|
|
||||||
ImageComponent mSelectorImage;
|
ImageComponent mSelectorImage;
|
||||||
|
|
||||||
std::shared_ptr<Font> mFont;
|
std::shared_ptr<Font> mFont;
|
||||||
|
|
Loading…
Reference in a new issue