ES-DE/src/components/GuiFastSelect.h

48 lines
988 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"
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:
2013-06-02 15:08:32 +00:00
GuiFastSelect(Window* window, GuiGameList* parent, TextListComponent<FileData*>* list, char startLetter, GuiBoxData data,
int textcolor, std::shared_ptr<Sound> & scrollsound, Font* font);
~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;
2013-03-17 17:16:40 +00:00
Font* mFont;
};
#endif