2014-01-25 23:34:29 +00:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include "../GuiComponent.h"
|
2014-05-29 20:41:47 +00:00
|
|
|
#include "../HelpStyle.h"
|
2014-01-25 23:34:29 +00:00
|
|
|
|
|
|
|
class ImageComponent;
|
|
|
|
class TextureResource;
|
2014-03-24 01:33:27 +00:00
|
|
|
class ComponentGrid;
|
2014-01-25 23:34:29 +00:00
|
|
|
|
|
|
|
class HelpComponent : public GuiComponent
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
HelpComponent(Window* window);
|
|
|
|
|
|
|
|
void clearPrompts();
|
2014-03-24 01:33:27 +00:00
|
|
|
void setPrompts(const std::vector<HelpPrompt>& prompts);
|
2014-01-25 23:34:29 +00:00
|
|
|
|
|
|
|
void render(const Eigen::Affine3f& parent) override;
|
2014-05-15 01:58:16 +00:00
|
|
|
void setOpacity(unsigned char opacity) override;
|
2014-01-25 23:34:29 +00:00
|
|
|
|
2014-05-29 20:41:47 +00:00
|
|
|
void setStyle(const HelpStyle& style);
|
|
|
|
|
2014-01-25 23:34:29 +00:00
|
|
|
private:
|
|
|
|
std::shared_ptr<TextureResource> getIconTexture(const char* name);
|
|
|
|
std::map< std::string, std::shared_ptr<TextureResource> > mIconCache;
|
|
|
|
|
2014-03-24 01:33:27 +00:00
|
|
|
std::shared_ptr<ComponentGrid> mGrid;
|
|
|
|
void updateGrid();
|
2014-01-25 23:34:29 +00:00
|
|
|
|
2014-03-24 01:33:27 +00:00
|
|
|
std::vector<HelpPrompt> mPrompts;
|
2014-05-29 20:41:47 +00:00
|
|
|
HelpStyle mStyle;
|
2014-01-25 23:34:29 +00:00
|
|
|
};
|