yaze 0.3.2
Link to the Past ROM Editor
 
Loading...
Searching...
No Matches
yaze::gui Namespace Reference

Graphical User Interface (GUI) components for the application. More...

Namespaces

namespace  anonymous_namespace{canvas.cc}
 
namespace  anonymous_namespace{style.cc}
 
namespace  anonymous_namespace{widget_id_registry.cc}
 
namespace  canvas
 
namespace  CanvasUtils
 Utility functions for canvas operations.
 

Classes

class  AgentChatWidget
 ImGui widget for conversational AI agent interaction. More...
 
struct  AssetObject
 
class  AutoWidgetScope
 RAII scope that enables automatic widget registration. More...
 
class  BackgroundRenderer
 Renders themed background effects for docking windows. More...
 
class  BppComparisonTool
 BPP format comparison tool. More...
 
class  BppConversionDialog
 BPP format conversion dialog. More...
 
class  BppFormatUI
 BPP format selection and conversion UI component. More...
 
class  Canvas
 Modern, robust canvas for drawing and manipulating graphics. More...
 
class  CanvasAutomationAPI
 Programmatic interface for controlling canvas operations. More...
 
struct  CanvasConfig
 Configuration for canvas display and interaction. More...
 
struct  CanvasContextMenuItem
 Context menu item configuration. More...
 
struct  CanvasPaletteManager
 Palette management state for canvas. More...
 
struct  CanvasSelection
 Selection state for canvas interactions. More...
 
struct  CardInfo
 Metadata for an editor card. More...
 
class  CardRegistration
 RAII helper for auto-registering cards. More...
 
class  CollaborationPanel
 ImGui panel for collaboration features. More...
 
struct  Color
 
class  DockSpaceRenderer
 Enhanced docking space with themed background effects. More...
 
struct  DungeonAsset
 
class  DungeonObjectEmulatorPreview
 
class  EditorCard
 Draggable, dockable card for editor sub-windows. More...
 
class  EditorCardManager
 Central registry and manager for all editor cards. More...
 
class  EditorLayout
 Modern layout manager for editor components. More...
 
struct  EnhancedTheme
 Comprehensive theme structure for YAZE. More...
 
struct  ExampleSelectionWithDeletion
 
struct  FlagsMenu
 
struct  GfxSheetAssetBrowser
 
class  MultiSelect
 
struct  OverworldAsset
 
class  PaletteEditorWidget
 Simple visual palette editor with color picker. More...
 
class  PaletteWidget
 Palette widget with ROM integration, analysis tools, and AI tool call support. More...
 
struct  ProposalEntry
 Represents an AI-generated proposal. More...
 
struct  RomSyncEntry
 Represents a ROM synchronization event. More...
 
class  ScopedCanvas
 RAII wrapper for Canvas (ImGui-style) More...
 
struct  SnapshotEntry
 Represents a shared snapshot (image, map state, etc.) More...
 
struct  SpriteAsset
 
struct  Table
 
struct  TextBox
 
class  ThemeManager
 Manages themes, loading, saving, and switching. More...
 
class  TileSelectorWidget
 Reusable tile selector built on top of Canvas. More...
 
class  Toolset
 Ultra-compact toolbar that merges mode buttons with settings. More...
 
struct  UnsortedAsset
 
class  WidgetIdRegistry
 Centralized registry for discoverable GUI widgets. More...
 
class  WidgetIdScope
 RAII helper for managing hierarchical ImGui ID scopes. More...
 
class  WidgetMeasurement
 Tracks widget dimensions for debugging and test automation. More...
 
struct  WidgetMetrics
 

Typedefs

using ItemLabelFlags = enum ItemLabelFlag { Left=1u<< 0u, Right=1u<< 1u, Default=Left, }
 
using GuiElement = std::variant< std::function< void()>, std::string >
 

Enumerations

enum class  CanvasType { kTile , kBlock , kMap }
 
enum class  CanvasMode { kPaint , kSelect }
 
enum class  CanvasGridSize { k8x8 , k16x16 , k32x32 , k64x64 }
 
enum class  ButtonType {
  Default , Success , Warning , Error ,
  Info
}
 

Functions

void BeginCanvas (Canvas &canvas, ImVec2 child_size)
 
void EndCanvas (Canvas &canvas)
 
void GraphicsBinCanvasPipeline (int width, int height, int tile_size, int num_sheets_to_load, int canvas_id, bool is_loaded, gfx::BitmapTable &graphics_bin)
 
void BitmapCanvasPipeline (gui::Canvas &canvas, gfx::Bitmap &bitmap, int width, int height, int tile_size, bool is_loaded, bool scrollbar, int canvas_id)
 
void TableCanvasPipeline (gui::Canvas &canvas, gfx::Bitmap &bitmap, const std::string &label, bool auto_resize)
 
void GraphicsBinCanvasPipeline (int width, int height, int tile_size, int num_sheets_to_load, int canvas_id, bool is_loaded, BitmapTable &graphics_bin)
 
ImVec4 ConvertSnesColorToImVec4 (const gfx::SnesColor &color)
 
gfx::SnesColor ConvertImVec4ToSnesColor (const ImVec4 &color)
 
IMGUI_API bool SnesColorButton (absl::string_view id, gfx::SnesColor &color, ImGuiColorEditFlags flags, const ImVec2 &size_arg)
 
IMGUI_API bool SnesColorEdit4 (absl::string_view label, gfx::SnesColor *color, ImGuiColorEditFlags flags)
 
IMGUI_API bool DisplayPalette (gfx::SnesPalette &palette, bool loaded)
 
void SelectablePalettePipeline (uint64_t &palette_id, bool &refresh_graphics, gfx::SnesPalette &palette)
 
absl::Status DisplayEditablePalette (gfx::SnesPalette &palette, const std::string &title, bool show_color_picker, int colors_per_row, ImGuiColorEditFlags flags)
 
ImVec4 ConvertColorToImVec4 (const Color &color)
 
std::string ColorToHexString (const Color &color)
 
CardRegistration RegisterCard (const CardInfo &info)
 
bool InputHex (const char *label, uint64_t *data)
 
