2012-10-01 03:29:55 +00:00
|
|
|
#ifndef _GUIFASTSELECT_H_
|
|
|
|
#define _GUIFASTSELECT_H_
|
|
|
|
|
|
|
|
#include "../GuiComponent.h"
|
|
|
|
#include "../SystemData.h"
|
2012-10-05 13:44:18 +00:00
|
|
|
#include "../FolderData.h"
|
|
|
|
#include "GuiList.h"
|
2012-10-01 03:29:55 +00:00
|
|
|
|
|
|
|
class GuiFastSelect : GuiComponent
|
|
|
|
{
|
|
|
|
public:
|
2012-10-05 13:44:18 +00:00
|
|
|
GuiFastSelect(GuiComponent* parent, GuiList<FileData*>* list, char startLetter);
|
2012-10-01 03:29:55 +00:00
|
|
|
~GuiFastSelect();
|
|
|
|
|
|
|
|
void onRender();
|
|
|
|
void onInput(InputManager::InputButton button, bool keyDown);
|
|
|
|
void onTick(int deltaTime);
|
|
|
|
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-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-01 03:29:55 +00:00
|
|
|
int mScrollTimer, mScrollOffset;
|
|
|
|
bool mScrolling;
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|