-
Notifications
You must be signed in to change notification settings - Fork 106
Expand file tree
/
Copy pathLabelCellOption.h
More file actions
68 lines (45 loc) · 1.55 KB
/
LabelCellOption.h
File metadata and controls
68 lines (45 loc) · 1.55 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
/* Label Cell
*
* From: https://github.com/PokemonAutomation/
*
*/
#ifndef PokemonAutomation_Options_LabelCellOption_H
#define PokemonAutomation_Options_LabelCellOption_H
#include "Common/Cpp/ImageResolution.h"
#include "Common/Cpp/Containers/Pimpl.h"
#include "Common/Cpp/Options/ConfigOption.h"
#include "CommonFramework/ImageTypes/ImageViewRGB32.h"
//#include "CommonFramework/ImageTypes/ImageRGB32.h"
namespace PokemonAutomation{
class LabelCellOption : public ConfigOptionImpl<LabelCellOption>{
public:
~LabelCellOption();
// Make label with no icon.
LabelCellOption(
LockMode lock_while_running,
std::string text
);
// Make label with the icon in its original resolution.
LabelCellOption(
LockMode lock_while_running,
std::string text, const ImageViewRGB32& icon
);
// Make label with icon and scale it so that the largest dimension is "icon_size" pixels.
LabelCellOption(
LockMode lock_while_running,
std::string text, const ImageViewRGB32& icon, size_t icon_size
);
// LabelCellOption(std::string text, ImageRGB32 icon);
const std::string& text() const;
const ImageViewRGB32& icon() const;
Resolution resolution() const;
void set_text(std::string x);
virtual void load_json(const JsonValue& json) override;
virtual JsonValue to_json() const override;
virtual void restore_defaults() override{}
private:
struct Data;
Pimpl<Data> m_data;
};
}
#endif