2014-01-25 23:34:29 +00:00
|
|
|
#pragma once
|
2017-10-31 17:12:50 +00:00
|
|
|
#ifndef ES_CORE_COMPONENTS_HELP_COMPONENT_H
|
|
|
|
#define ES_CORE_COMPONENTS_HELP_COMPONENT_H
|
2014-01-25 23:34:29 +00:00
|
|
|
|
2014-06-20 01:30:09 +00:00
|
|
|
#include "GuiComponent.h"
|
|
|
|
#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
|
|
|
|
2017-10-28 20:24:35 +00:00
|
|
|
void render(const Transform4x4f& 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
|
|
|
};
|
2017-10-31 17:12:50 +00:00
|
|
|
|
|
|
|
#endif // ES_CORE_COMPONENTS_HELP_COMPONENT_H
|