yaze 0.3.2
Link to the Past ROM Editor
 
Loading...
Searching...
No Matches
dashboard_panel.cc
Go to the documentation of this file.
2
3#include <algorithm>
4#include <cfloat>
5#include <fstream>
6#include <sstream>
7
8#include "absl/strings/str_cat.h"
9#include "absl/strings/str_format.h"
11#include "app/gui/core/color.h"
12#include "app/gui/core/icons.h"
14#include "app/gui/core/style.h"
17#include "imgui/imgui.h"
18#include "imgui/imgui_internal.h"
19#include "util/file_util.h"
20
21namespace yaze {
22namespace editor {
23
24namespace {
25
26constexpr float kDashboardCardBaseWidth = 180.0f;
27constexpr float kDashboardCardBaseHeight = 120.0f;
28constexpr float kDashboardCardWidthMaxFactor = 1.35f;
29constexpr float kDashboardCardHeightMaxFactor = 1.35f;
30constexpr float kDashboardCardMinWidthFactor = 0.9f;
31constexpr float kDashboardCardMinHeightFactor = 0.9f;
32constexpr int kDashboardMaxColumns = 5;
33constexpr float kDashboardRecentBaseWidth = 150.0f;
34constexpr float kDashboardRecentBaseHeight = 35.0f;
35constexpr float kDashboardRecentWidthMaxFactor = 1.3f;
37
38struct FlowLayout {
39 int columns = 1;
40 float item_width = 0.0f;
41 float item_height = 0.0f;
42 float spacing = 0.0f;
43};
44
45FlowLayout ComputeFlowLayout(float avail_width, float min_width,
46 float max_width, float min_height,
47 float max_height, float aspect_ratio,
48 float spacing, int max_columns, int item_count) {
49 FlowLayout layout;
50 layout.spacing = spacing;
51 if (avail_width <= 0.0f) {
52 layout.columns = 1;
53 layout.item_width = min_width;
54 layout.item_height = min_height;
55 return layout;
56 }
57
58 const int clamped_max =
59 std::max(1, max_columns > 0 ? max_columns : item_count);
60 const auto width_for_columns = [avail_width, spacing](int columns) {
61 return (avail_width - spacing * static_cast<float>(columns - 1)) /
62 static_cast<float>(columns);
63 };
64
65 int columns = std::max(
66 1, static_cast<int>((avail_width + spacing) / (min_width + spacing)));
67 columns = std::min(columns, clamped_max);
68 if (item_count > 0) {
69 columns = std::min(columns, item_count);
70 }
71 columns = std::max(columns, 1);
72
73 float width = width_for_columns(columns);
74 while (columns < clamped_max && width > max_width) {
75 columns += 1;
76 width = width_for_columns(columns);
77 }
78
79 const float clamped_max_width = std::min(max_width, avail_width);
80 const float clamped_min_width = std::min(min_width, clamped_max_width);
81 layout.item_width = std::clamp(width, clamped_min_width, clamped_max_width);
82 layout.item_height =
83 std::clamp(layout.item_width * aspect_ratio, min_height, max_height);
84
85 layout.columns = columns;
86
87 return layout;
88}
89
90ImVec4 ScaleColor(const ImVec4& color, float scale, float alpha) {
91 return ImVec4(color.x * scale, color.y * scale, color.z * scale, alpha);
92}
93
94ImVec4 ScaleColor(const ImVec4& color, float scale) {
95 return ScaleColor(color, scale, color.w);
96}
97
98ImVec4 WithAlpha(ImVec4 color, float alpha) {
99 color.w = alpha;
100 return color;
101}
102
103ImVec4 GetEditorAccentColor(EditorType type, const gui::Theme& theme) {
104 switch (type) {
112 return gui::ConvertColorToImVec4(theme.info);
116 return gui::ConvertColorToImVec4(theme.accent);
118 return gui::ConvertColorToImVec4(theme.error);
120 return gui::ConvertColorToImVec4(theme.info);
123 case EditorType::kHex:
126 return gui::ConvertColorToImVec4(theme.info);
128 return gui::ConvertColorToImVec4(theme.accent);
131 default:
133 }
134}
135
136} // namespace
137
139 : editor_manager_(editor_manager), window_("Dashboard", ICON_MD_DASHBOARD) {
140 window_.SetDefaultSize(950, 650);
142
143 // Use platform-aware shortcut strings (Cmd on macOS, Ctrl elsewhere)
144 const char* ctrl = gui::GetCtrlDisplayName();
145 editors_ = {
146 {"Overworld", ICON_MD_MAP,
147 "Edit overworld maps, entrances, and properties",
148 absl::StrFormat("%s+1", ctrl), EditorType::kOverworld},
149 {"Dungeon", ICON_MD_CASTLE,
150 "Design dungeon rooms, layouts, and mechanics",
151 absl::StrFormat("%s+2", ctrl), EditorType::kDungeon},
152 {"Graphics", ICON_MD_PALETTE, "Modify tiles, palettes, and graphics sets",
153 absl::StrFormat("%s+3", ctrl), EditorType::kGraphics},
154 {"Sprites", ICON_MD_EMOJI_EMOTIONS, "Edit sprite graphics and properties",
155 absl::StrFormat("%s+4", ctrl), EditorType::kSprite},
156 {"Messages", ICON_MD_CHAT_BUBBLE, "Edit dialogue, signs, and text",
157 absl::StrFormat("%s+5", ctrl), EditorType::kMessage},
158 {"Music", ICON_MD_MUSIC_NOTE, "Configure music and sound effects",
159 absl::StrFormat("%s+6", ctrl), EditorType::kMusic},
160 {"Palettes", ICON_MD_COLOR_LENS, "Edit color palettes and animations",
161 absl::StrFormat("%s+7", ctrl), EditorType::kPalette},
162 {"Screens", ICON_MD_TV, "Edit title screen and ending screens",
163 absl::StrFormat("%s+8", ctrl), EditorType::kScreen},
164 {"Assembly", ICON_MD_CODE, "Write and edit assembly code",
165 absl::StrFormat("%s+9", ctrl), EditorType::kAssembly},
166 {"Hex Editor", ICON_MD_DATA_ARRAY,
167 "Direct ROM memory editing and comparison",
168 absl::StrFormat("%s+0", ctrl), EditorType::kHex},
169 {"Emulator", ICON_MD_VIDEOGAME_ASSET,
170 "Test and debug your ROM in real-time",
171 absl::StrFormat("%s+Shift+E", ctrl), EditorType::kEmulator},
172 {"AI Agent", ICON_MD_SMART_TOY,
173 "Configure AI agent, collaboration, and automation",
174 absl::StrFormat("%s+Shift+A", ctrl), EditorType::kAgent},
175 };
176
178}
179
181 if (!show_)
182 return;
183
184 // Set window properties immediately before Begin
185 ImVec2 center = ImGui::GetMainViewport()->GetCenter();
186 ImGui::SetNextWindowPos(center, ImGuiCond_Appearing, ImVec2(0.5f, 0.5f));
187 ImGui::SetNextWindowSize(ImVec2(950, 650), ImGuiCond_Appearing);
188
189 if (window_.Begin(&show_)) {
191 ImGui::Separator();
192 ImGui::Spacing();
193
195 if (!recent_editors_.empty()) {
196 ImGui::Separator();
197 ImGui::Spacing();
198 }
200 }
201 window_.End();
202}
203
205 const auto& theme = gui::ThemeManager::Get().GetCurrentTheme();
206 const ImVec4 accent = gui::ConvertColorToImVec4(theme.accent);
207 const ImVec4 text_secondary = gui::ConvertColorToImVec4(theme.text_secondary);
208
209 ImGui::PushFont(ImGui::GetIO().Fonts->Fonts[2]); // Large font
210 ImGui::TextColored(accent, ICON_MD_EDIT " Select an Editor");
211 ImGui::PopFont();
212
213 ImGui::TextColored(text_secondary,
214 "Choose an editor to begin working on your ROM. "
215 "You can open multiple editors simultaneously.");
216}
217
219 if (recent_editors_.empty())
220 return;
221
222 const auto& theme = gui::ThemeManager::Get().GetCurrentTheme();
223 const ImVec4 accent = gui::ConvertColorToImVec4(theme.accent);
224 ImGui::TextColored(accent, ICON_MD_HISTORY " Recently Used");
225 ImGui::Spacing();
226
227 const ImGuiStyle& style = ImGui::GetStyle();
228 const float avail_width = ImGui::GetContentRegionAvail().x;
229 const float min_width = kDashboardRecentBaseWidth;
230 const float max_width =
231 kDashboardRecentBaseWidth * kDashboardRecentWidthMaxFactor;
232 const float height =
233 std::max(kDashboardRecentBaseHeight, ImGui::GetFrameHeight());
234 const float spacing = style.ItemSpacing.x;
235 const bool stack_items = avail_width < min_width * 1.6f;
236 FlowLayout row_layout{};
237 if (stack_items) {
238 row_layout.columns = 1;
239 row_layout.item_width = avail_width;
240 row_layout.item_height = height;
241 row_layout.spacing = spacing;
242 } else {
243 row_layout = ComputeFlowLayout(avail_width, min_width, max_width, height,
244 height, height / std::max(min_width, 1.0f),
245 spacing, kDashboardMaxRecentColumns,
246 static_cast<int>(recent_editors_.size()));
247 }
248
249 ImGuiTableFlags table_flags =
250 ImGuiTableFlags_SizingFixedFit | ImGuiTableFlags_NoPadOuterX;
251 const ImVec2 cell_padding(row_layout.spacing * 0.5f,
252 style.ItemSpacing.y * 0.4f);
253 ImGui::PushStyleVar(ImGuiStyleVar_CellPadding, cell_padding);
254 if (ImGui::BeginTable("DashboardRecentGrid", row_layout.columns,
255 table_flags)) {
256 for (EditorType type : recent_editors_) {
257 // Find editor info
258 auto it = std::find_if(
259 editors_.begin(), editors_.end(),
260 [type](const EditorInfo& info) { return info.type == type; });
261
262 if (it == editors_.end()) {
263 continue;
264 }
265
266 ImGui::TableNextColumn();
267
268 const ImVec4 base_color = GetEditorAccentColor(it->type, theme);
269 ImGui::PushStyleColor(ImGuiCol_Button,
270 ScaleColor(base_color, 0.5f, 0.7f));
271 ImGui::PushStyleColor(ImGuiCol_ButtonHovered,
272 ScaleColor(base_color, 0.7f, 0.9f));
273 ImGui::PushStyleColor(ImGuiCol_ButtonActive, WithAlpha(base_color, 1.0f));
274
275 ImVec2 button_size(
276 stack_items ? avail_width : row_layout.item_width,
277 row_layout.item_height > 0.0f ? row_layout.item_height : height);
278 if (ImGui::Button(absl::StrCat(it->icon, " ", it->name).c_str(),
279 button_size)) {
280 if (editor_manager_) {
281 MarkRecentlyUsed(type);
283 show_ = false;
284 }
285 }
286
287 ImGui::PopStyleColor(3);
288
289 if (ImGui::IsItemHovered()) {
290 ImGui::SetTooltip("%s", it->description.c_str());
291 }
292 }
293 ImGui::EndTable();
294 }
295 ImGui::PopStyleVar();
296}
297
299 ImGui::Text(ICON_MD_APPS " All Editors");
300 ImGui::Spacing();
301
302 const ImGuiStyle& style = ImGui::GetStyle();
303 const float avail_width = ImGui::GetContentRegionAvail().x;
304 const float min_width =
305 kDashboardCardBaseWidth * kDashboardCardMinWidthFactor;
306 const float max_width =
307 kDashboardCardBaseWidth * kDashboardCardWidthMaxFactor;
308 const float min_height =
309 std::max(kDashboardCardBaseHeight * kDashboardCardMinHeightFactor,
310 ImGui::GetFrameHeight() * 3.2f);
311 const float max_height =
312 kDashboardCardBaseHeight * kDashboardCardHeightMaxFactor;
313 const float aspect_ratio =
314 kDashboardCardBaseHeight / std::max(kDashboardCardBaseWidth, 1.0f);
315 const float spacing = style.ItemSpacing.x;
316
317 FlowLayout layout = ComputeFlowLayout(
318 avail_width, min_width, max_width, min_height, max_height, aspect_ratio,
319 spacing, kDashboardMaxColumns, static_cast<int>(editors_.size()));
320
321 ImGuiTableFlags table_flags =
322 ImGuiTableFlags_SizingFixedFit | ImGuiTableFlags_NoPadOuterX;
323 const ImVec2 cell_padding(layout.spacing * 0.5f, style.ItemSpacing.y * 0.5f);
324 ImGui::PushStyleVar(ImGuiStyleVar_CellPadding, cell_padding);
325 if (ImGui::BeginTable("DashboardEditorGrid", layout.columns, table_flags)) {
326 for (size_t i = 0; i < editors_.size(); ++i) {
327 ImGui::TableNextColumn();
328 DrawEditorPanel(editors_[i], static_cast<int>(i),
329 ImVec2(layout.item_width, layout.item_height));
330 }
331 ImGui::EndTable();
332 }
333 ImGui::PopStyleVar();
334}
335
336void DashboardPanel::DrawEditorPanel(const EditorInfo& info, int index,
337 const ImVec2& card_size) {
338 ImGui::PushID(index);
339
340 const auto& theme = gui::ThemeManager::Get().GetCurrentTheme();
341 const ImVec4 base_color = GetEditorAccentColor(info.type, theme);
342 const ImVec4 text_primary = gui::ConvertColorToImVec4(theme.text_primary);
343 const ImVec4 text_secondary = gui::ConvertColorToImVec4(theme.text_secondary);
344 const ImVec4 accent = gui::ConvertColorToImVec4(theme.accent);
345 ImFont* text_font = ImGui::GetFont();
346 const float text_font_size = ImGui::GetFontSize();
347
348 const ImGuiStyle& style = ImGui::GetStyle();
349 const float line_height = ImGui::GetTextLineHeight();
350 const float padding_x = std::max(style.FramePadding.x, card_size.x * 0.06f);
351 const float padding_y = std::max(style.FramePadding.y, card_size.y * 0.08f);
352
353 const float footer_height = info.shortcut.empty() ? 0.0f : line_height;
354 const float footer_spacing =
355 info.shortcut.empty() ? 0.0f : style.ItemSpacing.y;
356 const float available_icon_height = card_size.y - padding_y * 2.0f -
357 line_height - footer_height -
358 footer_spacing;
359 const float min_icon_radius = line_height * 0.9f;
360 float max_icon_radius = card_size.y * 0.24f;
361 max_icon_radius = std::max(max_icon_radius, min_icon_radius);
362 const float icon_radius = std::clamp(available_icon_height * 0.5f,
363 min_icon_radius, max_icon_radius);
364
365 const ImVec2 cursor_pos = ImGui::GetCursorScreenPos();
366 ImDrawList* draw_list = ImGui::GetWindowDrawList();
367 const ImVec2 icon_center(cursor_pos.x + card_size.x * 0.5f,
368 cursor_pos.y + padding_y + icon_radius);
369 float title_y = icon_center.y + icon_radius + style.ItemSpacing.y;
370 const float footer_y = cursor_pos.y + card_size.y - padding_y - footer_height;
371 if (title_y + line_height > footer_y - style.ItemSpacing.y) {
372 title_y = footer_y - line_height - style.ItemSpacing.y;
373 }
374
375 bool is_recent = std::find(recent_editors_.begin(), recent_editors_.end(),
376 info.type) != recent_editors_.end();
377
378 // Create gradient background
379 ImU32 color_top = ImGui::GetColorU32(ScaleColor(base_color, 0.4f, 0.85f));
380 ImU32 color_bottom = ImGui::GetColorU32(ScaleColor(base_color, 0.2f, 0.9f));
381
382 // Draw gradient card background
383 draw_list->AddRectFilledMultiColor(
384 cursor_pos,
385 ImVec2(cursor_pos.x + card_size.x, cursor_pos.y + card_size.y), color_top,
386 color_top, color_bottom, color_bottom);
387
388 // Colored border
389 ImU32 border_color =
390 is_recent ? ImGui::GetColorU32(WithAlpha(base_color, 1.0f))
391 : ImGui::GetColorU32(ScaleColor(base_color, 0.6f, 0.7f));
392 const float rounding = std::max(style.FrameRounding, card_size.y * 0.05f);
393 const float border_thickness =
394 is_recent ? std::max(2.0f, style.FrameBorderSize + 1.0f)
395 : std::max(1.0f, style.FrameBorderSize);
396 draw_list->AddRect(
397 cursor_pos,
398 ImVec2(cursor_pos.x + card_size.x, cursor_pos.y + card_size.y),
399 border_color, rounding, 0, border_thickness);
400
401 // Recent indicator badge
402 if (is_recent) {
403 const float badge_radius =
404 std::clamp(line_height * 0.6f, line_height * 0.4f, line_height);
405 ImVec2 badge_pos(cursor_pos.x + card_size.x - padding_x - badge_radius,
406 cursor_pos.y + padding_y + badge_radius);
407 draw_list->AddCircleFilled(badge_pos, badge_radius,
408 ImGui::GetColorU32(base_color), 16);
409 const ImU32 star_color = ImGui::GetColorU32(text_primary);
410 const ImVec2 star_size =
411 text_font->CalcTextSizeA(text_font_size, FLT_MAX, 0.0f, ICON_MD_STAR);
412 const ImVec2 star_pos(badge_pos.x - star_size.x * 0.5f,
413 badge_pos.y - star_size.y * 0.5f);
414 draw_list->AddText(text_font, text_font_size, star_pos, star_color,
416 }
417
418 // Make button transparent (we draw our own background)
419 ImVec4 button_bg = ImGui::GetStyleColorVec4(ImGuiCol_Button);
420 button_bg.w = 0.0f;
421 ImGui::PushStyleColor(ImGuiCol_Button, button_bg);
422 ImGui::PushStyleColor(ImGuiCol_ButtonHovered,
423 ScaleColor(base_color, 0.3f, 0.5f));
424 ImGui::PushStyleColor(ImGuiCol_ButtonActive,
425 ScaleColor(base_color, 0.5f, 0.7f));
426
427 bool clicked =
428 ImGui::Button(absl::StrCat("##", info.name).c_str(), card_size);
429 bool is_hovered = ImGui::IsItemHovered();
430
431 ImGui::PopStyleColor(3);
432
433 // Draw icon with colored background circle
434 ImU32 icon_bg = ImGui::GetColorU32(base_color);
435 draw_list->AddCircleFilled(icon_center, icon_radius, icon_bg, 32);
436
437 // Draw icon
438 ImFont* icon_font = ImGui::GetFont();
439 if (ImGui::GetIO().Fonts->Fonts.size() > 2 &&
440 card_size.y >= kDashboardCardBaseHeight) {
441 icon_font = ImGui::GetIO().Fonts->Fonts[2];
442 } else if (ImGui::GetIO().Fonts->Fonts.size() > 1) {
443 icon_font = ImGui::GetIO().Fonts->Fonts[1];
444 }
445 ImGui::PushFont(icon_font);
446 const float icon_font_size = ImGui::GetFontSize();
447 const ImVec2 icon_size = icon_font->CalcTextSizeA(icon_font_size, FLT_MAX,
448 0.0f, info.icon.c_str());
449 ImGui::PopFont();
450 const ImVec2 icon_text_pos(icon_center.x - icon_size.x * 0.5f,
451 icon_center.y - icon_size.y * 0.5f);
452 draw_list->AddText(icon_font, icon_font_size, icon_text_pos,
453 ImGui::GetColorU32(text_primary), info.icon.c_str());
454
455 // Draw name
456 const ImVec2 name_size = text_font->CalcTextSizeA(text_font_size, FLT_MAX,
457 0.0f, info.name.c_str());
458 float name_x = cursor_pos.x + (card_size.x - name_size.x) * 0.5f;
459 const float name_min_x = cursor_pos.x + padding_x;
460 const float name_max_x = cursor_pos.x + card_size.x - padding_x;
461 name_x = std::clamp(name_x, name_min_x, name_max_x);
462 const ImVec2 name_pos(name_x, title_y);
463 const ImVec4 name_clip(name_min_x, cursor_pos.y + padding_y, name_max_x,
464 footer_y);
465 draw_list->AddText(text_font, text_font_size, name_pos,
466 ImGui::GetColorU32(base_color), info.name.c_str(), nullptr,
467 0.0f, &name_clip);
468
469 // Draw shortcut hint if available
470 if (!info.shortcut.empty()) {
471 const ImVec2 shortcut_pos(cursor_pos.x + padding_x, footer_y);
472 const ImVec4 shortcut_clip(cursor_pos.x + padding_x, footer_y,
473 cursor_pos.x + card_size.x - padding_x,
474 cursor_pos.y + card_size.y - padding_y);
475 draw_list->AddText(text_font, text_font_size, shortcut_pos,
476 ImGui::GetColorU32(text_secondary),
477 info.shortcut.c_str(), nullptr, 0.0f, &shortcut_clip);
478 }
479
480 // Hover glow effect
481 if (is_hovered) {
482 ImU32 glow_color = ImGui::GetColorU32(ScaleColor(base_color, 1.0f, 0.18f));
483 draw_list->AddRectFilled(
484 cursor_pos,
485 ImVec2(cursor_pos.x + card_size.x, cursor_pos.y + card_size.y),
486 glow_color, rounding);
487 }
488
489 // Enhanced tooltip
490 if (is_hovered) {
491 const float tooltip_width = std::clamp(card_size.x * 1.4f, 240.0f, 340.0f);
492 ImGui::SetNextWindowSize(ImVec2(tooltip_width, 0), ImGuiCond_Always);
493 ImGui::BeginTooltip();
494 ImGui::PushFont(ImGui::GetIO().Fonts->Fonts[1]); // Medium font
495 ImGui::TextColored(base_color, "%s %s", info.icon.c_str(),
496 info.name.c_str());
497 ImGui::PopFont();
498 ImGui::Separator();
499 ImGui::PushTextWrapPos(ImGui::GetCursorPos().x + tooltip_width - 20.0f);
500 ImGui::TextWrapped("%s", info.description.c_str());
501 ImGui::PopTextWrapPos();
502 if (!info.shortcut.empty()) {
503 ImGui::Spacing();
504 ImGui::TextColored(base_color, ICON_MD_KEYBOARD " %s",
505 info.shortcut.c_str());
506 }
507 if (is_recent) {
508 ImGui::Spacing();
509 ImGui::TextColored(accent, ICON_MD_STAR " Recently used");
510 }
511 ImGui::EndTooltip();
512 }
513
514 if (clicked) {
515 if (editor_manager_) {
518 show_ = false;
519 }
520 }
521
522 ImGui::PopID();
523}
524
526 // Remove if already in list
527 auto it = std::find(recent_editors_.begin(), recent_editors_.end(), type);
528 if (it != recent_editors_.end()) {
529 recent_editors_.erase(it);
530 }
531
532 // Add to front
533 recent_editors_.insert(recent_editors_.begin(), type);
534
535 // Limit size
536 if (recent_editors_.size() > kMaxRecentEditors) {
538 }
539
541}
542
544 try {
545 auto data = util::LoadFileFromConfigDir("recent_editors.txt");
546 if (!data.empty()) {
547 std::istringstream ss(data);
548 std::string line;
549 while (std::getline(ss, line) &&
551 int type_int = std::stoi(line);
552 if (type_int >= 0 &&
553 type_int < static_cast<int>(EditorType::kSettings)) {
554 recent_editors_.push_back(static_cast<EditorType>(type_int));
555 }
556 }
557 }
558 } catch (...) {
559 // Ignore errors
560 }
561}
562
564 try {
565 std::ostringstream ss;
566 for (EditorType type : recent_editors_) {
567 ss << static_cast<int>(type) << "\n";
568 }
569 util::SaveFile("recent_editors.txt", ss.str());
570 } catch (...) {
571 // Ignore save errors
572 }
573}
574
579
580} // namespace editor
581} // namespace yaze
std::vector< EditorInfo > editors_
void DrawEditorPanel(const EditorInfo &info, int index, const ImVec2 &card_size)
DashboardPanel(EditorManager *editor_manager)
static constexpr size_t kMaxRecentEditors
std::vector< EditorType > recent_editors_
void MarkRecentlyUsed(EditorType type)
The EditorManager controls the main editor window and manages the various editor classes.
void SwitchToEditor(EditorType editor_type, bool force_visible=false, bool from_dialog=false)
void SetPosition(Position pos)
bool Begin(bool *p_open=nullptr)
void SetDefaultSize(float width, float height)
const Theme & GetCurrentTheme() const
static ThemeManager & Get()
#define ICON_MD_APPS
Definition icons.h:168
#define ICON_MD_EMOJI_EMOTIONS
Definition icons.h:672
#define ICON_MD_DATA_ARRAY
Definition icons.h:519
#define ICON_MD_STAR
Definition icons.h:1848
#define ICON_MD_MAP
Definition icons.h:1173
#define ICON_MD_CODE
Definition icons.h:434
#define ICON_MD_VIDEOGAME_ASSET
Definition icons.h:2076
#define ICON_MD_CHAT_BUBBLE
Definition icons.h:395
#define ICON_MD_EDIT
Definition icons.h:645
#define ICON_MD_CASTLE
Definition icons.h:380
#define ICON_MD_MUSIC_NOTE
Definition icons.h:1264
#define ICON_MD_KEYBOARD
Definition icons.h:1028
#define ICON_MD_DASHBOARD
Definition icons.h:517
#define ICON_MD_PALETTE
Definition icons.h:1370
#define ICON_MD_TV
Definition icons.h:2032
#define ICON_MD_COLOR_LENS
Definition icons.h:440
#define ICON_MD_SMART_TOY
Definition icons.h:1781
#define ICON_MD_HISTORY
Definition icons.h:946
ImVec4 GetEditorAccentColor(EditorType type, const gui::Theme &theme)
ImVec4 ScaleColor(const ImVec4 &color, float scale, float alpha)
FlowLayout ComputeFlowLayout(float avail_width, float min_width, float max_width, float min_height, float max_height, float aspect_ratio, float spacing, int max_columns, int item_count)
const char * GetCtrlDisplayName()
Get the display name for the primary modifier key.
ImVec4 ConvertColorToImVec4(const Color &color)
Definition color.h:23
void SaveFile(const std::string &filename, const std::string &contents)
Definition file_util.cc:56
std::string LoadFileFromConfigDir(const std::string &filename)
Loads a file from the user's config directory.
Definition file_util.cc:38
Comprehensive theme structure for YAZE.