1#ifndef NANOMMO_CLIENT_THEME_H_
2#define NANOMMO_CLIENT_THEME_H_
14inline constexpr ImU32
kNight = IM_COL32(11, 5, 7, 255);
15inline constexpr ImU32
kCoal = IM_COL32(30, 14, 17, 255);
16inline constexpr ImU32
kWine = IM_COL32(76, 11, 20, 255);
17inline constexpr ImU32
kCrimson = IM_COL32(148, 18, 31, 255);
18inline constexpr ImU32
kRed = IM_COL32(196, 29, 41, 255);
19inline constexpr ImU32
kEmber = IM_COL32(255, 90, 60, 255);
20inline constexpr ImU32
kFlame = IM_COL32(255, 160, 74, 255);
21inline constexpr ImU32
kGold = IM_COL32(255, 211, 77, 255);
22inline constexpr ImU32
kGoldLight = IM_COL32(255, 243, 196, 255);
23inline constexpr ImU32
kGoldDark = IM_COL32(201, 138, 18, 255);
25inline constexpr ImU32
kBrass = IM_COL32(138, 98, 38, 255);
26inline constexpr ImU32
kPaper = IM_COL32(243, 233, 220, 255);
27inline constexpr ImU32
kMuted = IM_COL32(181, 162, 151, 255);
28inline constexpr ImU32
kFaint = IM_COL32(143, 123, 112, 255);
29inline constexpr ImU32
kShadow = IM_COL32(0, 0, 0, 200);
30inline constexpr ImU32
kHealth = IM_COL32(214, 52, 46, 255);
31inline constexpr ImU32
kHealthDark = IM_COL32(110, 16, 22, 255);
32inline constexpr ImU32
kGood = IM_COL32(126, 214, 112, 255);
36ImU32
Faded(ImU32 color,
float share);
67inline float Ui(
float points) {
return points *
UiScale(); }
68inline ImVec2
Ui(ImVec2 points) {
return {
Ui(points.x),
Ui(points.y)}; }
74void PathPanel(ImDrawList* draw, ImVec2 min, ImVec2 max,
float cut);
78void DrawPanel(ImDrawList* draw, ImVec2 min, ImVec2 max,
float alpha = 0.96f);
81void DrawDiamond(ImDrawList* draw, ImVec2 centre,
float radius, ImU32 fill,
86void DrawDivider(ImDrawList* draw, ImVec2 left,
float width);
90 ImU32 color,
const char* text);
95 ImU32 top, ImU32 bottom,
const char* text);
98void DrawTitle(ImDrawList* draw, ImVec2 top_centre,
float size,
102std::string
Shown(
const char* label);
107bool BeginPanel(
const char* name,
bool* open, ImGuiWindowFlags flags = 0,
108 float alpha = 0.96f);
115bool GameButton(
const char* label, ImVec2 size,
bool primary =
false,
116 bool enabled =
true);
120void DrawBar(ImDrawList* draw, ImVec2 min, ImVec2 max,
float share, ImU32 color,
121 ImU32 dark,
const char* text);
126void DrawSlot(ImDrawList* draw, ImVec2 min, ImVec2 max, ImU32 edge);
133 const char* icon,
bool hovered,
bool on =
false);
136void DrawSlotIcon(ImDrawList* draw, ImVec2 min, ImVec2 max,
const char* icon,
137 ImU32 color,
float alpha = 1.0f);
141void DrawDragged(
const char* icon, ImU32 color,
float size, ImVec2 grab);
146void DrawBackdrop(ImDrawList* draw, ImVec2 size,
float time);
150void DrawLogo(ImDrawList* draw, ImVec2 top_centre,
float size);
constexpr ImU32 kGoldDark
constexpr ImU32 kGoldLight
constexpr ImU32 kBrass
The trim round every panel: gold gone dark with age.
constexpr ImU32 kHealthDark
bool BeginPanel(const char *name, bool *open, ImGuiWindowFlags flags, float alpha)
void DrawPanel(ImDrawList *draw, ImVec2 min, ImVec2 max, float alpha)
void DrawLogo(ImDrawList *draw, ImVec2 top_centre, float size)
void DrawBar(ImDrawList *draw, ImVec2 min, ImVec2 max, float share, ImU32 color, ImU32 dark, const char *text)
constexpr float kTextSize
In points, at a scale of one.
void DrawDivider(ImDrawList *draw, ImVec2 left, float width)
void DrawRoundButton(ImDrawList *draw, ImVec2 centre, float radius, const char *icon, bool hovered, bool on)
void DrawSlotIcon(ImDrawList *draw, ImVec2 min, ImVec2 max, const char *icon, ImU32 color, float alpha)
An icon in the middle of a slot, in its colour, on a glow of that colour.
std::string FontFolder()
Where the client's fonts are, next to it.
void LoadFonts(const std::string &folder)
void DrawDragged(const char *icon, ImU32 color, float size, ImVec2 grab)
void ApplyTheme(float at)
ImGui's style in our colours, with its sizes and its text at the scale.
ImU32 Faded(ImU32 color, float share)
The same colour, with its alpha times the share.
float InterfaceScale(float height, float player)
void DrawDiamond(ImDrawList *draw, ImVec2 centre, float radius, ImU32 fill, ImU32 outline)
A diamond, filled, with an outline.
void DrawBackdrop(ImDrawList *draw, ImVec2 size, float time)
void DrawTitle(ImDrawList *draw, ImVec2 top_centre, float size, const char *text)
A title in carved gold capitals, centred on the point at its top.
bool GameButton(const char *label, ImVec2 size, bool primary, bool enabled)
void DrawGradientText(ImDrawList *draw, ImFont *font, float size, ImVec2 at, ImU32 top, ImU32 bottom, const char *text)
void DrawShadowedText(ImDrawList *draw, ImFont *font, float size, ImVec2 at, ImU32 color, const char *text)
Text with a shadow under it.
void DrawSlot(ImDrawList *draw, ImVec2 min, ImVec2 max, ImU32 edge)
void PathPanel(ImDrawList *draw, ImVec2 min, ImVec2 max, float cut)
A panel's shape: a rectangle with its corners cut off.
std::string Shown(const char *label)
The part of an ImGui label that's shown: what's before any "##".