bool InputHex (const char *label, int *data, int num_digits, float input_width)
 
bool InputHexShort (const char *label, uint32_t *data)
 
bool InputHexWord (const char *label, uint16_t *data, float input_width, bool no_step)
 
bool InputHexWord (const char *label, int16_t *data, float input_width, bool no_step)
 
bool InputHexByte (const char *label, uint8_t *data, float input_width, bool no_step)
 
bool InputHexByte (const char *label, uint8_t *data, uint8_t max_value, float input_width, bool no_step)
 
void Paragraph (const std::string &text)
 
bool ClickableText (const std::string &text)
 
void ItemLabel (absl::string_view title, ItemLabelFlags flags)
 
bool ListBox (const char *label, int *current_item, const std::vector< std::string > &items, int height_in_items)
 
bool InputTileInfo (const char *label, gfx::TileInfo *tile_info)
 
ImGuiID GetID (const std::string &id)
 
ImGuiKey MapKeyToImGuiKey (char key)
 
void AddTableColumn (Table &table, const std::string &label, GuiElement element)
 
void DrawTable (Table &params)
 
bool OpenUrl (const std::string &url)
 
void MemoryEditorPopup (const std::string &label, std::span< uint8_t > memory)
 
bool InputHexByteCustom (const char *label, uint8_t *data, float input_width)
 
bool InputHexWordCustom (const char *label, uint16_t *data, float input_width)
 
void ColorsYaze ()
 
void DrawBitmapViewer (const std::vector< gfx::Bitmap > &bitmaps, float scale, int &current_bitmap_id)
 
TextEditor::LanguageDefinition GetAssemblyLanguageDef ()
 
void BeginWindowWithDisplaySettings (const char *id, bool *active, const ImVec2 &size, ImGuiWindowFlags flags)
 
void EndWindowWithDisplaySettings ()
 
void BeginPadding (int i)
 
void EndPadding ()
 
void BeginNoPadding ()
 
void EndNoPadding ()
 
void BeginChildWithScrollbar (const char *str_id)
 
void BeginChildWithScrollbar (const char *str_id, ImVec2 content_size)
 
void BeginChildBothScrollbars (int id)
 
void BeginTableCanvas (const char *table_id, int columns, ImVec2 canvas_size)
 
void EndTableCanvas ()
 
void SetupCanvasTableColumn (const char *label, float width_ratio)
 
void BeginCanvasTableCell (ImVec2 min_size)
 
void DrawDisplaySettings (ImGuiStyle *ref)
 
void DrawDisplaySettingsForPopup (ImGuiStyle *ref)
 
void TextWithSeparators (const absl::string_view &text)
 
void DrawFontManager ()
 
Color RGB (float r, float g, float b, float a=1.0f)
 
Color RGBA (int r, int g, int b, int a=255)
 
ImVec4 GetThemeColor (ImGuiCol idx)
 
ImVec4 GetSuccessColor ()
 
ImVec4 GetWarningColor ()
 
ImVec4 GetErrorColor ()
 
ImVec4 GetInfoColor ()
 
ImVec4 GetAccentColor ()
 
ImVec4 GetEntranceColor ()
 
ImVec4 GetExitColor ()
 
ImVec4 GetItemColor ()
 
ImVec4 GetSpriteColor ()
 
ImVec4 GetSelectedColor ()
 
ImVec4 GetLockedColor ()
 
ImVec4 GetVanillaRomColor ()
 
ImVec4 GetCustomRomColor ()
 
ImVec4 GetModifiedColor ()
 
void BeginField (const char *label, float label_width)
 
void EndField ()
 
bool BeginPropertyTable (const char *id, int columns, ImGuiTableFlags extra_flags)
 
void EndPropertyTable ()
 
void PropertyRow (const char *label, const char *value)
 
void PropertyRow (const char *label, int value)
 
void PropertyRowHex (const char *label, uint8_t value)
 
void PropertyRowHex (const char *label, uint16_t value)
 
void SectionHeader (const char *icon, const char *label, const ImVec4 &color)
 
bool IconButton (const char *icon, const char *label, const ImVec2 &size)
 
bool ColoredButton (const char *label, ButtonType type, const ImVec2 &size)
 
bool ToggleIconButton (const char *icon_on, const char *icon_off, bool *state, const char *tooltip)
 
void HelpMarker (const char *desc)
 
void SeparatorText (const char *label)
 
void StatusBadge (const char *text, ButtonType type)
 
void BeginToolset (const char *id)
 
void EndToolset ()
 
void ToolsetButton (const char *icon, bool selected, const char *tooltip, std::function< void()> on_click)
 
void BeginCanvasContainer (const char *id, bool scrollable)
 
void EndCanvasContainer ()
 
bool EditorTabItem (const char *icon, const char *label, bool *p_open)
 
bool ConfirmationDialog (const char *id, const char *title, const char *message, const char *confirm_text, const char *cancel_text)
 
void StatusIndicator (const char *label, bool active, const char *tooltip)
 
void RomVersionBadge (const char *version, bool is_vanilla)
 
void LockIndicator (bool locked, const char *label)
 
void VerticalSpacing (float pixels)
 
void HorizontalSpacing (float pixels)
 
void CenterText (const char *text)
 
void RightAlign (float width)
 
float GetPulseAlpha (float speed)
 
float GetFadeIn (float duration)
 
void PushPulseEffect (float speed)
 
void PopPulseEffect ()
 
void LoadingSpinner (const char *label, float radius)
 
float GetResponsiveWidth (float min_width, float max_width, float ratio)
 
void SetupResponsiveColumns (int count, float min_col_width)
 
void BeginTwoColumns (const char *id, float split_ratio)
 
void SwitchColumn ()
 
void EndTwoColumns ()
 
bool LabeledInputHex (const char *label, uint8_t *value)
 
bool LabeledInputHex (const char *label, uint16_t *value)
 
bool IconCombo (const char *icon, const char *label, int *current, const char *const items[], int count)
 
void AutoRegisterLastItem (const std::string &widget_type, const std::string &explicit_label="", const std::string &description="")
 Automatically register the last ImGui item.
 
bool AutoButton (const char *label, const ImVec2 &size=ImVec2(0, 0))
 
