| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
#pragma once |
| 10 |
|
| 11 |
|
| 12 |
|
| 13 |
|
| 14 |
|
| 15 |
|
| 16 |
#include "guilib/GUIListItem.h" |
| 17 |
#include "utils/ColorUtils.h" |
| 18 |
|
| 19 |
#include <string> |
| 20 |
|
| 21 |
class CGUIListItem; |
| 22 |
|
| 23 |
namespace KODI |
| 24 |
{ |
| 25 |
namespace GUILIB |
| 26 |
{ |
| 27 |
namespace GUIINFO |
| 28 |
{ |
| 29 |
|
| 30 |
class CGUIInfoColor |
| 31 |
{ |
| 32 |
public: |
| 33 |
constexpr CGUIInfoColor(UTILS::COLOR::Color color = 0) : m_color(color) {} |
| 34 |
|
| 35 |
constexpr operator UTILS::COLOR::Color() const { return m_color; } |
| 36 |
|
| 37 |
bool Update(const CGUIListItem* item = nullptr); |
| 38 |
void Parse(const std::string &label, int context); |
| 39 |
|
| 40 |
|
| 41 |
|
| 42 |
|
| 43 |
|
| 44 |
bool HasInfo() const { return m_info != 0; } |
| 45 |
|
| 46 |
private: |
| 47 |
int m_info = 0; |
| 48 |
UTILS::COLOR::Color m_color; |
| 49 |
}; |
| 50 |
|
| 51 |
} |
| 52 |
} |
| 53 |
} |