mirror of
https://github.com/RetroDECK/ES-DE.git
synced 2024-11-24 07:05:39 +00:00
542d41c682
Pass a matrix (Eigen::Affine3f) in GuiComponent::render instead of doing glTranslate behind the scenes.
49 lines
1 KiB
C++
49 lines
1 KiB
C++
#ifndef _GUIFASTSELECT_H_
|
|
#define _GUIFASTSELECT_H_
|
|
|
|
#include "../GuiComponent.h"
|
|
#include "../SystemData.h"
|
|
#include "../FolderData.h"
|
|
#include "../Sound.h"
|
|
#include "ThemeComponent.h"
|
|
#include "TextListComponent.h"
|
|
#include "GuiBox.h"
|
|
|
|
class GuiGameList;
|
|
|
|
class GuiFastSelect : public GuiComponent
|
|
{
|
|
public:
|
|
GuiFastSelect(Window* window, GuiGameList* parent, TextListComponent<FileData*>* list, char startLetter, ThemeComponent * theme);
|
|
~GuiFastSelect();
|
|
|
|
bool input(InputConfig* config, Input input) override;
|
|
void update(int deltaTime) override;
|
|
void render(const Eigen::Affine3f& parentTrans) override;
|
|
|
|
private:
|
|
static const std::string LETTERS;
|
|
static const int SCROLLSPEED;
|
|
static const int SCROLLDELAY;
|
|
|
|
void setListPos();
|
|
void scroll();
|
|
void setLetterID(int id);
|
|
|
|
TextListComponent<FileData*>* mList;
|
|
|
|
size_t mLetterID;
|
|
GuiGameList* mParent;
|
|
|
|
GuiBox* mBox;
|
|
int mTextColor;
|
|
|
|
int mScrollTimer, mScrollOffset;
|
|
bool mScrolling;
|
|
|
|
std::shared_ptr<Sound> mScrollSound;
|
|
ThemeComponent * mTheme;
|
|
};
|
|
|
|
#endif
|