yaze 0.3.2
Link to the Past ROM Editor
 
Loading...
Searching...
No Matches
themed_widgets.h
Go to the documentation of this file.
1#ifndef YAZE_APP_GUI_WIDGETS_THEMED_WIDGETS_H_
2#define YAZE_APP_GUI_WIDGETS_THEMED_WIDGETS_H_
3
4#include <string>
5#include "imgui/imgui.h"
6
7namespace yaze {
8namespace gui {
9
10// Standardized themed widgets that automatically respect the current theme.
11// These abstract away the repetitive PushStyleColor/PopStyleColor calls.
12
23bool ThemedIconButton(const char* icon, const char* tooltip = nullptr,
24 const ImVec2& size = ImVec2(0, 0),
25 bool is_active = false,
26 bool is_disabled = false);
27
39bool TransparentIconButton(const char* icon, const ImVec2& size,
40 const char* tooltip = nullptr,
41 bool is_active = false,
42 const ImVec4& active_color = ImVec4(0, 0, 0, 0));
43
47bool ThemedButton(const char* label, const ImVec2& size = ImVec2(0, 0));
48
52bool PrimaryButton(const char* label, const ImVec2& size = ImVec2(0, 0));
53
57bool DangerButton(const char* label, const ImVec2& size = ImVec2(0, 0));
58
62void SectionHeader(const char* label);
63
67bool PaletteColorButton(const char* id, const struct SnesColor& color,
68 bool is_selected, bool is_modified,
69 const ImVec2& size);
70
74void PanelHeader(const char* title, const char* icon = nullptr,
75 bool* p_open = nullptr);
76
77} // namespace gui
78} // namespace yaze
79
80#endif // YAZE_APP_GUI_WIDGETS_THEMED_WIDGETS_H_
bool ThemedButton(const char *label, const ImVec2 &size)
Draw a standard text button with theme colors.
bool TransparentIconButton(const char *icon, const ImVec2 &size, const char *tooltip, bool is_active, const ImVec4 &active_color)
Draw a transparent icon button (hover effect only).
void PanelHeader(const char *title, const char *icon, bool *p_open)
Draw a panel header with consistent styling.
bool DangerButton(const char *label, const ImVec2 &size)
Draw a danger action button (error color).
void SectionHeader(const char *icon, const char *label, const ImVec4 &color)
bool ThemedIconButton(const char *icon, const char *tooltip, const ImVec2 &size, bool is_active, bool is_disabled)
Draw a standard icon button with theme-aware colors.
IMGUI_API bool PaletteColorButton(const char *id, const gfx::SnesColor &color, bool is_selected, bool is_modified, const ImVec2 &size, ImGuiColorEditFlags flags)
Definition color.cc:449
bool PrimaryButton(const char *label, const ImVec2 &size)
Draw a primary action button (accented color).