24 #include "../Util/Hash.h" 25 #include "../Util/SelFmt.h" 27 #if defined(_WIN32) && defined(HR_ENGINE_SHARED) 29 # define MR_DllDeclare __declspec( dllexport ) 31 # define MR_DllDeclare __declspec( dllimport ) 34 # define MR_DllDeclare 46 UiFont(
const std::string &name,
double size = 20.0,
int style = 0) :
47 name(name), size(size), style(style) { }
48 UiFont(
double size = 20.0,
int style = 0) :
49 name(), size(size), style(style) { }
57 void Set(
const std::string &name,
double size = 20.0,
int style = 0)
64 void Set(
double size = 20.0,
int style = 0) noexcept
71 bool isBold() const noexcept {
return !!(style &
BOLD); }
88 static_cast<int>(a.
size) == static_cast<int>(b.
size) &&
101 if (fs.
name.empty()) {
107 if (fs.
isBold()) os <<
" Bold";
109 os <<
' ' << fs.
size;
126 std::size_t seed = 0;
#define MR_DllDeclare
Definition: UiFont.h:34
bool isItalic() const noexcept
Definition: UiFont.h:72
Describes a font used for the UI.
Definition: UiFont.h:44
std::string name
Definition: UiFont.h:80
UiFont(double size=20.0, int style=0)
Definition: UiFont.h:48
void Combine(std::size_t &seed, const T &v)
Mix in a value into a hash.
Definition: Hash.h:42
Style
Definition: UiFont.h:74
void Set(const std::string &name, double size=20.0, int style=0)
Definition: UiFont.h:57
MR_DllDeclare constexpr bool operator!=(const Color &a, const Color &b) noexcept
Definition: Color.h:72
UiFont(const std::string &name, double size=20.0, int style=0)
Definition: UiFont.h:46
std::ostream & operator<<(std::ostream &os, const Color &c)
Definition: Color.cpp:61
bool isBold() const noexcept
Definition: UiFont.h:71
Definition: ClientApp.h:64
int style
Definition: UiFont.h:82
MR_DllDeclare constexpr bool operator==(const Color &a, const Color &b) noexcept
Definition: Color.h:67
double size
Definition: UiFont.h:81
Definition: Announcement.h:24
void Set(double size=20.0, int style=0) noexcept
Definition: UiFont.h:64