2021-09-05 01:40:23 +00:00
|
|
|
// SPDX-License-Identifier: MIT
|
|
|
|
//
|
|
|
|
// EmulationStation Desktop Edition
|
|
|
|
// BadgesComponent.h
|
|
|
|
//
|
|
|
|
// Game badges icons.
|
|
|
|
// Used by gamelist views.
|
|
|
|
//
|
|
|
|
|
|
|
|
#ifndef ES_APP_COMPONENTS_BADGES_COMPONENT_H
|
|
|
|
#define ES_APP_COMPONENTS_BADGES_COMPONENT_H
|
|
|
|
|
2021-09-07 15:21:54 +00:00
|
|
|
#include "FlexboxComponent.h"
|
2021-09-05 01:40:23 +00:00
|
|
|
#include "GuiComponent.h"
|
2021-09-07 15:21:54 +00:00
|
|
|
#include "ImageComponent.h"
|
2021-09-05 01:40:23 +00:00
|
|
|
#include "renderers/Renderer.h"
|
|
|
|
|
|
|
|
#define NUM_SLOTS 4
|
|
|
|
#define SLOT_FAVORITE "favorite"
|
|
|
|
#define SLOT_COMPLETED "completed"
|
|
|
|
#define SLOT_KIDS "kidgame"
|
|
|
|
#define SLOT_BROKEN "broken"
|
2021-09-26 20:26:47 +00:00
|
|
|
#define SLOT_ALTERNATIVE_EMULATOR "altemu"
|
2021-09-05 01:40:23 +00:00
|
|
|
|
|
|
|
class TextureResource;
|
|
|
|
|
2021-09-07 15:21:54 +00:00
|
|
|
class BadgesComponent : public FlexboxComponent
|
2021-09-05 01:40:23 +00:00
|
|
|
{
|
|
|
|
public:
|
2021-09-26 20:45:10 +00:00
|
|
|
BadgesComponent(Window *window);
|
|
|
|
|
|
|
|
~BadgesComponent() noexcept;
|
2021-09-05 01:40:23 +00:00
|
|
|
|
|
|
|
std::string getValue() const override;
|
|
|
|
// Should be a list of strings.
|
2021-09-26 17:45:05 +00:00
|
|
|
void setValue(const std::string &value) override;
|
2021-09-05 01:40:23 +00:00
|
|
|
|
2021-09-26 17:45:05 +00:00
|
|
|
virtual void applyTheme(const std::shared_ptr<ThemeData> &theme,
|
|
|
|
const std::string &view,
|
|
|
|
const std::string &element,
|
2021-09-05 01:40:23 +00:00
|
|
|
unsigned int properties) override;
|
|
|
|
|
|
|
|
virtual std::vector<HelpPrompt> getHelpPrompts() override;
|
|
|
|
|
|
|
|
private:
|
2021-09-26 17:45:05 +00:00
|
|
|
static const std::vector<std::string> mSlots;
|
|
|
|
static std::map<std::string, std::string> mBadgeIcons;
|
|
|
|
static std::map<std::string, ImageComponent> mImageComponents;
|
2021-09-05 01:40:23 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif // ES_APP_COMPONENTS_BADGES_COMPONENT_H
|