bool AutoSmallButton (const char *label)
 
bool AutoCheckbox (const char *label, bool *v)
 
bool AutoRadioButton (const char *label, bool active)
 
bool AutoRadioButton (const char *label, int *v, int v_button)
 
bool AutoInputText (const char *label, char *buf, size_t buf_size, ImGuiInputTextFlags flags=0, ImGuiInputTextCallback callback=nullptr, void *user_data=nullptr)
 
bool AutoInputTextMultiline (const char *label, char *buf, size_t buf_size, const ImVec2 &size=ImVec2(0, 0), ImGuiInputTextFlags flags=0, ImGuiInputTextCallback callback=nullptr, void *user_data=nullptr)
 
bool AutoInputInt (const char *label, int *v, int step=1, int step_fast=100, ImGuiInputTextFlags flags=0)
 
bool AutoInputFloat (const char *label, float *v, float step=0.0f, float step_fast=0.0f, const char *format="%.3f", ImGuiInputTextFlags flags=0)
 
bool AutoSliderInt (const char *label, int *v, int v_min, int v_max, const char *format="%d", ImGuiSliderFlags flags=0)
 
bool AutoSliderFloat (const char *label, float *v, float v_min, float v_max, const char *format="%.3f", ImGuiSliderFlags flags=0)
 
bool AutoCombo (const char *label, int *current_item, const char *const items[], int items_count, int popup_max_height_in_items=-1)
 
bool AutoSelectable (const char *label, bool selected=false, ImGuiSelectableFlags flags=0, const ImVec2 &size=ImVec2(0, 0))
 
bool AutoSelectable (const char *label, bool *p_selected, ImGuiSelectableFlags flags=0, const ImVec2 &size=ImVec2(0, 0))
 
bool AutoMenuItem (const char *label, const char *shortcut=nullptr, bool selected=false, bool enabled=true)
 
bool AutoMenuItem (const char *label, const char *shortcut, bool *p_selected, bool enabled=true)
 
bool AutoBeginMenu (const char *label, bool enabled=true)
 
bool AutoBeginTabItem (const char *label, bool *p_open=nullptr, ImGuiTabItemFlags flags=0)
 
bool AutoTreeNode (const char *label)
 
bool AutoTreeNodeEx (const char *label, ImGuiTreeNodeFlags flags=0)
 
bool AutoCollapsingHeader (const char *label, ImGuiTreeNodeFlags flags=0)
 
void RegisterCanvas (const char *canvas_name, const std::string &description="")
 Register a canvas widget after BeginChild or similar.
 
void RegisterTable (const char *table_name, const std::string &description="")
 Register a table after BeginTable.
 

Variables

constexpr uint32_t kRectangleColor = IM_COL32(32, 32, 32, 255)
 
constexpr uint32_t kWhiteColor = IM_COL32(255, 255, 255, 255)
 
constexpr ImGuiButtonFlags kMouseFlags
 
const int kStepOneHex = 0x01
 
const int kStepFastHex = 0x0F
 
constexpr ImVec2 kDefaultModalSize = ImVec2(200, 0)
 
constexpr ImVec2 kZeroPos = ImVec2(0, 0)
 
thread_local std::vector< std::string > g_auto_scope_stack_
 

Detailed Description

Graphical User Interface (GUI) components for the application.

Typedef Documentation

◆ ItemLabelFlags

using yaze::gui::ItemLabelFlags = typedef enum ItemLabelFlag { Left = 1u << 0u, Right = 1u << 1u, Default = Left, }

Definition at line 55 of file input.h.

◆ GuiElement

using yaze::gui::GuiElement = typedef std::variant<std::function<void()>, std::string>

Definition at line 67 of file input.h.

Enumeration Type Documentation

◆ CanvasType

enum class yaze::gui::CanvasType
strong
Enumerator
kTile 
kBlock 
kMap 

Definition at line 39 of file canvas.h.

◆ CanvasMode

enum class yaze::gui::CanvasMode
strong
Enumerator
kPaint 
kSelect 

Definition at line 40 of file canvas.h.

◆ CanvasGridSize

enum class yaze::gui::CanvasGridSize
strong
Enumerator
k8x8 
k16x16 
k32x32 
k64x64 

Definition at line 41 of file canvas.h.

◆ ButtonType

enum class yaze::gui::ButtonType
strong
Enumerator
Default 
Success 
Warning 
Error 
Info 

Definition at line 73 of file ui_helpers.h.

Function Documentation

◆ BeginCanvas()

◆ EndCanvas()

void yaze::gui::EndCanvas ( Canvas canvas)

Definition at line 1494 of file canvas.cc.

References yaze::gui::Canvas::DrawGrid(), and yaze::gui::Canvas::DrawOverlay().

Referenced by yaze::editor::MessageEditor::DrawFontAtlas().

Here is the call graph for this function:

◆ GraphicsBinCanvasPipeline() [1/2]

void yaze::gui::GraphicsBinCanvasPipeline ( int  width,
int  height,
int  tile_size,
int  num_sheets_to_load,
int  canvas_id,
bool  is_loaded,
gfx::BitmapTable graphics_bin 
)

◆ BitmapCanvasPipeline()

◆ TableCanvasPipeline()

◆ GraphicsBinCanvasPipeline() [2/2]

void yaze::gui::GraphicsBinCanvasPipeline ( int  width,
int  height,
int  tile_size,
int  num_sheets_to_load,
int  canvas_id,
bool  is_loaded,
BitmapTable &  graphics_bin 
)

◆ ConvertSnesColorToImVec4()

◆ ConvertImVec4ToSnesColor()

◆ SnesColorButton()

IMGUI_API bool yaze::gui::SnesColorButton ( absl::string_view  id,
gfx::SnesColor color,
ImGuiColorEditFlags  flags,
const ImVec2 &  size_arg 
)

◆ SnesColorEdit4()

IMGUI_API bool yaze::gui::SnesColorEdit4 ( absl::string_view  label,
gfx::SnesColor color,
ImGuiColorEditFlags  flags 
)

◆ DisplayPalette()

