2012-10-01 03:29:55 +00:00
|
|
|
#ifndef _GUIFASTSELECT_H_
|
|
|
|
#define _GUIFASTSELECT_H_
|
|
|
|
|
2013-06-02 15:08:32 +00:00
|
|
|
#include "../GuiComponent.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"
|
2013-06-02 15:08:32 +00:00
|
|
|
#include "TextListComponent.h"
|
2012-10-05 20:04:12 +00:00
|
|
|
#include "GuiBox.h"
|
2012-10-01 03:29:55 +00:00
|
|
|
|
2013-04-08 17:40:15 +00:00
|
|
|
class GuiGameList;
|
|
|
|
|
2013-06-02 15:08:32 +00:00
|
|
|
class GuiFastSelect : public GuiComponent
|
2012-10-01 03:29:55 +00:00
|
|
|
{
|
|
|
|
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);
|
2012-10-01 03:29:55 +00:00
|
|
|
~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();
|
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);
|
|
|
|
|
2013-06-02 15:08:32 +00:00
|
|
|
TextListComponent<FileData*>* mList;
|
2012-10-05 13:44:18 +00:00
|
|
|
|
2012-10-01 03:29:55 +00:00
|
|
|
size_t mLetterID;
|
2013-04-08 17:40:15 +00:00
|
|
|
GuiGameList* 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
|
|
|
|
2013-05-14 19:31:39 +00:00
|
|
|
std::shared_ptr<Sound> mScrollSound;
|
2013-03-17 17:16:40 +00:00
|
|
|
Font* mFont;
|
2012-10-01 03:29:55 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|