ES-DE/src/components/GuiFastSelect.h

49 lines
1 KiB
C
Raw Normal View History

#ifndef _GUIFASTSELECT_H_
#define _GUIFASTSELECT_H_
2013-06-02 15:08:32 +00:00
#include "../GuiComponent.h"
#include "../SystemData.h"
#include "../FolderData.h"
#include "../Sound.h"
#include "ThemeComponent.h"
2013-06-02 15:08:32 +00:00
#include "TextListComponent.h"
#include "GuiBox.h"
2013-04-08 17:40:15 +00:00
class GuiGameList;
2013-06-02 15:08:32 +00:00
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);
2013-06-02 15:08:32 +00:00
TextListComponent<FileData*>* mList;
size_t mLetterID;
2013-04-08 17:40:15 +00:00
GuiGameList* mParent;
GuiBox* mBox;
int mTextColor;
int mScrollTimer, mScrollOffset;
bool mScrolling;
std::shared_ptr<Sound> mScrollSound;
ThemeComponent * mTheme;
};
#endif