IMGUI_API bool yaze::gui::DisplayPalette ( gfx::SnesPalette palette,
bool  loaded 
)

Definition at line 50 of file color.cc.

References yaze::gfx::SnesPalette::size().

Referenced by yaze::editor::MessageEditor::DrawCurrentMessage(), and yaze::editor::ScreenEditor::DrawInventoryMenuEditor().

Here is the call graph for this function:

◆ SelectablePalettePipeline()

void yaze::gui::SelectablePalettePipeline ( uint64_t &  palette_id,
bool &  refresh_graphics,
gfx::SnesPalette palette 
)

Definition at line 123 of file color.cc.

References yaze::gfx::SnesPalette::size(), and SnesColorButton().

Referenced by yaze::editor::GraphicsEditor::DrawPaletteControls(), and yaze::editor::GraphicsEditor::UpdatePaletteColumn().

Here is the call graph for this function:

◆ DisplayEditablePalette()

IMGUI_API absl::Status yaze::gui::DisplayEditablePalette ( gfx::SnesPalette palette,
const std::string &  title,
bool  show_color_picker,
int  colors_per_row,
ImGuiColorEditFlags  flags 
)

◆ ConvertColorToImVec4()

◆ ColorToHexString()

std::string yaze::gui::ColorToHexString ( const Color color)
inline

◆ RegisterCard()

CardRegistration yaze::gui::RegisterCard ( const CardInfo info)
inline

Definition at line 193 of file editor_card_manager.h.

References yaze::gui::CardInfo::card_id, yaze::gui::EditorCardManager::Get(), and yaze::gui::EditorCardManager::RegisterCard().

Here is the call graph for this function:

◆ InputHex() [1/2]

◆ InputHex() [2/2]

IMGUI_API bool yaze::gui::InputHex ( const char *  label,
int *  data,
int  num_digits,
float  input_width 
)

Definition at line 162 of file input.cc.

References ImGui::InputScalarLeft(), kStepFastHex, and kStepOneHex.

Here is the call graph for this function:

◆ InputHexShort()

IMGUI_API bool yaze::gui::InputHexShort ( const char *  label,
uint32_t *  data 
)

Definition at line 169 of file input.cc.

References kStepFastHex, and kStepOneHex.

◆ InputHexWord() [1/2]

◆ InputHexWord() [2/2]

IMGUI_API bool yaze::gui::InputHexWord ( const char *  label,
int16_t *  data,
float  input_width,
bool  no_step 
)

Definition at line 182 of file input.cc.

References ImGui::InputScalarLeft(), kStepFastHex, and kStepOneHex.

Here is the call graph for this function:

◆ InputHexByte() [1/2]

◆ InputHexByte() [2/2]

IMGUI_API bool yaze::gui::InputHexByte ( const char *  label,
uint8_t *  data,
uint8_t  max_value,
float  input_width,
bool  no_step 
)

Definition at line 196 of file input.cc.

References ImGui::InputScalarLeft(), kStepFastHex, and kStepOneHex.

Here is the call graph for this function:

◆ Paragraph()

IMGUI_API void yaze::gui::Paragraph ( const std::string &  text)

Definition at line 209 of file input.cc.

◆ ClickableText()

IMGUI_API bool yaze::gui::ClickableText ( const std::string &  text)
Todo:
Setup themes and text/clickable colors

Definition at line 214 of file input.cc.

◆ ItemLabel()

IMGUI_API void yaze::gui::ItemLabel ( absl::string_view  title,
ItemLabelFlags  flags 
)

Definition at line 268 of file input.cc.

Referenced by yaze::editor::MusicEditor::DrawToolset().

◆ ListBox()

IMGUI_API bool yaze::gui::ListBox ( const char *  label,
int *  current_item,
const std::vector< std::string > &  items,
int  height_in_items 
)

Definition at line 313 of file input.cc.

◆ InputTileInfo()

bool yaze::gui::InputTileInfo ( const char *  label,
gfx::TileInfo tile_info 
)

◆ GetID()

IMGUI_API ImGuiID yaze::gui::GetID ( const std::string &  id)

◆ MapKeyToImGuiKey()

ImGuiKey yaze::gui::MapKeyToImGuiKey ( char  key)

Definition at line 343 of file input.cc.

Referenced by yaze::editor::ParseShortcut().

◆ AddTableColumn()

void yaze::gui::AddTableColumn ( Table table,
const std::string &  label,
GuiElement  element 
)

◆ DrawTable()

◆ OpenUrl()

IMGUI_API bool yaze::gui::OpenUrl ( const std::string &  url)

Definition at line 433 of file input.cc.

◆ MemoryEditorPopup()

void yaze::gui::MemoryEditorPopup ( const std::string &  label,
std::span< uint8_t >  memory 
)

Definition at line 455 of file input.cc.

Referenced by yaze::editor::MessageEditor::DrawCurrentMessage().

◆ InputHexByteCustom()

IMGUI_API bool yaze::gui::InputHexByteCustom ( const char *  label,
uint8_t *  data,
float  input_width 
)

Definition at line 469 of file input.cc.

◆ InputHexWordCustom()

IMGUI_API bool yaze::gui::InputHexWordCustom ( const char *  label,
uint16_t *  data,
float  input_width 
)

Definition at line 492 of file input.cc.

Referenced by yaze::editor::MapPropertiesSystem::DrawPropertiesPopup().

◆ ColorsYaze()

◆ DrawBitmapViewer()

void yaze::gui::DrawBitmapViewer ( const std::vector< gfx::Bitmap > &  bitmaps,
float  scale,
int &  current_bitmap_id 
)

Definition at line 131 of file style.cc.

References yaze::gfx::Bitmap::height(), yaze::gfx::Bitmap::texture(), and yaze::gfx::Bitmap::width().

Here is the call graph for this function:

◆ GetAssemblyLanguageDef()

◆ BeginWindowWithDisplaySettings()

void yaze::gui::BeginWindowWithDisplaySettings ( const char *  id,
bool *  active,
const ImVec2 &  size,
ImGuiWindowFlags  flags 
)
Todo:
Add more display settings to popup windows.

Definition at line 247 of file style.cc.

Referenced by yaze::editor::OverworldEditor::DrawOverworldProperties().

