ES-DE/src/components/GuiFastSelect.h
Aloshi 542d41c682 Move from homegrown Vector2 class to Eigen.
Pass a matrix (Eigen::Affine3f) in GuiComponent::render instead of doing
glTranslate behind the scenes.
2013-07-10 06:29:43 -05:00

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