mirror of
https://github.com/RetroDECK/ES-DE.git
synced 2024-12-01 10:35:38 +00:00
e4fdd1e20d
As of this commit, the initial code cleanup and code documentation has been completed for the entire application.
43 lines
953 B
C++
43 lines
953 B
C++
//
|
|
// HelpComponent.h
|
|
//
|
|
// Help information in icon and text pairs.
|
|
//
|
|
|
|
#pragma once
|
|
#ifndef ES_CORE_COMPONENTS_HELP_COMPONENT_H
|
|
#define ES_CORE_COMPONENTS_HELP_COMPONENT_H
|
|
|
|
#include "GuiComponent.h"
|
|
#include "HelpStyle.h"
|
|
|
|
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;
|
|
|
|
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;
|
|
HelpStyle mStyle;
|
|
};
|
|
|
|
#endif // ES_CORE_COMPONENTS_HELP_COMPONENT_H
|