◆ EndWindowWithDisplaySettings()

void yaze::gui::EndWindowWithDisplaySettings ( )

Definition at line 267 of file style.cc.

Referenced by yaze::editor::OverworldEditor::DrawOverworldProperties().

◆ BeginPadding()

◆ EndPadding()

◆ BeginNoPadding()

void yaze::gui::BeginNoPadding ( )

◆ EndNoPadding()

◆ BeginChildWithScrollbar() [1/2]

◆ BeginChildWithScrollbar() [2/2]

void yaze::gui::BeginChildWithScrollbar ( const char *  str_id,
ImVec2  content_size 
)

Definition at line 294 of file style.cc.

◆ BeginChildBothScrollbars()

void yaze::gui::BeginChildBothScrollbars ( int  id)

Definition at line 309 of file style.cc.

Referenced by yaze::editor::OverworldEditor::DrawOverworldCanvas().

◆ BeginTableCanvas()

void yaze::gui::BeginTableCanvas ( const char *  table_id,
int  columns,
ImVec2  canvas_size 
)

Definition at line 317 of file style.cc.

◆ EndTableCanvas()

void yaze::gui::EndTableCanvas ( )

Definition at line 331 of file style.cc.

◆ SetupCanvasTableColumn()

void yaze::gui::SetupCanvasTableColumn ( const char *  label,
float  width_ratio 
)

Definition at line 335 of file style.cc.

◆ BeginCanvasTableCell()

void yaze::gui::BeginCanvasTableCell ( ImVec2  min_size)

Definition at line 343 of file style.cc.

◆ DrawDisplaySettings()

void yaze::gui::DrawDisplaySettings ( ImGuiStyle *  ref)

Definition at line 360 of file style.cc.

References ColorsYaze(), ConvertColorToImVec4(), yaze::gui::BackgroundRenderer::Get(), yaze::gui::ThemeManager::Get(), and ICON_MD_PALETTE.

Here is the call graph for this function:

◆ DrawDisplaySettingsForPopup()

void yaze::gui::DrawDisplaySettingsForPopup ( ImGuiStyle *  ref)

◆ TextWithSeparators()

◆ DrawFontManager()

void yaze::gui::DrawFontManager ( )

◆ RGB()

Color yaze::gui::RGB ( float  r,
float  g,
float  b,
float  a = 1.0f 
)

Definition at line 23 of file theme_manager.cc.

◆ RGBA()

Color yaze::gui::RGBA ( int  r,
int  g,
int  b,
int  a = 255 
)

◆ GetThemeColor()

ImVec4 yaze::gui::GetThemeColor ( ImGuiCol  idx)

◆ GetSuccessColor()

◆ GetWarningColor()

◆ GetErrorColor()

ImVec4 yaze::gui::GetErrorColor ( )

◆ GetInfoColor()

ImVec4 yaze::gui::GetInfoColor ( )

Definition at line 35 of file ui_helpers.cc.

References ConvertColorToImVec4(), yaze::gui::ThemeManager::Get(), and yaze::gui::ThemeManager::GetCurrentTheme().

Referenced by ColoredButton(), and StatusBadge().

Here is the call graph for this function:

◆ GetAccentColor()

ImVec4 yaze::gui::GetAccentColor ( )

◆ GetEntranceColor()

ImVec4 yaze::gui::GetEntranceColor ( )

Definition at line 46 of file ui_helpers.cc.

◆ GetExitColor()

ImVec4 yaze::gui::GetExitColor ( )

Definition at line 51 of file ui_helpers.cc.

◆ GetItemColor()

ImVec4 yaze::gui::GetItemColor ( )

Definition at line 56 of file ui_helpers.cc.

◆ GetSpriteColor()

ImVec4 yaze::gui::GetSpriteColor ( )

Definition at line 61 of file ui_helpers.cc.

◆ GetSelectedColor()

ImVec4 yaze::gui::GetSelectedColor ( )

Definition at line 66 of file ui_helpers.cc.

References ConvertColorToImVec4(), yaze::gui::ThemeManager::Get(), and yaze::gui::ThemeManager::GetCurrentTheme().

Referenced by yaze::editor::OverworldEditor::DrawUsageGrid().

Here is the call graph for this function:

◆ GetLockedColor()

ImVec4 yaze::gui::GetLockedColor ( )

Definition at line 71 of file ui_helpers.cc.

Referenced by LockIndicator().

◆ GetVanillaRomColor()

ImVec4 yaze::gui::GetVanillaRomColor ( )

Definition at line 76 of file ui_helpers.cc.

References GetWarningColor().

Here is the call graph for this function:

◆ GetCustomRomColor()

ImVec4 yaze::gui::GetCustomRomColor ( )

Definition at line 80 of file ui_helpers.cc.

References GetSuccessColor().

Here is the call graph for this function:

◆ GetModifiedColor()

ImVec4 yaze::gui::GetModifiedColor ( )

Definition at line 84 of file ui_helpers.cc.

References ConvertColorToImVec4(), yaze::gui::ThemeManager::Get(), and yaze::gui::ThemeManager::GetCurrentTheme().

Here is the call graph for this function:

◆ BeginField()

void yaze::gui::BeginField ( const char *  label,
float  label_width 
)

Definition at line 93 of file ui_helpers.cc.

Referenced by LabeledInputHex(), and LabeledInputHex().

◆ EndField()

void yaze::gui::EndField ( )

Definition at line 105 of file ui_helpers.cc.

Referenced by LabeledInputHex(), and LabeledInputHex().

◆ BeginPropertyTable()

bool yaze::gui::BeginPropertyTable ( const char *  id,
int  columns,
ImGuiTableFlags  extra_flags 
)

Definition at line 110 of file ui_helpers.cc.

◆ EndPropertyTable()

void yaze::gui::EndPropertyTable ( )

Definition at line 122 of file ui_helpers.cc.

◆ PropertyRow() [1/2]

void yaze::gui::PropertyRow ( const char *  label,
const char *  value 
)

Definition at line 126 of file ui_helpers.cc.

◆ PropertyRow() [2/2]

void yaze::gui::PropertyRow ( const char *  label,
int  value 
)

