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

46 lines
1 KiB
C
Raw Normal View History

// SPDX-License-Identifier: MIT
//
// EmulationStation Desktop Edition
// HelpComponent.h
//
// Help information in icon and text pairs.
//
#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 assignIcons();
void clearPrompts();
void setPrompts(const std::vector<HelpPrompt>& prompts);
void render(const glm::mat4& parent) override;
void setOpacity(unsigned char opacity) override;
void setStyle(const HelpStyle& style);
2014-05-29 20:41:47 +00:00
private:
std::shared_ptr<TextureResource> getIconTexture(const char* name);
2021-03-27 09:26:13 +00:00
std::map<std::string, std::shared_ptr<TextureResource>> mIconCache;
std::shared_ptr<ComponentGrid> mGrid;
void updateGrid();
std::vector<HelpPrompt> mPrompts;
HelpStyle mStyle;
};
#endif // ES_CORE_COMPONENTS_HELP_COMPONENT_H