2012-07-20 01:08:29 +00:00
|
|
|
#ifndef _GUILIST_H_
|
|
|
|
#define _GUILIST_H_
|
|
|
|
|
|
|
|
#include "../Renderer.h"
|
|
|
|
#include "../GuiComponent.h"
|
2012-07-21 19:06:24 +00:00
|
|
|
#include "../InputManager.h"
|
2012-07-20 01:08:29 +00:00
|
|
|
#include <vector>
|
|
|
|
#include <string>
|
|
|
|
|
|
|
|
class GuiList : public GuiComponent
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
GuiList();
|
2012-07-21 19:06:24 +00:00
|
|
|
~GuiList();
|
2012-07-20 01:08:29 +00:00
|
|
|
|
|
|
|
void onRender();
|
2012-07-21 19:06:24 +00:00
|
|
|
void onInput(InputManager::InputButton button, bool keyDown);
|
2012-07-20 01:08:29 +00:00
|
|
|
|
|
|
|
void addObject(std::string name, void* obj);
|
2012-07-20 16:14:09 +00:00
|
|
|
void clear();
|
2012-07-20 01:08:29 +00:00
|
|
|
|
|
|
|
std::string getSelectedName();
|
|
|
|
void* getSelectedObject();
|
2012-07-21 19:06:24 +00:00
|
|
|
int getSelection();
|
2012-07-20 01:08:29 +00:00
|
|
|
private:
|
|
|
|
std::vector<std::string> mNameVector;
|
|
|
|
std::vector<void*> mPointerVector;
|
2012-07-21 19:06:24 +00:00
|
|
|
int mSelection;
|
2012-07-20 01:08:29 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|