Definition at line 133 of file ui_helpers.cc.

◆ PropertyRowHex() [1/2]

void yaze::gui::PropertyRowHex ( const char *  label,
uint8_t  value 
)

Definition at line 140 of file ui_helpers.cc.

◆ PropertyRowHex() [2/2]

void yaze::gui::PropertyRowHex ( const char *  label,
uint16_t  value 
)

Definition at line 147 of file ui_helpers.cc.

◆ SectionHeader()

void yaze::gui::SectionHeader ( const char *  icon,
const char *  label,
const ImVec4 &  color 
)

Definition at line 154 of file ui_helpers.cc.

◆ IconButton()

bool yaze::gui::IconButton ( const char *  icon,
const char *  label,
const ImVec2 &  size 
)

Definition at line 163 of file ui_helpers.cc.

◆ ColoredButton()

bool yaze::gui::ColoredButton ( const char *  label,
ButtonType  type,
const ImVec2 &  size 
)

◆ ToggleIconButton()

bool yaze::gui::ToggleIconButton ( const char *  icon_on,
const char *  icon_off,
bool *  state,
const char *  tooltip 
)

Definition at line 190 of file ui_helpers.cc.

References GetSuccessColor(), and GetThemeColor().

Referenced by yaze::gui::Toolset::AddToggle().

Here is the call graph for this function:

◆ HelpMarker()

void yaze::gui::HelpMarker ( const char *  desc)

Definition at line 208 of file ui_helpers.cc.

References ICON_MD_HELP_OUTLINE.

Referenced by yaze::editor::ObjectEditorCard::DrawEmulatorPreview().

◆ SeparatorText()

void yaze::gui::SeparatorText ( const char *  label)

Definition at line 219 of file ui_helpers.cc.

Referenced by yaze::gui::GfxSheetAssetBrowser::Draw().

◆ StatusBadge()

void yaze::gui::StatusBadge ( const char *  text,
ButtonType  type 
)

◆ BeginToolset()

void yaze::gui::BeginToolset ( const char *  id)

Definition at line 245 of file ui_helpers.cc.

◆ EndToolset()

void yaze::gui::EndToolset ( )

Definition at line 250 of file ui_helpers.cc.

◆ ToolsetButton()

void yaze::gui::ToolsetButton ( const char *  icon,
bool  selected,
const char *  tooltip,
std::function< void()>  on_click 
)

Definition at line 255 of file ui_helpers.cc.

References GetAccentColor().

Here is the call graph for this function:

◆ BeginCanvasContainer()

void yaze::gui::BeginCanvasContainer ( const char *  id,
bool  scrollable 
)

Definition at line 276 of file ui_helpers.cc.

◆ EndCanvasContainer()

void yaze::gui::EndCanvasContainer ( )

Definition at line 283 of file ui_helpers.cc.

◆ EditorTabItem()

bool yaze::gui::EditorTabItem ( const char *  icon,
const char *  label,
bool *  p_open 
)

Definition at line 287 of file ui_helpers.cc.

◆ ConfirmationDialog()

bool yaze::gui::ConfirmationDialog ( const char *  id,
const char *  title,
const char *  message,
const char *  confirm_text,
const char *  cancel_text 
)

Definition at line 293 of file ui_helpers.cc.

References ColoredButton(), and Warning.

Here is the call graph for this function:

◆ StatusIndicator()

void yaze::gui::StatusIndicator ( const char *  label,
bool  active,
const char *  tooltip 
)

Definition at line 323 of file ui_helpers.cc.

References GetSuccessColor(), and GetThemeColor().

Here is the call graph for this function:

◆ RomVersionBadge()

void yaze::gui::RomVersionBadge ( const char *  version,
bool  is_vanilla 
)

Definition at line 343 of file ui_helpers.cc.

References GetSuccessColor(), GetWarningColor(), ICON_MD_CHECK_CIRCLE, and ICON_MD_INFO.

Referenced by yaze::gui::Toolset::AddRomBadge().

Here is the call graph for this function:

◆ LockIndicator()

void yaze::gui::LockIndicator ( bool  locked,
const char *  label 
)

Definition at line 352 of file ui_helpers.cc.

References GetLockedColor(), ICON_MD_LOCK, and ICON_MD_LOCK_OPEN.

Here is the call graph for this function:

◆ VerticalSpacing()

◆ HorizontalSpacing()

void yaze::gui::HorizontalSpacing ( float  pixels)

Definition at line 368 of file ui_helpers.cc.

◆ CenterText()

void yaze::gui::CenterText ( const char *  text)

Definition at line 373 of file ui_helpers.cc.

Referenced by yaze::editor::OverworldEditor::Update().

◆ RightAlign()

void yaze::gui::RightAlign ( float  width)

Definition at line 379 of file ui_helpers.cc.

◆ GetPulseAlpha()

float yaze::gui::GetPulseAlpha ( float  speed)

Definition at line 388 of file ui_helpers.cc.

Referenced by PushPulseEffect().

◆ GetFadeIn()

float yaze::gui::GetFadeIn ( float  duration)

Definition at line 392 of file ui_helpers.cc.

◆ PushPulseEffect()

void yaze::gui::PushPulseEffect ( float  speed)

Definition at line 411 of file ui_helpers.cc.

References GetPulseAlpha().

Here is the call graph for this function:

◆ PopPulseEffect()

void yaze::gui::PopPulseEffect ( )

Definition at line 416 of file ui_helpers.cc.

◆ LoadingSpinner()

void yaze::gui::LoadingSpinner ( const char *  label,
float  radius 
)

Definition at line 420 of file ui_helpers.cc.

References GetAccentColor(), and IM_PI.

Here is the call graph for this function:

◆ GetResponsiveWidth()

float yaze::gui::GetResponsiveWidth ( float  min_width,
float  max_width,
float  ratio 
)

Definition at line 448 of file ui_helpers.cc.

◆ SetupResponsiveColumns()

void yaze::gui::SetupResponsiveColumns ( int  count,
float  min_col_width 
)

Definition at line 457 of file ui_helpers.cc.

◆ BeginTwoColumns()

