2012-10-01 03:29:55 +00:00
|
|
|
#ifndef _GUIFASTSELECT_H_
|
|
|
|
#define _GUIFASTSELECT_H_
|
|
|
|
|
2013-04-08 16:52:40 +00:00
|
|
|
#include "../Gui.h"
|
2012-10-01 03:29:55 +00:00
|
|
|
#include "../SystemData.h"
|
2012-10-05 13:44:18 +00:00
|
|
|
#include "../FolderData.h"
|
2012-10-13 20:05:43 +00:00
|
|
|
#include "../Sound.h"
|
2012-10-05 13:44:18 +00:00
|
|
|
#include "GuiList.h"
|
2012-10-05 20:04:12 +00:00
|
|
|
#include "GuiBox.h"
|
2012-10-01 03:29:55 +00:00
|
|
|
|
2013-04-08 16:52:40 +00:00
|
|
|
class GuiFastSelect : Gui
|
2012-10-01 03:29:55 +00:00
|
|
|
{
|
|
|
|
public:
|
2013-04-08 16:52:40 +00:00
|
|
|
GuiFastSelect(Window* window, GuiComponent* parent, GuiList<FileData*>* list, char startLetter, GuiBoxData data, int textcolor, Sound* scrollsound, Font* font);
|
2012-10-01 03:29:55 +00:00
|
|
|
~GuiFastSelect();
|
|
|
|
|
2013-04-08 16:52:40 +00:00
|
|
|
void input(InputConfig* config, Input input);
|
|
|
|
void update(int deltaTime);
|
|
|
|
void render();
|
2012-10-01 03:29:55 +00:00
|
|
|
private:
|
|
|
|
static const std::string LETTERS;
|
|
|
|
static const int SCROLLSPEED;
|
|
|
|
static const int SCROLLDELAY;
|
|
|
|
|
2012-10-05 13:44:18 +00:00
|
|
|
void setListPos();
|
2012-10-13 20:05:43 +00:00
|
|
|
void scroll();
|
2012-10-01 03:29:55 +00:00
|
|
|
void setLetterID(int id);
|
|
|
|
|
2012-10-05 13:44:18 +00:00
|
|
|
GuiList<FileData*>* mList;
|
|
|
|
|
2012-10-01 03:29:55 +00:00
|
|
|
size_t mLetterID;
|
|
|
|
GuiComponent* mParent;
|
2012-10-05 13:44:18 +00:00
|
|
|
|
2012-10-05 20:04:12 +00:00
|
|
|
GuiBox* mBox;
|
2012-10-10 13:51:48 +00:00
|
|
|
int mTextColor;
|
2012-10-05 20:04:12 +00:00
|
|
|
|
2012-10-01 03:29:55 +00:00
|
|
|
int mScrollTimer, mScrollOffset;
|
|
|
|
bool mScrolling;
|
2012-10-13 20:05:43 +00:00
|
|
|
|
|
|
|
Sound* mScrollSound;
|
2013-03-17 17:16:40 +00:00
|
|
|
Font* mFont;
|
2012-10-01 03:29:55 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|