ES-DE/src/components/GuiFastSelect.h

48 lines
967 B
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();
2013-06-02 15:08:32 +00:00
bool input(InputConfig* config, Input input);
2013-04-08 16:52:40 +00:00
void update(int deltaTime);
void render();
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