void yaze::gui::BeginTwoColumns ( const char *  id,
float  split_ratio 
)

Definition at line 472 of file ui_helpers.cc.

◆ SwitchColumn()

void yaze::gui::SwitchColumn ( )

Definition at line 489 of file ui_helpers.cc.

◆ EndTwoColumns()

void yaze::gui::EndTwoColumns ( )

Definition at line 493 of file ui_helpers.cc.

◆ LabeledInputHex() [1/2]

bool yaze::gui::LabeledInputHex ( const char *  label,
uint8_t *  value 
)

Definition at line 502 of file ui_helpers.cc.

References BeginField(), and EndField().

Here is the call graph for this function:

◆ LabeledInputHex() [2/2]

bool yaze::gui::LabeledInputHex ( const char *  label,
uint16_t *  value 
)

Definition at line 513 of file ui_helpers.cc.

References BeginField(), and EndField().

Here is the call graph for this function:

◆ IconCombo()

bool yaze::gui::IconCombo ( const char *  icon,
const char *  label,
int *  current,
const char *const  items[],
int  count 
)

Definition at line 524 of file ui_helpers.cc.

◆ AutoRegisterLastItem()

void yaze::gui::AutoRegisterLastItem ( const std::string &  widget_type,
const std::string &  explicit_label = "",
const std::string &  description = "" 
)

Automatically register the last ImGui item.

Call this after any ImGui widget creation to automatically register it. Captures widget type, bounds, visibility, and enabled state.

Parameters
widget_typeType of widget ("button", "input", "checkbox", etc.)
explicit_labelOptional explicit label (uses ImGui::GetItemLabel() if empty)
descriptionOptional description for the test harness

Definition at line 26 of file widget_auto_register.cc.

References yaze::gui::WidgetIdRegistry::WidgetMetadata::bounds, yaze::gui::WidgetIdRegistry::WidgetMetadata::enabled, g_auto_scope_stack_, yaze::gui::WidgetIdRegistry::Instance(), yaze::gui::WidgetIdRegistry::WidgetMetadata::label, yaze::gui::WidgetIdRegistry::WidgetBounds::max_x, yaze::gui::WidgetIdRegistry::WidgetBounds::max_y, yaze::gui::WidgetIdRegistry::WidgetBounds::min_x, yaze::gui::WidgetIdRegistry::WidgetBounds::min_y, yaze::gui::WidgetIdRegistry::NormalizeLabel(), yaze::gui::WidgetIdRegistry::RegisterWidget(), yaze::gui::WidgetIdRegistry::WidgetBounds::valid, yaze::gui::WidgetIdRegistry::WidgetMetadata::visible, and yaze::gui::WidgetIdRegistry::WidgetMetadata::window_name.

Referenced by AutoBeginMenu(), AutoBeginTabItem(), AutoButton(), AutoCheckbox(), AutoCollapsingHeader(), AutoCombo(), AutoInputFloat(), AutoInputInt(), AutoInputText(), AutoInputTextMultiline(), AutoMenuItem(), AutoMenuItem(), AutoRadioButton(), AutoRadioButton(), AutoSelectable(), AutoSelectable(), AutoSliderFloat(), AutoSliderInt(), AutoSmallButton(), AutoTreeNode(), AutoTreeNodeEx(), RegisterCanvas(), and RegisterTable().

Here is the call graph for this function:

◆ AutoButton()

bool yaze::gui::AutoButton ( const char *  label,
const ImVec2 &  size = ImVec2(0, 0) 
)
inline

Definition at line 77 of file widget_auto_register.h.

References AutoRegisterLastItem().

Here is the call graph for this function:

◆ AutoSmallButton()

bool yaze::gui::AutoSmallButton ( const char *  label)
inline

Definition at line 83 of file widget_auto_register.h.

References AutoRegisterLastItem().

Here is the call graph for this function:

◆ AutoCheckbox()

bool yaze::gui::AutoCheckbox ( const char *  label,
bool *  v 
)
inline

Definition at line 89 of file widget_auto_register.h.

References AutoRegisterLastItem().

Here is the call graph for this function:

◆ AutoRadioButton() [1/2]

bool yaze::gui::AutoRadioButton ( const char *  label,
bool  active 
)
inline

Definition at line 95 of file widget_auto_register.h.

References AutoRegisterLastItem().

Here is the call graph for this function:

◆ AutoRadioButton() [2/2]

bool yaze::gui::AutoRadioButton ( const char *  label,
int *  v,
int  v_button 
)
inline

Definition at line 101 of file widget_auto_register.h.

References AutoRegisterLastItem().

Here is the call graph for this function:

◆ AutoInputText()

bool yaze::gui::AutoInputText ( const char *  label,
char *  buf,
size_t  buf_size,
ImGuiInputTextFlags  flags = 0,
ImGuiInputTextCallback  callback = nullptr,
void *  user_data = nullptr 
)
inline

Definition at line 107 of file widget_auto_register.h.

References AutoRegisterLastItem().

Here is the call graph for this function:

◆ AutoInputTextMultiline()

bool yaze::gui::AutoInputTextMultiline ( const char *  label,
char *  buf,
size_t  buf_size,
const ImVec2 &  size = ImVec2(0, 0),
ImGuiInputTextFlags  flags = 0,
ImGuiInputTextCallback  callback = nullptr,
void *  user_data = nullptr 
)
inline

Definition at line 116 of file widget_auto_register.h.

References AutoRegisterLastItem().

Here is the call graph for this function:

◆ AutoInputInt()

bool yaze::gui::AutoInputInt ( const char *  label,
int *  v,
int  step = 1,
int  step_fast = 100,
ImGuiInputTextFlags  flags = 0 
)
inline

Definition at line 126 of file widget_auto_register.h.

References AutoRegisterLastItem().

Referenced by yaze::gui::DungeonObjectEmulatorPreview::RenderControls().

Here is the call graph for this function:

◆ AutoInputFloat()

bool yaze::gui::AutoInputFloat ( const char *  label,
float *  v,
float  step = 0.0f,
float  step_fast = 0.0f,
const char *  format = "%.3f",
ImGuiInputTextFlags  flags = 0 
)
inline

