yaze 0.3.2
Link to the Past ROM Editor
 
Loading...
Searching...
No Matches
editor_selection_dialog.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"
10#include "app/gui/core/color.h"
11#include "app/gui/core/icons.h"
13#include "app/gui/core/style.h"
16#include "imgui/imgui.h"
17#include "util/file_util.h"
18
19namespace yaze {
20namespace editor {
21
22namespace {
23
24constexpr float kEditorSelectBaseFontSize = 16.0f;
25constexpr float kEditorSelectCardBaseWidth = 180.0f;
26constexpr float kEditorSelectCardBaseHeight = 120.0f;
27constexpr float kEditorSelectCardWidthMaxFactor = 1.35f;
28constexpr float kEditorSelectCardHeightMaxFactor = 1.35f;
29constexpr float kEditorSelectRecentBaseWidth = 150.0f;
30constexpr float kEditorSelectRecentBaseHeight = 35.0f;
31constexpr float kEditorSelectRecentWidthMaxFactor = 1.3f;
32
33struct GridLayout {
34 int columns = 1;
35 float item_width = 0.0f;
36 float item_height = 0.0f;
37 float spacing = 0.0f;
38 float row_start_x = 0.0f;
39};
40
42 const float font_size = ImGui::GetFontSize();
43 if (font_size <= 0.0f) {
44 return 1.0f;
45 }
46 return font_size / kEditorSelectBaseFontSize;
47}
48
49GridLayout ComputeGridLayout(float avail_width, float min_width,
50 float max_width, float min_height,
51 float max_height, float preferred_width,
52 float aspect_ratio, float spacing) {
53 GridLayout layout;
54 layout.spacing = spacing;
55 const auto width_for_columns = [avail_width, spacing](int columns) {
56 return (avail_width - spacing * static_cast<float>(columns - 1)) /
57 static_cast<float>(columns);
58 };
59
60 layout.columns = std::max(1, static_cast<int>((avail_width + spacing) /
61 (preferred_width + spacing)));
62
63 layout.item_width = width_for_columns(layout.columns);
64 while (layout.columns > 1 && layout.item_width < min_width) {
65 layout.columns -= 1;
66 layout.item_width = width_for_columns(layout.columns);
67 }
68
69 layout.item_width = std::min(layout.item_width, max_width);
70 layout.item_width = std::min(layout.item_width, avail_width);
71 layout.item_height =
72 std::clamp(layout.item_width * aspect_ratio, min_height, max_height);
73
74 const float row_width =
75 layout.item_width * static_cast<float>(layout.columns) +
76 spacing * static_cast<float>(layout.columns - 1);
77 layout.row_start_x = ImGui::GetCursorPosX();
78 if (row_width < avail_width) {
79 layout.row_start_x += (avail_width - row_width) * 0.5f;
80 }
81
82 return layout;
83}
84
85ImVec4 ScaleColor(const ImVec4& color, float scale, float alpha) {
86 return ImVec4(color.x * scale, color.y * scale, color.z * scale, alpha);
87}
88
89ImVec4 ScaleColor(const ImVec4& color, float scale) {
90 return ScaleColor(color, scale, color.w);
91}
92
93ImVec4 WithAlpha(ImVec4 color, float alpha) {
94 color.w = alpha;
95 return color;
96}
97
98ImVec4 GetEditorAccentColor(EditorType type, const gui::Theme& theme) {
99 switch (type) {
107 return gui::ConvertColorToImVec4(theme.info);
111 return gui::ConvertColorToImVec4(theme.accent);
113 return gui::ConvertColorToImVec4(theme.error);
115 return gui::ConvertColorToImVec4(theme.info);
118 case EditorType::kHex:
121 return gui::ConvertColorToImVec4(theme.info);
123 return gui::ConvertColorToImVec4(theme.accent);
126 default:
128 }
129}
130
131} // namespace
132
134 // Use platform-aware shortcut strings (Cmd on macOS, Ctrl elsewhere)
135 const char* ctrl = gui::GetCtrlDisplayName();
136 editors_ = {
137 {EditorType::kOverworld, "Overworld", ICON_MD_MAP,
138 "Edit overworld maps, entrances, and properties",
139 absl::StrFormat("%s+1", ctrl), false, true},
140
142 "Design dungeon rooms, layouts, and mechanics",
143 absl::StrFormat("%s+2", ctrl), false, true},
144
146 "Modify tiles, palettes, and graphics sets",
147 absl::StrFormat("%s+3", ctrl), false, true},
148
150 "Edit sprite graphics and properties", absl::StrFormat("%s+4", ctrl),
151 false, true},
152
154 "Edit dialogue, signs, and text", absl::StrFormat("%s+5", ctrl), false,
155 true},
156
158 "Configure music and sound effects", absl::StrFormat("%s+6", ctrl),
159 false, true},
160
162 "Edit color palettes and animations", absl::StrFormat("%s+7", ctrl),
163 false, true},
164
165 {EditorType::kScreen, "Screens", ICON_MD_TV,
166 "Edit title screen and ending screens", absl::StrFormat("%s+8", ctrl),
167 false, true},
168
170 "Write and edit assembly code", absl::StrFormat("%s+9", ctrl), false,
171 false},
172
173 {EditorType::kHex, "Hex Editor", ICON_MD_DATA_ARRAY,
174 "Direct ROM memory editing and comparison",
175 absl::StrFormat("%s+0", ctrl), false, true},
176
178 "Test and debug your ROM in real-time with live debugging",
179 absl::StrFormat("%s+Shift+E", ctrl), false, true},
180
182 "Configure AI agent, collaboration, and automation",
183 absl::StrFormat("%s+Shift+A", ctrl), false, false},
184 };
185
187}
188
189bool EditorSelectionDialog::Show(bool* p_open) {
190 // Sync internal state with external flag
191 if (p_open && *p_open && !is_open_) {
192 is_open_ = true;
193 }
194
195 if (!is_open_) {
196 if (p_open)
197 *p_open = false;
198 return false;
199 }
200
201 bool editor_selected = false;
202 bool* window_open = p_open ? p_open : &is_open_;
203
204 // Set window properties immediately before Begin to prevent them from
205 // affecting tooltips
206 ImGuiViewport* viewport = ImGui::GetMainViewport();
207 ImVec2 center = viewport->GetCenter();
208 ImVec2 view_size = viewport->WorkSize;
209 float target_width = std::clamp(view_size.x * 0.9f, 520.0f, 980.0f);
210 float target_height = std::clamp(view_size.y * 0.88f, 420.0f, 760.0f);
211 ImGui::SetNextWindowPos(center, ImGuiCond_Appearing, ImVec2(0.5f, 0.5f));
212 ImGui::SetNextWindowSize(ImVec2(target_width, target_height),
213 ImGuiCond_Appearing);
214 ImGui::SetNextWindowSizeConstraints(
215 ImVec2(420.0f, 360.0f), ImVec2(view_size.x * 0.98f, view_size.y * 0.95f));
216
217 if (ImGui::Begin("Editor Selection", window_open,
218 ImGuiWindowFlags_NoCollapse)) {
220
221 ImGui::Separator();
222 ImGui::Spacing();
223
224 // Quick access buttons for recently used
225 if (!recent_editors_.empty()) {
227 ImGui::Separator();
228 ImGui::Spacing();
229 }
230
231 // Main editor grid
232 ImGui::Text(ICON_MD_APPS " All Editors");
233 ImGui::Spacing();
234
235 const float scale = GetEditorSelectScale();
236 const float compact_scale =
237 ImGui::GetContentRegionAvail().x < 620.0f ? 0.85f : 1.0f;
238 const float min_width = kEditorSelectCardBaseWidth * scale * compact_scale;
239 const float max_width = kEditorSelectCardBaseWidth *
240 kEditorSelectCardWidthMaxFactor * scale *
241 compact_scale;
242 const float min_height =
243 kEditorSelectCardBaseHeight * scale * compact_scale;
244 const float max_height = kEditorSelectCardBaseHeight *
245 kEditorSelectCardHeightMaxFactor * scale *
246 compact_scale;
247 const float spacing = ImGui::GetStyle().ItemSpacing.x;
248 const float aspect_ratio = min_height / std::max(min_width, 1.0f);
249 GridLayout layout = ComputeGridLayout(
250 ImGui::GetContentRegionAvail().x, min_width, max_width, min_height,
251 max_height, min_width, aspect_ratio, spacing);
252
253 int column = 0;
254 for (size_t i = 0; i < editors_.size(); ++i) {
255 if (column == 0) {
256 ImGui::SetCursorPosX(layout.row_start_x);
257 }
258
259 EditorType prev_selection = selected_editor_;
260 DrawEditorPanel(editors_[i], static_cast<int>(i),
261 ImVec2(layout.item_width, layout.item_height));
262
263 // Check if an editor was just selected
264 if (selected_editor_ != prev_selection) {
265 editor_selected = true;
269 }
270 // Auto-dismiss after selection
271 is_open_ = false;
272 if (p_open) {
273 *p_open = false;
274 }
275 }
276
277 column += 1;
278 if (column < layout.columns) {
279 ImGui::SameLine(0.0f, layout.spacing);
280 } else {
281 column = 0;
282 ImGui::Spacing();
283 }
284 }
285
286 if (column != 0) {
287 ImGui::NewLine();
288 }
289 }
290 ImGui::End();
291
292 // Sync state back
293 if (p_open && !(*p_open)) {
294 is_open_ = false;
295 }
296
297 // DO NOT auto-dismiss here. Let the callback/EditorManager handle it.
298 // This allows the dialog to be used as a persistent switcher if desired.
299
300 return editor_selected;
301}
302
304 const auto& theme = gui::ThemeManager::Get().GetCurrentTheme();
305 const ImVec4 accent = gui::ConvertColorToImVec4(theme.accent);
306 const ImVec4 text_secondary = gui::ConvertColorToImVec4(theme.text_secondary);
307
308 ImGui::PushFont(ImGui::GetIO().Fonts->Fonts[2]); // Large font
309
310 ImGui::TextColored(accent, ICON_MD_EDIT " Select an Editor");
311
312 ImGui::PopFont();
313
314 ImGui::TextColored(text_secondary,
315 "Choose an editor to begin working on your ROM. "
316 "You can open multiple editors simultaneously.");
317}
318
320 const auto& theme = gui::ThemeManager::Get().GetCurrentTheme();
321 const ImVec4 accent = gui::ConvertColorToImVec4(theme.accent);
322 ImGui::TextColored(accent, ICON_MD_HISTORY " Recently Used");
323 ImGui::Spacing();
324
325 const float scale = GetEditorSelectScale();
326 const float min_width = kEditorSelectRecentBaseWidth * scale;
327 const float max_width =
328 kEditorSelectRecentBaseWidth * kEditorSelectRecentWidthMaxFactor * scale;
329 const float height = kEditorSelectRecentBaseHeight * scale;
330 const float spacing = ImGui::GetStyle().ItemSpacing.x;
331 const float avail_width = ImGui::GetContentRegionAvail().x;
332 const bool stack_items = avail_width < min_width * 1.6f;
333 GridLayout layout{};
334 if (stack_items) {
335 layout.columns = 1;
336 layout.item_width = avail_width;
337 layout.item_height = height;
338 layout.spacing = spacing;
339 } else {
340 layout = ComputeGridLayout(avail_width, min_width, max_width, height,
341 height, min_width,
342 height / std::max(min_width, 1.0f), spacing);
343 }
344
345 int column = 0;
346 for (EditorType type : recent_editors_) {
347 // Find editor info
348 auto it = std::find_if(
349 editors_.begin(), editors_.end(),
350 [type](const EditorInfo& info) { return info.type == type; });
351
352 if (it != editors_.end()) {
353 if (column == 0) {
354 ImGui::SetCursorPosX(layout.row_start_x);
355 }
356
357 const ImVec4 base_color = GetEditorAccentColor(it->type, theme);
358 gui::StyleColorGuard btn_guard(
359 {{ImGuiCol_Button, ScaleColor(base_color, 0.5f, 0.7f)},
360 {ImGuiCol_ButtonHovered, ScaleColor(base_color, 0.7f, 0.9f)},
361 {ImGuiCol_ButtonActive, WithAlpha(base_color, 1.0f)}});
362
363 if (ImGui::Button(absl::StrCat(it->icon, " ", it->name).c_str(),
364 ImVec2(layout.item_width, layout.item_height))) {
365 selected_editor_ = type;
366 }
367
368 if (ImGui::IsItemHovered()) {
369 ImGui::SetTooltip("%s", it->description);
370 }
371
372 column += 1;
373 if (column < layout.columns) {
374 ImGui::SameLine(0.0f, layout.spacing);
375 } else {
376 column = 0;
377 ImGui::Spacing();
378 }
379 }
380 }
381
382 if (column != 0) {
383 ImGui::NewLine();
384 }
385}
386
388 const ImVec2& card_size) {
389 ImGui::PushID(index);
390
391 const auto& theme = gui::ThemeManager::Get().GetCurrentTheme();
392 const ImVec4 base_color = GetEditorAccentColor(info.type, theme);
393 const ImVec4 text_primary = gui::ConvertColorToImVec4(theme.text_primary);
394 const ImVec4 text_secondary = gui::ConvertColorToImVec4(theme.text_secondary);
395 const ImVec4 accent = gui::ConvertColorToImVec4(theme.accent);
396 ImFont* text_font = ImGui::GetFont();
397 const float text_font_size = ImGui::GetFontSize();
398
399 const ImGuiStyle& style = ImGui::GetStyle();
400 const float line_height = ImGui::GetTextLineHeight();
401 const float padding_x = std::max(style.FramePadding.x, card_size.x * 0.06f);
402 const float padding_y = std::max(style.FramePadding.y, card_size.y * 0.08f);
403
404 const float footer_height = info.shortcut.empty() ? 0.0f : line_height;
405 const float footer_spacing =
406 info.shortcut.empty() ? 0.0f : style.ItemSpacing.y;
407 const float available_icon_height = card_size.y - padding_y * 2.0f -
408 line_height - footer_height -
409 footer_spacing;
410 const float min_icon_radius = line_height * 0.9f;
411 float max_icon_radius = card_size.y * 0.24f;
412 max_icon_radius = std::max(max_icon_radius, min_icon_radius);
413 const float icon_radius = std::clamp(available_icon_height * 0.5f,
414 min_icon_radius, max_icon_radius);
415
416 const ImVec2 cursor_pos = ImGui::GetCursorScreenPos();
417 ImDrawList* draw_list = ImGui::GetWindowDrawList();
418 const ImVec2 icon_center(cursor_pos.x + card_size.x * 0.5f,
419 cursor_pos.y + padding_y + icon_radius);
420 float title_y = icon_center.y + icon_radius + style.ItemSpacing.y;
421 const float footer_y = cursor_pos.y + card_size.y - padding_y - footer_height;
422 if (title_y + line_height > footer_y - style.ItemSpacing.y) {
423 title_y = footer_y - line_height - style.ItemSpacing.y;
424 }
425
426 // Panel styling with gradients
427 bool is_recent = std::find(recent_editors_.begin(), recent_editors_.end(),
428 info.type) != recent_editors_.end();
429
430 // Create gradient background
431 ImU32 color_top = ImGui::GetColorU32(ScaleColor(base_color, 0.4f, 0.85f));
432 ImU32 color_bottom = ImGui::GetColorU32(ScaleColor(base_color, 0.2f, 0.9f));
433
434 // Draw gradient card background
435 draw_list->AddRectFilledMultiColor(
436 cursor_pos,
437 ImVec2(cursor_pos.x + card_size.x, cursor_pos.y + card_size.y), color_top,
438 color_top, color_bottom, color_bottom);
439
440 // Colored border
441 ImU32 border_color =
442 is_recent ? ImGui::GetColorU32(WithAlpha(base_color, 1.0f))
443 : ImGui::GetColorU32(ScaleColor(base_color, 0.6f, 0.7f));
444 const float rounding = std::max(style.FrameRounding, card_size.y * 0.05f);
445 const float border_thickness =
446 is_recent ? std::max(2.0f, style.FrameBorderSize + 1.0f)
447 : std::max(1.0f, style.FrameBorderSize);
448 draw_list->AddRect(
449 cursor_pos,
450 ImVec2(cursor_pos.x + card_size.x, cursor_pos.y + card_size.y),
451 border_color, rounding, 0, border_thickness);
452
453 // Recent indicator badge
454 if (is_recent) {
455 const float badge_radius =
456 std::clamp(line_height * 0.6f, line_height * 0.4f, line_height);
457 ImVec2 badge_pos(cursor_pos.x + card_size.x - padding_x - badge_radius,
458 cursor_pos.y + padding_y + badge_radius);
459 draw_list->AddCircleFilled(badge_pos, badge_radius,
460 ImGui::GetColorU32(base_color), 16);
461 const ImU32 star_color = ImGui::GetColorU32(text_primary);
462 const ImVec2 star_size =
463 text_font->CalcTextSizeA(text_font_size, FLT_MAX, 0.0f, ICON_MD_STAR);
464 const ImVec2 star_pos(badge_pos.x - star_size.x * 0.5f,
465 badge_pos.y - star_size.y * 0.5f);
466 draw_list->AddText(text_font, text_font_size, star_pos, star_color,
468 }
469
470 // Make button transparent (we draw our own background)
471 ImVec4 button_bg = ImGui::GetStyleColorVec4(ImGuiCol_Button);
472 button_bg.w = 0.0f;
473 gui::StyleColorGuard card_btn_guard(
474 {{ImGuiCol_Button, button_bg},
475 {ImGuiCol_ButtonHovered, ScaleColor(base_color, 0.3f, 0.5f)},
476 {ImGuiCol_ButtonActive, ScaleColor(base_color, 0.5f, 0.7f)}});
477
478 bool clicked =
479 ImGui::Button(absl::StrCat("##", info.name).c_str(), card_size);
480 bool is_hovered = ImGui::IsItemHovered();
481
482 // Draw icon with colored background circle
483 ImU32 icon_bg = ImGui::GetColorU32(base_color);
484 draw_list->AddCircleFilled(icon_center, icon_radius, icon_bg, 32);
485
486 // Draw icon
487 ImFont* icon_font = ImGui::GetFont();
488 if (ImGui::GetIO().Fonts->Fonts.size() > 2) {
489 icon_font = ImGui::GetIO().Fonts->Fonts[2];
490 } else if (ImGui::GetIO().Fonts->Fonts.size() > 1) {
491 icon_font = ImGui::GetIO().Fonts->Fonts[1];
492 }
493 ImGui::PushFont(icon_font);
494 const float icon_font_size = ImGui::GetFontSize();
495 const ImVec2 icon_size =
496 icon_font->CalcTextSizeA(icon_font_size, FLT_MAX, 0.0f, info.icon);
497 ImGui::PopFont();
498 const ImVec2 icon_text_pos(icon_center.x - icon_size.x * 0.5f,
499 icon_center.y - icon_size.y * 0.5f);
500 draw_list->AddText(icon_font, icon_font_size, icon_text_pos,
501 ImGui::GetColorU32(text_primary), info.icon);
502
503 // Draw name
504 const ImVec2 name_size =
505 text_font->CalcTextSizeA(text_font_size, FLT_MAX, 0.0f, info.name);
506 float name_x = cursor_pos.x + (card_size.x - name_size.x) * 0.5f;
507 const float name_min_x = cursor_pos.x + padding_x;
508 const float name_max_x = cursor_pos.x + card_size.x - padding_x;
509 name_x = std::clamp(name_x, name_min_x, name_max_x);
510 const ImVec2 name_pos(name_x, title_y);
511 const ImVec4 name_clip(name_min_x, cursor_pos.y + padding_y, name_max_x,
512 footer_y);
513 draw_list->AddText(text_font, text_font_size, name_pos,
514 ImGui::GetColorU32(base_color), info.name, nullptr, 0.0f,
515 &name_clip);
516
517 // Draw shortcut hint if available
518 if (!info.shortcut.empty()) {
519 const ImVec2 shortcut_pos(cursor_pos.x + padding_x, footer_y);
520 const ImVec4 shortcut_clip(cursor_pos.x + padding_x, footer_y,
521 cursor_pos.x + card_size.x - padding_x,
522 cursor_pos.y + card_size.y - padding_y);
523 draw_list->AddText(text_font, text_font_size, shortcut_pos,
524 ImGui::GetColorU32(text_secondary),
525 info.shortcut.c_str(), nullptr, 0.0f, &shortcut_clip);
526 }
527
528 // Hover glow effect
529 if (is_hovered) {
530 ImU32 glow_color = ImGui::GetColorU32(ScaleColor(base_color, 1.0f, 0.18f));
531 draw_list->AddRectFilled(
532 cursor_pos,
533 ImVec2(cursor_pos.x + card_size.x, cursor_pos.y + card_size.y),
534 glow_color, rounding);
535 }
536
537 // Enhanced tooltip with fixed sizing
538 if (is_hovered) {
539 const float tooltip_width = std::clamp(card_size.x * 1.4f, 240.0f, 340.0f);
540 ImGui::SetNextWindowSize(ImVec2(tooltip_width, 0), ImGuiCond_Always);
541 ImGui::BeginTooltip();
542 ImGui::PushFont(ImGui::GetIO().Fonts->Fonts[1]); // Medium font
543 ImGui::TextColored(base_color, "%s %s", info.icon, info.name);
544 ImGui::PopFont();
545 ImGui::Separator();
546 ImGui::PushTextWrapPos(ImGui::GetCursorPos().x + tooltip_width - 20.0f);
547 ImGui::TextWrapped("%s", info.description);
548 ImGui::PopTextWrapPos();
549 if (!info.shortcut.empty()) {
550 ImGui::Spacing();
551 ImGui::TextColored(base_color, ICON_MD_KEYBOARD " %s",
552 info.shortcut.c_str());
553 }
554 if (is_recent) {
555 ImGui::Spacing();
556 ImGui::TextColored(accent, ICON_MD_STAR " Recently used");
557 }
558 ImGui::EndTooltip();
559 }
560
561 if (clicked) {
562 selected_editor_ = info.type;
563 }
564
565 ImGui::PopID();
566}
567
569 // Remove if already in list
570 auto it = std::find(recent_editors_.begin(), recent_editors_.end(), type);
571 if (it != recent_editors_.end()) {
572 recent_editors_.erase(it);
573 }
574
575 // Add to front
576 recent_editors_.insert(recent_editors_.begin(), type);
577
578 // Limit size
579 if (recent_editors_.size() > kMaxRecentEditors) {
581 }
582
584}
585
587 try {
588 auto data = util::LoadFileFromConfigDir("recent_editors.txt");
589 if (!data.empty()) {
590 std::istringstream ss(data);
591 std::string line;
592 while (std::getline(ss, line) &&
594 int type_int = std::stoi(line);
595 if (type_int >= 0 &&
596 type_int < static_cast<int>(EditorType::kSettings)) {
597 recent_editors_.push_back(static_cast<EditorType>(type_int));
598 }
599 }
600 }
601 } catch (...) {
602 // Ignore errors, just start with empty recent list
603 }
604}
605
607 try {
608 std::ostringstream ss;
609 for (EditorType type : recent_editors_) {
610 ss << static_cast<int>(type) << "\n";
611 }
612 util::SaveFile("recent_editors.txt", ss.str());
613 } catch (...) {
614 // Ignore save errors
615 }
616}
617
618} // namespace editor
619} // namespace yaze
void DrawEditorPanel(const EditorInfo &info, int index, const ImVec2 &card_size)
void SaveRecentEditors()
Save recently used editors to settings.
void LoadRecentEditors()
Load recently used editors from settings.
std::function< void(EditorType)> selection_callback_
void MarkRecentlyUsed(EditorType type)
Mark an editor as recently used.
bool Show(bool *p_open=nullptr)
Show the dialog.
RAII guard for ImGui style colors.
Definition style_guard.h:27
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_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 ScaleColor(const ImVec4 &color, float scale, float alpha)
ImVec4 GetEditorAccentColor(EditorType type, const gui::Theme &theme)
const char * GetCtrlDisplayName()
Get the display name for the primary modifier key.
ImVec4 ConvertColorToImVec4(const Color &color)
Definition color.h:134
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
Metadata about an available editor.
Comprehensive theme structure for YAZE.