ES-DE/es-core/src/components/HelpComponent.h

37 lines
842 B
C
Raw Normal View History

#pragma once
#ifndef ES_CORE_COMPONENTS_HELP_COMPONENT_H
#define ES_CORE_COMPONENTS_HELP_COMPONENT_H
#include "GuiComponent.h"
#include "HelpStyle.h"
2017-11-01 22:21:10 +00:00
class ComponentGrid;
class ImageComponent;
class TextureResource;
class HelpComponent : public GuiComponent
{
public:
HelpComponent(Window* window);
void clearPrompts();
void setPrompts(const std::vector<HelpPrompt>& prompts);
void render(const Transform4x4f& parent) override;
void setOpacity(unsigned char opacity) override;
2014-05-29 20:41:47 +00:00
void setStyle(const HelpStyle& style);
private:
std::shared_ptr<TextureResource> getIconTexture(const char* name);
std::map< std::string, std::shared_ptr<TextureResource> > mIconCache;
std::shared_ptr<ComponentGrid> mGrid;
void updateGrid();
std::vector<HelpPrompt> mPrompts;
2014-05-29 20:41:47 +00:00
HelpStyle mStyle;
};
#endif // ES_CORE_COMPONENTS_HELP_COMPONENT_H