Definition at line 133 of file widget_auto_register.h.

References AutoRegisterLastItem().

Here is the call graph for this function:

◆ AutoSliderInt()

bool yaze::gui::AutoSliderInt ( const char *  label,
int *  v,
int  v_min,
int  v_max,
const char *  format = "%d",
ImGuiSliderFlags  flags = 0 
)
inline

Definition at line 141 of file widget_auto_register.h.

References AutoRegisterLastItem().

Referenced by yaze::gui::DungeonObjectEmulatorPreview::RenderControls().

Here is the call graph for this function:

◆ AutoSliderFloat()

bool yaze::gui::AutoSliderFloat ( const char *  label,
float *  v,
float  v_min,
float  v_max,
const char *  format = "%.3f",
ImGuiSliderFlags  flags = 0 
)
inline

Definition at line 148 of file widget_auto_register.h.

References AutoRegisterLastItem().

Here is the call graph for this function:

◆ AutoCombo()

bool yaze::gui::AutoCombo ( const char *  label,
int *  current_item,
const char *const  items[],
int  items_count,
int  popup_max_height_in_items = -1 
)
inline

Definition at line 155 of file widget_auto_register.h.

References AutoRegisterLastItem().

Here is the call graph for this function:

◆ AutoSelectable() [1/2]

bool yaze::gui::AutoSelectable ( const char *  label,
bool  selected = false,
ImGuiSelectableFlags  flags = 0,
const ImVec2 &  size = ImVec2(0, 0) 
)
inline

Definition at line 162 of file widget_auto_register.h.

References AutoRegisterLastItem().

Here is the call graph for this function:

◆ AutoSelectable() [2/2]

bool yaze::gui::AutoSelectable ( const char *  label,
bool *  p_selected,
ImGuiSelectableFlags  flags = 0,
const ImVec2 &  size = ImVec2(0, 0) 
)
inline

Definition at line 170 of file widget_auto_register.h.

References AutoRegisterLastItem().

Here is the call graph for this function:

◆ AutoMenuItem() [1/2]

bool yaze::gui::AutoMenuItem ( const char *  label,
const char *  shortcut = nullptr,
bool  selected = false,
bool  enabled = true 
)
inline

Definition at line 178 of file widget_auto_register.h.

References AutoRegisterLastItem().

Here is the call graph for this function:

◆ AutoMenuItem() [2/2]

bool yaze::gui::AutoMenuItem ( const char *  label,
const char *  shortcut,
bool *  p_selected,
bool  enabled = true 
)
inline

Definition at line 185 of file widget_auto_register.h.

References AutoRegisterLastItem().

Here is the call graph for this function:

◆ AutoBeginMenu()

bool yaze::gui::AutoBeginMenu ( const char *  label,
bool  enabled = true 
)
inline

Definition at line 192 of file widget_auto_register.h.

References AutoRegisterLastItem().

Here is the call graph for this function:

◆ AutoBeginTabItem()

bool yaze::gui::AutoBeginTabItem ( const char *  label,
bool *  p_open = nullptr,
ImGuiTabItemFlags  flags = 0 
)
inline

Definition at line 200 of file widget_auto_register.h.

References AutoRegisterLastItem().

Here is the call graph for this function:

◆ AutoTreeNode()

bool yaze::gui::AutoTreeNode ( const char *  label)
inline

Definition at line 209 of file widget_auto_register.h.

References AutoRegisterLastItem().

Here is the call graph for this function:

◆ AutoTreeNodeEx()

bool yaze::gui::AutoTreeNodeEx ( const char *  label,
ImGuiTreeNodeFlags  flags = 0 
)
inline

Definition at line 217 of file widget_auto_register.h.

References AutoRegisterLastItem().

Here is the call graph for this function:

◆ AutoCollapsingHeader()

bool yaze::gui::AutoCollapsingHeader ( const char *  label,
ImGuiTreeNodeFlags  flags = 0 
)
inline

Definition at line 225 of file widget_auto_register.h.

References AutoRegisterLastItem().

Here is the call graph for this function:

◆ RegisterCanvas()

void yaze::gui::RegisterCanvas ( const char *  canvas_name,
const std::string &  description = "" 
)
inline

Register a canvas widget after BeginChild or similar.

Canvases typically use BeginChild which doesn't have a return value, so we provide a separate registration helper.

Parameters
canvas_nameName of the canvas (should match BeginChild name)
descriptionOptional description of the canvas purpose

Definition at line 246 of file widget_auto_register.h.

References AutoRegisterLastItem().

Here is the call graph for this function:

◆ RegisterTable()

void yaze::gui::RegisterTable ( const char *  table_name,
const std::string &  description = "" 
)
inline

Register a table after BeginTable.

Parameters
table_nameName of the table (should match BeginTable name)
descriptionOptional description

Definition at line 256 of file widget_auto_register.h.

References AutoRegisterLastItem().

Here is the call graph for this function:

Variable Documentation

◆ kRectangleColor

constexpr uint32_t yaze::gui::kRectangleColor = IM_COL32(32, 32, 32, 255)
constexpr

Definition at line 95 of file canvas.cc.

Referenced by yaze::gui::Canvas::DrawBackground().

◆ kWhiteColor

constexpr uint32_t yaze::gui::kWhiteColor = IM_COL32(255, 255, 255, 255)
constexpr

◆ kMouseFlags

constexpr ImGuiButtonFlags yaze::gui::kMouseFlags
constexpr
Initial value:
=
ImGuiButtonFlags_MouseButtonLeft | ImGuiButtonFlags_MouseButtonRight

Definition at line 98 of file canvas.cc.

Referenced by yaze::gui::Canvas::DrawBackground().

◆ kStepOneHex

const int yaze::gui::kStepOneHex = 0x01

◆ kStepFastHex

const int yaze::gui::kStepFastHex = 0x0F

◆ kDefaultModalSize

◆ kZeroPos

constexpr ImVec2 yaze::gui::kZeroPos = ImVec2(0, 0)
constexpr

Definition at line 22 of file input.h.

◆ g_auto_scope_stack_

thread_local std::vector<std::string> yaze::gui::g_auto_scope_stack_