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{canvas_context_menu.cc}
 
namespace  anonymous_namespace{canvas_interaction.cc}
 
namespace  anonymous_namespace{canvas_interaction_handler.cc}
 
namespace  anonymous_namespace{canvas_modals.cc}
 
namespace  anonymous_namespace{canvas_rendering.cc}
 
namespace  anonymous_namespace{input.cc}
 
namespace  anonymous_namespace{keyboard_shortcuts.cc}
 
namespace  anonymous_namespace{platform_keys.cc}
 
namespace  anonymous_namespace{style.cc}
 
namespace  anonymous_namespace{touch_input.cc}
 
namespace  anonymous_namespace{widget_id_registry.cc}
 
namespace  CanvasUtils
 Utility functions for canvas operations.
 
namespace  EditorNames
 
namespace  plotting
 
namespace  PopupNames
 
namespace  style
 

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...
 
struct  BitmapDrawOpts
 
struct  BitmapPreviewOptions
 
class  BppComparisonTool
 BPP format comparison tool. More...
 
class  BppConversionDialog
 BPP format conversion dialog. More...
 
struct  BppConversionOptions
 BPP conversion options. 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
 Unified configuration for canvas display and interaction. More...
 
class  CanvasContextMenu
 
struct  CanvasContextMenuItem
 Context menu item configuration. More...
 
struct  CanvasExtensions
 Optional extension modules for Canvas. More...
 
class  CanvasFrame
 Lightweight RAII guard for existing Canvas instances. More...
 
struct  CanvasFrameOptions
 
struct  CanvasGeometry
 Canvas geometry calculated per-frame. More...
 
struct  CanvasInteractionEvents
 Combined interaction result for a frame. More...
 
class  CanvasInteractionHandler
 Handles all tile-based interactions for Canvas. More...
 
struct  CanvasMenuAction
 
class  CanvasMenuActionHost
 
class  CanvasMenuBuilder
 Builder pattern for constructing canvas menus fluently. More...
 
struct  CanvasMenuDefinition
 Complete menu definition. More...
 
struct  CanvasMenuItem
 Declarative menu item definition. More...
 
struct  CanvasMenuSection
 Menu section grouping related menu items. More...
 
class  CanvasModals
 Modal dialog management for canvas operations. More...
 
struct  CanvasPaletteManager
 Palette management state for canvas. More...
 
class  CanvasPerformanceIntegration
 Canvas performance integration with dashboard. More...
 
class  CanvasPerformanceManager
 Global canvas performance manager. More...
 
struct  CanvasPerformanceMetrics
 Canvas performance metrics. More...
 
struct  CanvasPopupDefinition
 Declarative popup definition for menu items. More...
 
struct  CanvasRuntime
 
struct  CanvasSelection
 Selection state for canvas interactions. More...
 
struct  CanvasState
 Complete canvas state snapshot. More...
 
class  CanvasTouchHandler
 Handles touch input integration for Canvas. More...
 
class  CanvasUsageManager
 Global canvas usage tracker manager. More...
 
struct  CanvasUsageStats
 Canvas usage statistics. More...
 
class  CanvasUsageTracker
 Canvas usage tracking and analysis system. More...
 
class  CollaborationPanel
 ImGui panel for collaboration features. More...
 
struct  Color
 
struct  ColorAnalysisOptions
 Color analysis options. More...
 
class  DockSpaceRenderer
 Enhanced docking space with themed background effects. More...
 
struct  DungeonAsset
 
class  DungeonObjectEmulatorPreview
 
class  EditorLayout
 Modern layout manager for editor components. More...
 
struct  EntityInteractionEvent
 Event payload for entity interactions. More...
 
struct  ExampleSelectionWithDeletion
 
struct  FlagsMenu
 
struct  GestureState
 Gesture recognition result. More...
 
struct  GfxSheetAssetBrowser
 
struct  HoverEvent
 Event payload for hover preview. More...
 
struct  InputHexResult
 
class  KeyboardShortcuts
 Manages keyboard shortcuts and provides an overlay UI. More...
 
class  LayoutHelpers
 Theme-aware sizing helpers for consistent UI layout. More...
 
struct  MemoryEditorWidget
 
class  MultiSelect
 
struct  OverworldAsset
 
struct  PaletteEditorOptions
 Palette editor options. More...
 
class  PaletteEditorWidget
 
class  PanelWindow
 Draggable, dockable panel for editor sub-windows. More...
 
struct  PerformanceOptions
 Performance integration options. More...
 
class  PopupRegistry
 Registry for managing persistent popups. More...
 
struct  PopupState
 State for a single persistent popup. More...
 
struct  PreviewPanelOpts
 
struct  ProposalEntry
 Represents an AI-generated proposal. More...
 
struct  RectSelectionEvent
 Event payload for rectangle selection operations. More...
 
struct  RomSyncEntry
 Represents a ROM synchronization event. More...
 
class  ScopedCanvas
 RAII wrapper for Canvas (ImGui-style) More...
 
struct  SelectorPanelOpts
 
struct  Shortcut
 Represents a keyboard shortcut with its associated action. More...
 
struct  SnapshotEntry
 Represents a shared snapshot (image, map state, etc.) More...
 
struct  SpriteAsset
 
struct  Table
 
struct  TextBox
 
struct  Theme
 Comprehensive theme structure for YAZE. More...
 
class  ThemeManager
 Manages themes, loading, saving, and switching. More...
 
struct  TileHit
 
struct  TileInteractionResult
 Result of a tile interaction operation. More...
 
struct  TilePaintEvent
 Event payload for tile painting operations. More...
 
struct  TileSelectionEvent
 Event payload for single tile selection. 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  TouchConfig
 Touch input configuration. More...
 
class  TouchInput
 Touch input handling system for iPad and tablet browsers. More...
 
struct  TouchPoint
 Individual touch point data. 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
 
struct  ZoomToFitResult
 

Typedefs

using ItemLabelFlags
 
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  TileInteractionMode {
  kNone , kPaintSingle , kPaintDrag , kSelectSingle ,
  kSelectRectangle , kColorPaint
}
 Tile interaction mode for canvas. More...
 
enum class  MenuSectionPriority { kEditorSpecific = 0 , kBitmapPalette = 10 , kCanvasProperties = 20 , kDebug = 30 }
 Menu section priority for controlling rendering order. More...
 
enum class  CanvasUsage {
  kTilePainting , kTileSelecting , kSelectRectangle , kColorPainting ,
  kBitmapEditing , kPaletteEditing , kBppConversion , kPerformanceMode ,
  kEntityManipulation , kUnknown
}
 Canvas usage patterns and tracking. More...
 
enum class  CanvasInteraction {
  kMouseClick , kMouseDrag , kMouseRelease , kKeyboardInput ,
  kContextMenu , kModalOpen , kModalClose , kToolChange ,
  kModeChange
}
 Canvas interaction types. More...
 
enum class  Platform {
  kWindows , kMacOS , kLinux , kWebMac ,
  kWebOther
}
 Runtime platform detection for display string customization. More...
 
enum class  TouchGesture {
  kNone , kTap , kDoubleTap , kLongPress ,
  kPan , kPinchZoom , kRotate
}
 Gesture types recognized by the touch input system. More...
 
enum class  TouchPhase { kBegan , kChanged , kEnded , kCancelled }
 Phase of a touch gesture. More...
 
enum class  ButtonType {
  Default , Success , Warning , Error ,
  Info
}
 
enum class  ShortcutContext {
  kGlobal , kOverworld , kDungeon , kGraphics ,
  kPalette , kSprite , kMusic , kMessage ,
  kEmulator , kCode
}
 Defines the context in which a shortcut is active. More...
 

Functions

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.
 
void BeginCanvas (Canvas &canvas, ImVec2 child_size)
 
void EndCanvas (Canvas &canvas)
 
CanvasRuntime BeginCanvas (gui::Canvas &canvas, const CanvasFrameOptions &options)
 
void EndCanvas (gui::Canvas &canvas, CanvasRuntime &, const CanvasFrameOptions &options)
 
ZoomToFitResult ComputeZoomToFit (ImVec2 content_px, ImVec2 canvas_px, float padding_px)
 
ImVec2 ClampScroll (ImVec2 scroll, ImVec2 content_px, ImVec2 canvas_px)
 
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 DrawBitmap (const CanvasRuntime &rt, gfx::Bitmap &bitmap, int border_offset, float scale)
 
void DrawBitmap (const CanvasRuntime &rt, gfx::Bitmap &bitmap, int x_offset, int y_offset, float scale, int alpha)
 
void DrawBitmap (const CanvasRuntime &rt, gfx::Bitmap &bitmap, ImVec2 dest_pos, ImVec2 dest_size, ImVec2 src_pos, ImVec2 src_size)
 
void DrawBitmap (const CanvasRuntime &rt, gfx::Bitmap &bitmap, const BitmapDrawOpts &opts)
 
void DrawBitmapPreview (const CanvasRuntime &rt, gfx::Bitmap &bitmap, const BitmapPreviewOptions &options)
 
bool RenderPreviewPanel (const CanvasRuntime &rt, gfx::Bitmap &bmp, const PreviewPanelOpts &opts)
 
void DrawRect (const CanvasRuntime &rt, int x, int y, int w, int h, ImVec4 color)
 
void DrawText (const CanvasRuntime &rt, const std::string &text, int x, int y)
 
void DrawOutline (const CanvasRuntime &rt, int x, int y, int w, int h, ImU32 color)
 
bool DrawTilemapPainter (const CanvasRuntime &rt, gfx::Tilemap &tilemap, int current_tile, ImVec2 *out_drawn_pos)
 
bool DrawTileSelector (const CanvasRuntime &rt, int size, int size_y, ImVec2 *out_selected_pos)
 
void DrawSelectRect (const CanvasRuntime &rt, int current_map, int tile_size, float scale, CanvasSelection &selection)
 
void GraphicsBinCanvasPipeline (int width, int height, int tile_size, int num_sheets_to_load, int canvas_id, bool is_loaded, BitmapTable &graphics_bin)
 
TileHit TileIndexAt (const ImVec2 &local_pos, float grid_step, float scale, const ImVec2 &canvas_px)
 
void DrawTileOutline (const CanvasRuntime &rt, const ImVec2 &tile_pos_px, const ImVec2 &tile_size_px, ImU32 color)
 
void DrawTileHighlight (const CanvasRuntime &rt, const ImVec2 &tile_pos_px, const ImVec2 &tile_size_px, ImU32 color)
 
void DrawTileLabel (const CanvasRuntime &rt, const ImVec2 &tile_pos_px, const char *text, ImU32 color)
 
bool DrawBitmap (gui::Canvas &canvas, CanvasRuntime &rt, gfx::Bitmap &bmp, const BitmapDrawOpts &opts)
 
bool DrawTilemapRegion (gui::Canvas &canvas, CanvasRuntime &rt, gfx::Tilemap &tilemap, absl::Span< const int > tile_ids, int tile_size, float scale, ImVec2 clamp_px)
 
bool RenderSelectorPanel (gui::Canvas &canvas, gfx::Bitmap &bmp, const SelectorPanelOpts &opts, TileHit *out_hit)
 
bool RenderPreviewPanel (gui::Canvas &canvas, gfx::Bitmap &bmp, const PreviewPanelOpts &opts)
 
void RegisterDefaultCanvasMenu (CanvasMenuActionHost &host, const CanvasRuntime &rt, CanvasConfig &cfg)
 
void RenderContextMenu (CanvasMenuActionHost &host, const CanvasRuntime &rt, CanvasConfig &cfg)
 
CanvasGeometry CalculateCanvasGeometry (const CanvasConfig &config, ImVec2 requested_size, ImVec2 cursor_screen_pos, ImVec2 content_region_avail)
 Calculate canvas geometry from configuration and ImGui context.
 
ImVec2 CalculateMouseInCanvas (const CanvasGeometry &geometry, ImVec2 mouse_screen_pos)
 Calculate mouse position in canvas space.
 
bool IsPointInCanvasBounds (const CanvasGeometry &geometry, ImVec2 point)
 Check if a point is within canvas bounds.
 
void ApplyScrollDelta (CanvasGeometry &geometry, ImVec2 delta)
 Apply scroll delta to geometry.
 
ImVec2 GetCanvasOrigin (const CanvasGeometry &geometry)
 Get origin point (canvas top-left + scroll offset)
 
CanvasFrameOptions MakeFrameOptions (ImVec2 size=ImVec2(0, 0), float grid_step=16.0f, bool draw_grid=true, bool draw_overlay=true, bool render_popups=true, bool draw_context_menu=false)
 
SelectorPanelOpts MakeSelectorOpts (ImVec2 size, float grid_step, int tile_size, bool ensure_texture=true, bool render_popups=true)
 
PreviewPanelOpts MakePreviewOpts (ImVec2 size, float grid_step=0.0f, bool ensure_texture=true, bool render_popups=false)
 
CanvasMenuActionHost MakeMenuHostWithDefaults (const CanvasRuntime &rt, CanvasConfig &cfg)
 
ImVec2 AlignToGrid (ImVec2 pos, float grid_step)
 Align position to grid.
 
ImVec2 GetMouseInCanvasSpace (const CanvasGeometry &geometry)
 Get mouse position in canvas space.
 
bool IsMouseInCanvas (const CanvasGeometry &geometry)
 Check if mouse is in canvas bounds.
 
ImVec2 CanvasToTileGrid (ImVec2 canvas_pos, float tile_size, float global_scale)
 Calculate tile grid indices from canvas position.
 
RectSelectionEvent HandleRectangleSelection (const CanvasGeometry &geometry, int current_map, float tile_size, ImDrawList *draw_list, ImGuiMouseButton mouse_button=ImGuiMouseButton_Right)
 Handle rectangle selection interaction.
 
TileSelectionEvent HandleTileSelection (const CanvasGeometry &geometry, int current_map, float tile_size, ImGuiMouseButton mouse_button=ImGuiMouseButton_Right)
 Handle single tile selection (right-click)
 
TilePaintEvent HandleTilePaint (const CanvasGeometry &geometry, int tile_id, float tile_size, ImGuiMouseButton mouse_button=ImGuiMouseButton_Left)
 Handle tile painting interaction.
 
TilePaintEvent HandleTilePaintWithPreview (const CanvasGeometry &geometry, const gfx::Bitmap &bitmap, float tile_size, ImDrawList *draw_list, ImGuiMouseButton mouse_button=ImGuiMouseButton_Left)
 Handle tile painter with bitmap preview.
 
TilePaintEvent HandleTilemapPaint (const CanvasGeometry &geometry, const gfx::Tilemap &tilemap, int current_tile, ImDrawList *draw_list, ImGuiMouseButton mouse_button=ImGuiMouseButton_Left)
 Handle tilemap painting interaction.
 
HoverEvent HandleHover (const CanvasGeometry &geometry, float tile_size)
 Update hover state for canvas.
 
void RenderHoverPreview (const CanvasGeometry &geometry, const HoverEvent &hover, float tile_size, ImDrawList *draw_list, ImU32 color=IM_COL32(255, 255, 255, 80))
 Render hover preview overlay.
 
EntityInteractionEvent HandleEntityInteraction (const CanvasGeometry &geometry, int entity_id, ImVec2 entity_position)
 Handle entity interaction (hover, click, drag)
 
void RenderMenuItem (const CanvasMenuItem &item, std::function< void(const std::string &, std::function< void()>)> popup_opened_callback=nullptr)
 Render a single menu item.
 
void RenderMenuSection (const CanvasMenuSection &section, std::function< void(const std::string &, std::function< void()>)> popup_opened_callback=nullptr)
 Render a menu section.
 
void RenderCanvasMenu (const CanvasMenuDefinition &menu, std::function< void(const std::string &, std::function< void()>)> popup_opened_callback=nullptr)
 Render a complete menu definition.
 
void RenderCanvasBackground (ImDrawList *draw_list, const CanvasGeometry &geometry)
 Render canvas background and border.
 
void RenderCanvasGrid (ImDrawList *draw_list, const CanvasGeometry &geometry, const CanvasConfig &config, int highlight_tile_id=-1)
 Render canvas grid with optional highlighting.
 
void RenderCanvasOverlay (ImDrawList *draw_list, const CanvasGeometry &geometry, const CanvasConfig &config, const ImVector< ImVec2 > &points, const ImVector< ImVec2 > &selected_points)
 Render canvas overlay (hover and selection points)
 
void RenderCanvasLabels (ImDrawList *draw_list, const CanvasGeometry &geometry, const CanvasConfig &config, const ImVector< ImVector< std::string > > &labels, int current_labels, int tile_id_offset)
 Render canvas labels on grid.
 
void RenderBitmapOnCanvas (ImDrawList *draw_list, const CanvasGeometry &geometry, gfx::Bitmap &bitmap, int border_offset, float scale)
 Render bitmap on canvas (border offset variant)
 
void RenderBitmapOnCanvas (ImDrawList *draw_list, const CanvasGeometry &geometry, gfx::Bitmap &bitmap, int x_offset, int y_offset, float scale, int alpha)
 Render bitmap on canvas (x/y offset variant)
 
void RenderBitmapOnCanvas (ImDrawList *draw_list, const CanvasGeometry &geometry, gfx::Bitmap &bitmap, ImVec2 dest_pos, ImVec2 dest_size, ImVec2 src_pos, ImVec2 src_size)
 Render bitmap on canvas (custom source/dest regions)
 
void RenderBitmapGroup (ImDrawList *draw_list, const CanvasGeometry &geometry, std::vector< int > &group, gfx::Tilemap &tilemap, int tile_size, float scale, int local_map_size, ImVec2 total_map_size)
 Render group of bitmaps from tilemap.
 
ImVec4 ConvertSnesColorToImVec4 (const gfx::SnesColor &color)
 Convert SnesColor to standard ImVec4 for display.
 
gfx::SnesColor ConvertImVec4ToSnesColor (const ImVec4 &color)
 Convert standard ImVec4 to SnesColor.
 
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 InlinePaletteSelector (gfx::SnesPalette &palette, int num_colors=8, int *selected_index=nullptr)
 Small inline palette selector - just color buttons for selection.
 
IMGUI_API absl::Status InlinePaletteEditor (gfx::SnesPalette &palette, const std::string &title="", ImGuiColorEditFlags flags=0)
 Full inline palette editor with color picker and copy options.
 
IMGUI_API bool PopupPaletteEditor (const char *popup_id, gfx::SnesPalette &palette, ImGuiColorEditFlags flags=0)
 Popup palette editor - same as inline but in a popup.
 
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)
 
IMGUI_API bool PaletteColorButton (const char *id, const gfx::SnesColor &color, bool is_selected, bool is_modified, const ImVec2 &size, ImGuiColorEditFlags flags)
 
ImVec4 ConvertColorToImVec4 (const Color &color)
 
std::string ColorToHexString (const Color &color)
 
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)
 
InputHexResult InputHexByteEx (const char *label, uint8_t *data, float input_width, bool no_step)
 
InputHexResult InputHexByteEx (const char *label, uint8_t *data, uint8_t max_value, float input_width, bool no_step)
 
InputHexResult InputHexWordEx (const char *label, uint16_t *data, 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)
 
bool SliderFloatWheel (const char *label, float *v, float v_min, float v_max, const char *format, float wheel_step, ImGuiSliderFlags flags)
 
bool SliderIntWheel (const char *label, int *v, int v_min, int v_max, const char *format, int wheel_step, ImGuiSliderFlags flags)
 
Platform GetCurrentPlatform ()
 Get the current platform at runtime.
 
bool IsMacPlatform ()
 Check if running on macOS (native or web)
 
const char * GetCtrlDisplayName ()
 Get the display name for the primary modifier key.
 
const char * GetAltDisplayName ()
 Get the display name for the secondary modifier key.
 
const char * GetKeyName (ImGuiKey key)
 Get the ImGui key name as a string.
 
std::string FormatShortcut (const std::vector< ImGuiKey > &keys)
 Format a list of ImGui keys into a human-readable shortcut string.
 
std::string FormatCtrlShortcut (ImGuiKey key)
 Convenience function for Ctrl+key shortcuts.
 
std::string FormatCtrlShiftShortcut (ImGuiKey key)
 Convenience function for Ctrl+Shift+key shortcuts.
 
std::string MakePopupId (size_t session_id, const std::string &editor_name, const std::string &popup_name)
 Generate session-aware popup IDs to prevent conflicts in multi-editor layouts.
 
std::string MakePopupId (const std::string &editor_name, const std::string &popup_name)
 Shorthand for editors without explicit session tracking.
 
std::string MakePopupIdWithInstance (const std::string &editor_name, const std::string &popup_name, const void *instance)
 Generate popup ID with instance pointer for guaranteed uniqueness.
 
bool FuzzyMatch (const std::string &pattern, const std::string &str)
 Simple fuzzy match - returns true if all chars in pattern appear in str in order.
 
int FuzzyScore (const std::string &pattern, const std::string &str)
 Score a fuzzy match (higher = better, 0 = no match)
 
bool PassesFilter (const std::string &filter, const std::string &str)
 Check if a string matches a search filter.
 
bool AnyPassesFilter (const std::string &filter, const std::vector< std::string > &strings)
 Check if any of multiple strings match a search filter.
 
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)
 
Color GetThemeColor (const std::string &color_name)
 
ImVec4 GetThemeColorVec4 (const std::string &color_name)
 
Color GetPrimary ()
 
Color GetPrimaryHover ()
 
Color GetPrimaryActive ()
 
Color GetSecondary ()
 
Color GetSurface ()
 
Color GetSurfaceVariant ()
 
Color GetSurfaceContainer ()
 
Color GetSurfaceContainerHigh ()
 
Color GetSurfaceContainerHighest ()
 
Color GetOnSurface ()
 
Color GetOnSurfaceVariant ()
 
Color GetOnPrimary ()
 
Color GetOutline ()
 
Color GetTextSecondary ()
 
Color GetTextDisabled ()
 
Color GetShadow ()
 
ImVec4 GetPrimaryVec4 ()
 
ImVec4 GetPrimaryHoverVec4 ()
 
ImVec4 GetPrimaryActiveVec4 ()
 
ImVec4 GetSurfaceVec4 ()
 
ImVec4 GetSurfaceVariantVec4 ()
 
ImVec4 GetSurfaceContainerVec4 ()
 
ImVec4 GetSurfaceContainerHighVec4 ()
 
ImVec4 GetSurfaceContainerHighestVec4 ()
 
ImVec4 GetOnSurfaceVec4 ()
 
ImVec4 GetOnSurfaceVariantVec4 ()
 
ImVec4 GetOnPrimaryVec4 ()
 
ImVec4 GetOutlineVec4 ()
 
ImVec4 GetTextSecondaryVec4 ()
 
ImVec4 GetTextDisabledVec4 ()
 
ImVec4 GetShadowVec4 ()
 
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)
 
bool ToggleButton (const char *label, bool active, const ImVec2 &size)
 
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)
 
std::string MakePanelTitle (const std::string &title)
 
const char * ShortcutContextToString (ShortcutContext context)
 Convert ShortcutContext to display string.
 
ShortcutContext EditorNameToContext (const std::string &editor_name)
 Convert editor type name to ShortcutContext.
 
bool ThemedIconButton (const char *icon, const char *tooltip=nullptr, const ImVec2 &size=ImVec2(0, 0), bool is_active=false, bool is_disabled=false)
 Draw a standard icon button with theme-aware colors.
 
bool TransparentIconButton (const char *icon, const ImVec2 &size, const char *tooltip=nullptr, bool is_active=false, const ImVec4 &active_color=ImVec4(0, 0, 0, 0))
 Draw a transparent icon button (hover effect only).
 
bool ThemedButton (const char *label, const ImVec2 &size=ImVec2(0, 0))
 Draw a standard text button with theme colors.
 
bool PrimaryButton (const char *label, const ImVec2 &size=ImVec2(0, 0))
 Draw a primary action button (accented color).
 
bool DangerButton (const char *label, const ImVec2 &size=ImVec2(0, 0))
 Draw a danger action button (error color).
 
void SectionHeader (const char *label)
 Draw a section header.
 
bool PaletteColorButton (const char *id, const gfx::SnesColor &color, bool is_selected, bool is_modified, const ImVec2 &size)
 
void PanelHeader (const char *title, const char *icon=nullptr, bool *p_open=nullptr)
 Draw a panel header with consistent styling.
 
bool PaletteColorButton (const char *id, const struct SnesColor &color, bool is_selected, bool is_modified, const ImVec2 &size)
 Draw a palette color button.
 

Variables

thread_local std::vector< std::string > g_auto_scope_stack_
 
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)
 

Detailed Description

Graphical User Interface (GUI) components for the application.

Typedef Documentation

◆ ItemLabelFlags

Initial value:
enum ItemLabelFlag {
Left = 1u << 0u,
Right = 1u << 1u,
Default = Left,
}

Definition at line 82 of file input.h.

◆ GuiElement

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

Definition at line 94 of file input.h.

Enumeration Type Documentation

◆ CanvasType

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

Definition at line 50 of file canvas.h.

◆ CanvasMode

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

Definition at line 51 of file canvas.h.

◆ CanvasGridSize

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

Definition at line 52 of file canvas.h.

◆ TileInteractionMode

enum class yaze::gui::TileInteractionMode
strong

Tile interaction mode for canvas.

Enumerator
kNone 
kPaintSingle 
kPaintDrag 
kSelectSingle 
kSelectRectangle 
kColorPaint 

Definition at line 16 of file canvas_interaction_handler.h.

◆ MenuSectionPriority

enum class yaze::gui::MenuSectionPriority
strong

Menu section priority for controlling rendering order.

Lower values render first in the context menu:

  • Editor-specific items (0) appear at the top
  • Bitmap/palette operations (10) in the middle
  • Canvas properties (20) near the bottom
  • Debug/performance (30) at the bottom
Enumerator
kEditorSpecific 
kBitmapPalette 
kCanvasProperties 
kDebug 

Definition at line 23 of file canvas_menu.h.

◆ CanvasUsage

enum class yaze::gui::CanvasUsage
strong

Canvas usage patterns and tracking.

Enumerator
kTilePainting 
kTileSelecting 
kSelectRectangle 
kColorPainting 
kBitmapEditing 
kPaletteEditing 
kBppConversion 
kPerformanceMode 
kEntityManipulation 
kUnknown 

Definition at line 18 of file canvas_usage_tracker.h.

◆ CanvasInteraction

enum class yaze::gui::CanvasInteraction
strong

Canvas interaction types.

Enumerator
kMouseClick 
kMouseDrag 
kMouseRelease 
kKeyboardInput 
kContextMenu 
kModalOpen 
kModalClose 
kToolChange 
kModeChange 

Definition at line 35 of file canvas_usage_tracker.h.

◆ Platform

enum class yaze::gui::Platform
strong

Runtime platform detection for display string customization.

Enumerator
kWindows 
kMacOS 
kLinux 
kWebMac 
kWebOther 

Definition at line 16 of file platform_keys.h.

◆ TouchGesture

enum class yaze::gui::TouchGesture
strong

Gesture types recognized by the touch input system.

Enumerator
kNone 
kTap 
kDoubleTap 
kLongPress 
kPan 
kPinchZoom 
kRotate 

Definition at line 16 of file touch_input.h.

◆ TouchPhase

enum class yaze::gui::TouchPhase
strong

Phase of a touch gesture.

Enumerator
kBegan 
kChanged 
kEnded 
kCancelled 

Definition at line 29 of file touch_input.h.

◆ ButtonType

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

Definition at line 74 of file ui_helpers.h.

◆ ShortcutContext

enum class yaze::gui::ShortcutContext
strong

Defines the context in which a shortcut is active.

Enumerator
kGlobal 
kOverworld 
kDungeon 
kGraphics 
kPalette 
kSprite 
kMusic 
kMessage 
kEmulator 
kCode 

Definition at line 26 of file keyboard_shortcuts.h.

Function Documentation

◆ 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 79 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 85 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 91 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 97 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 103 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 109 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 119 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 131 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 138 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 146 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 154 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 162 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 171 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 179 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 187 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 194 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 201 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 209 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 218 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 226 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 234 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 256 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 267 of file widget_auto_register.h.

References AutoRegisterLastItem().

Here is the call graph for this function:

◆ BeginCanvas() [1/2]

◆ EndCanvas() [1/2]

◆ BeginCanvas() [2/2]

◆ EndCanvas() [2/2]

◆ ComputeZoomToFit()

ZoomToFitResult yaze::gui::ComputeZoomToFit ( ImVec2 content_px,
ImVec2 canvas_px,
float padding_px )

◆ ClampScroll()

ImVec2 yaze::gui::ClampScroll ( ImVec2 scroll,
ImVec2 content_px,
ImVec2 canvas_px )

Definition at line 1618 of file canvas.cc.

◆ 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()

void yaze::gui::BitmapCanvasPipeline ( gui::Canvas & canvas,
gfx::Bitmap & bitmap,
int width,
int height,
int tile_size,
bool is_loaded,
bool scrollbar,
int canvas_id )

◆ TableCanvasPipeline()

◆ DrawBitmap() [1/5]

void yaze::gui::DrawBitmap ( const CanvasRuntime & rt,
gfx::Bitmap & bitmap,
int border_offset,
float scale )

◆ DrawBitmap() [2/5]

void yaze::gui::DrawBitmap ( const CanvasRuntime & rt,
gfx::Bitmap & bitmap,
int x_offset,
int y_offset,
float scale,
int alpha )

Definition at line 2094 of file canvas.cc.

References yaze::gui::CanvasRuntime::draw_list, and RenderBitmapOnCanvas().

Here is the call graph for this function:

◆ DrawBitmap() [3/5]

void yaze::gui::DrawBitmap ( const CanvasRuntime & rt,
gfx::Bitmap & bitmap,
ImVec2 dest_pos,
ImVec2 dest_size,
ImVec2 src_pos,
ImVec2 src_size )

Definition at line 2102 of file canvas.cc.

References yaze::gui::CanvasRuntime::draw_list, and RenderBitmapOnCanvas().

Here is the call graph for this function:

◆ DrawBitmap() [4/5]

◆ DrawBitmapPreview()

◆ RenderPreviewPanel() [1/2]

◆ DrawRect()

◆ DrawText()

◆ DrawOutline()

void yaze::gui::DrawOutline ( const CanvasRuntime & rt,
int x,
int y,
int w,
int h,
ImU32 color )

◆ DrawTilemapPainter()

◆ DrawTileSelector()

bool yaze::gui::DrawTileSelector ( const CanvasRuntime & rt,
int size,
int size_y,
ImVec2 * out_selected_pos )

◆ DrawSelectRect()

◆ 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 )

◆ TileIndexAt()

TileHit yaze::gui::TileIndexAt ( const ImVec2 & local_pos,
float grid_step,
float scale,
const ImVec2 & canvas_px )

◆ DrawTileOutline()

void yaze::gui::DrawTileOutline ( const CanvasRuntime & rt,
const ImVec2 & tile_pos_px,
const ImVec2 & tile_size_px,
ImU32 color )

◆ DrawTileHighlight()

void yaze::gui::DrawTileHighlight ( const CanvasRuntime & rt,
const ImVec2 & tile_pos_px,
const ImVec2 & tile_size_px,
ImU32 color )

◆ DrawTileLabel()

void yaze::gui::DrawTileLabel ( const CanvasRuntime & rt,
const ImVec2 & tile_pos_px,
const char * text,
ImU32 color )

◆ DrawBitmap() [5/5]

bool yaze::gui::DrawBitmap ( gui::Canvas & canvas,
CanvasRuntime & rt,
gfx::Bitmap & bmp,
const BitmapDrawOpts & opts )

◆ DrawTilemapRegion()

bool yaze::gui::DrawTilemapRegion ( gui::Canvas & canvas,
CanvasRuntime & rt,
gfx::Tilemap & tilemap,
absl::Span< const int > tile_ids,
int tile_size,
float scale,
ImVec2 clamp_px )

◆ RenderSelectorPanel()

bool yaze::gui::RenderSelectorPanel ( gui::Canvas & canvas,
gfx::Bitmap & bmp,
const SelectorPanelOpts & opts,
TileHit * out_hit )

◆ RenderPreviewPanel() [2/2]

bool yaze::gui::RenderPreviewPanel ( gui::Canvas & canvas,
gfx::Bitmap & bmp,
const PreviewPanelOpts & opts )

◆ RegisterDefaultCanvasMenu()

void yaze::gui::RegisterDefaultCanvasMenu ( CanvasMenuActionHost & host,
const CanvasRuntime & rt,
CanvasConfig & cfg )

◆ RenderContextMenu()

void yaze::gui::RenderContextMenu ( CanvasMenuActionHost & host,
const CanvasRuntime & rt,
CanvasConfig & cfg )

◆ CalculateCanvasGeometry()

CanvasGeometry yaze::gui::CalculateCanvasGeometry ( const CanvasConfig & config,
ImVec2 requested_size,
ImVec2 cursor_screen_pos,
ImVec2 content_region_avail )

Calculate canvas geometry from configuration and ImGui context.

Extracts the geometry calculation logic from Canvas::DrawBackground(). Computes screen-space positions, sizes, and scroll offsets for a canvas based on its configuration and the current ImGui layout state.

Parameters
configCanvas configuration (size, scale, custom size flag)
requested_sizeExplicitly requested canvas size (0,0 = use config)
cursor_screen_posCurrent ImGui cursor position (from GetCursorScreenPos)
content_region_availAvailable content region (from GetContentRegionAvail)
Returns
Calculated geometry for this frame

Definition at line 10 of file canvas_geometry.cc.

References yaze::gui::CanvasUtils::CalculateCanvasSize(), yaze::gui::CanvasUtils::CalculateScaledCanvasSize(), yaze::gui::CanvasGeometry::canvas_p0, yaze::gui::CanvasGeometry::canvas_p1, yaze::gui::CanvasConfig::canvas_size, yaze::gui::CanvasGeometry::canvas_sz, yaze::gui::CanvasConfig::custom_canvas_size, yaze::gui::CanvasConfig::global_scale, yaze::gui::CanvasGeometry::scaled_size, yaze::gui::CanvasGeometry::scrolling, and yaze::gui::CanvasConfig::scrolling.

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

Here is the call graph for this function:

◆ CalculateMouseInCanvas()

ImVec2 yaze::gui::CalculateMouseInCanvas ( const CanvasGeometry & geometry,
ImVec2 mouse_screen_pos )

Calculate mouse position in canvas space.

Converts screen-space mouse coordinates to canvas-space coordinates, accounting for canvas position and scroll offset. This is the correct coordinate system for tile/entity placement calculations.

Parameters
geometryCanvas geometry (must be current frame)
mouse_screen_posMouse position in screen space
Returns
Mouse position in canvas space

Definition at line 52 of file canvas_geometry.cc.

References GetCanvasOrigin().

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

Here is the call graph for this function:

◆ IsPointInCanvasBounds()

bool yaze::gui::IsPointInCanvasBounds ( const CanvasGeometry & geometry,
ImVec2 point )

Check if a point is within canvas bounds.

Tests whether a screen-space point lies within the canvas rectangle. Useful for hit testing and hover detection.

Parameters
geometryCanvas geometry (must be current frame)
pointPoint in screen space to test
Returns
True if point is within canvas bounds

Definition at line 61 of file canvas_geometry.cc.

References yaze::gui::CanvasGeometry::canvas_p0, and yaze::gui::CanvasGeometry::canvas_p1.

◆ ApplyScrollDelta()

void yaze::gui::ApplyScrollDelta ( CanvasGeometry & geometry,
ImVec2 delta )

Apply scroll delta to geometry.

Updates the scroll offset in the geometry. Used for pan operations.

Parameters
geometryCanvas geometry to update
deltaScroll delta (typically ImGui::GetIO().MouseDelta)

Definition at line 66 of file canvas_geometry.cc.

References yaze::gui::CanvasGeometry::scrolling.

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

◆ GetCanvasOrigin()

ImVec2 yaze::gui::GetCanvasOrigin ( const CanvasGeometry & geometry)
inline

Get origin point (canvas top-left + scroll offset)

Computes the "locked scrolled origin" used throughout canvas rendering. This is the reference point for all canvas-space to screen-space conversions.

Parameters
geometryCanvas geometry
Returns
Origin point in screen space

Definition at line 76 of file canvas_geometry.h.

References yaze::gui::CanvasGeometry::canvas_p0, and yaze::gui::CanvasGeometry::scrolling.

Referenced by CalculateMouseInCanvas().

◆ MakeFrameOptions()

CanvasFrameOptions yaze::gui::MakeFrameOptions ( ImVec2 size = ImVec2(0, 0),
float grid_step = 16.0f,
bool draw_grid = true,
bool draw_overlay = true,
bool render_popups = true,
bool draw_context_menu = false )
inline

◆ MakeSelectorOpts()

SelectorPanelOpts yaze::gui::MakeSelectorOpts ( ImVec2 size,
float grid_step,
int tile_size,
bool ensure_texture = true,
bool render_popups = true )
inline

◆ MakePreviewOpts()

PreviewPanelOpts yaze::gui::MakePreviewOpts ( ImVec2 size,
float grid_step = 0.0f,
bool ensure_texture = true,
bool render_popups = false )
inline

◆ MakeMenuHostWithDefaults()

CanvasMenuActionHost yaze::gui::MakeMenuHostWithDefaults ( const CanvasRuntime & rt,
CanvasConfig & cfg )
inline

Definition at line 51 of file canvas_helpers.h.

References RegisterDefaultCanvasMenu().

Here is the call graph for this function:

◆ AlignToGrid()

ImVec2 yaze::gui::AlignToGrid ( ImVec2 pos,
float grid_step )

Align position to grid.

Snaps canvas position to nearest grid cell.

Parameters
posCanvas position
grid_stepGrid cell size
Returns
Grid-aligned position

Definition at line 30 of file canvas_interaction.cc.

Referenced by yaze::gui::CanvasInteractionHandler::DrawSolidTilePainter(), yaze::gui::CanvasInteractionHandler::DrawTilemapPainter(), HandleHover(), HandleRectangleSelection(), HandleTilemapPaint(), HandleTilePaint(), HandleTilePaintWithPreview(), and HandleTileSelection().

◆ GetMouseInCanvasSpace()

ImVec2 yaze::gui::GetMouseInCanvasSpace ( const CanvasGeometry & geometry)

Get mouse position in canvas space.

Converts screen-space mouse position to canvas-space coordinates.

Parameters
geometryCanvas geometry (includes origin)
Returns
Mouse position in canvas space

Definition at line 35 of file canvas_interaction.cc.

References yaze::gui::CanvasGeometry::canvas_p0, and yaze::gui::CanvasGeometry::scrolling.

Referenced by HandleHover(), HandleRectangleSelection(), HandleTilemapPaint(), HandleTilePaint(), HandleTilePaintWithPreview(), and HandleTileSelection().

◆ IsMouseInCanvas()

bool yaze::gui::IsMouseInCanvas ( const CanvasGeometry & geometry)

Check if mouse is in canvas bounds.

Parameters
geometryCanvas geometry
Returns
True if mouse is within canvas

Definition at line 42 of file canvas_interaction.cc.

References yaze::gui::CanvasGeometry::canvas_p0, and yaze::gui::CanvasGeometry::canvas_p1.

Referenced by HandleEntityInteraction(), HandleHover(), HandleRectangleSelection(), HandleTilemapPaint(), HandleTilePaint(), HandleTilePaintWithPreview(), and HandleTileSelection().

◆ CanvasToTileGrid()

ImVec2 yaze::gui::CanvasToTileGrid ( ImVec2 canvas_pos,
float tile_size,
float global_scale )

Calculate tile grid indices from canvas position.

Parameters
canvas_posCanvas-space position
tile_sizeLogical tile size
global_scaleCanvas scale factor
Returns
Tile grid position (x, y)

Definition at line 50 of file canvas_interaction.cc.

◆ HandleRectangleSelection()

RectSelectionEvent yaze::gui::HandleRectangleSelection ( const CanvasGeometry & geometry,
int current_map,
float tile_size,
ImDrawList * draw_list,
ImGuiMouseButton mouse_button = ImGuiMouseButton_Right )

Handle rectangle selection interaction.

Processes right-click drag to select multiple tiles in a rectangular region. Returns event when selection completes.

Parameters
geometryCanvas geometry (position, size, scale)
current_mapCurrent map ID for coordinate calculation
tile_sizeLogical tile size (before scaling)
draw_listImGui draw list for preview rendering
mouse_buttonMouse button for selection (default: right)
Returns
RectSelectionEvent with selection results

Definition at line 61 of file canvas_interaction.cc.

References AlignToGrid(), yaze::gui::CanvasGeometry::canvas_p0, yaze::gui::CanvasGeometry::canvas_sz, yaze::gui::RectSelectionEvent::current_map, yaze::gui::anonymous_namespace{canvas_interaction.cc}::SelectRectState::drag_start_pos, GetMouseInCanvasSpace(), yaze::gui::anonymous_namespace{canvas_interaction.cc}::SelectRectState::is_dragging, IsMouseInCanvas(), and yaze::gui::CanvasGeometry::scaled_size.

Referenced by yaze::gui::CanvasInteractionHandler::DrawSelectRect().

Here is the call graph for this function:

◆ HandleTileSelection()

TileSelectionEvent yaze::gui::HandleTileSelection ( const CanvasGeometry & geometry,
int current_map,
float tile_size,
ImGuiMouseButton mouse_button = ImGuiMouseButton_Right )

Handle single tile selection (right-click)

Processes single right-click to select one tile.

Parameters
geometryCanvas geometry
current_mapCurrent map ID
tile_sizeLogical tile size
mouse_buttonMouse button for selection
Returns
TileSelectionEvent with selected tile

Definition at line 180 of file canvas_interaction.cc.

References AlignToGrid(), yaze::gui::CanvasGeometry::canvas_sz, GetMouseInCanvasSpace(), IsMouseInCanvas(), and yaze::gui::CanvasGeometry::scaled_size.

Here is the call graph for this function:

◆ HandleTilePaint()

TilePaintEvent yaze::gui::HandleTilePaint ( const CanvasGeometry & geometry,
int tile_id,
float tile_size,
ImGuiMouseButton mouse_button = ImGuiMouseButton_Left )

Handle tile painting interaction.

Processes left-click/drag to paint tiles on tilemap. Returns event when paint action occurs.

Parameters
geometryCanvas geometry
tile_idCurrent tile ID to paint
tile_sizeLogical tile size
mouse_buttonMouse button for painting
Returns
TilePaintEvent with paint results

Definition at line 229 of file canvas_interaction.cc.

References AlignToGrid(), yaze::gui::CanvasGeometry::canvas_sz, GetMouseInCanvasSpace(), IsMouseInCanvas(), yaze::gui::CanvasGeometry::scaled_size, and yaze::gui::TilePaintEvent::tile_id.

Here is the call graph for this function:

◆ HandleTilePaintWithPreview()

TilePaintEvent yaze::gui::HandleTilePaintWithPreview ( const CanvasGeometry & geometry,
const gfx::Bitmap & bitmap,
float tile_size,
ImDrawList * draw_list,
ImGuiMouseButton mouse_button = ImGuiMouseButton_Left )

Handle tile painter with bitmap preview.

Renders preview of tile at hover position and handles paint interaction.

Parameters
geometryCanvas geometry
bitmapTile bitmap to paint
tile_sizeLogical tile size
draw_listImGui draw list for preview
mouse_buttonMouse button for painting
Returns
TilePaintEvent with paint results

Definition at line 258 of file canvas_interaction.cc.

References AlignToGrid(), yaze::gui::CanvasGeometry::canvas_p0, yaze::gui::CanvasGeometry::canvas_sz, GetMouseInCanvasSpace(), yaze::gfx::Bitmap::is_active(), IsMouseInCanvas(), yaze::gui::CanvasGeometry::scaled_size, yaze::gui::CanvasGeometry::scrolling, and yaze::gfx::Bitmap::texture().

◆ HandleTilemapPaint()

TilePaintEvent yaze::gui::HandleTilemapPaint ( const CanvasGeometry & geometry,
const gfx::Tilemap & tilemap,
int current_tile,
ImDrawList * draw_list,
ImGuiMouseButton mouse_button = ImGuiMouseButton_Left )

Handle tilemap painting interaction.

Processes painting with tilemap data (multiple tiles).

Parameters
geometryCanvas geometry
tilemapTilemap containing tile data
current_tileCurrent tile index in tilemap
draw_listImGui draw list for preview
mouse_buttonMouse button for painting
Returns
TilePaintEvent with paint results

Definition at line 301 of file canvas_interaction.cc.

References AlignToGrid(), yaze::gfx::Tilemap::atlas, yaze::gui::CanvasGeometry::canvas_p0, yaze::gui::CanvasGeometry::canvas_sz, GetMouseInCanvasSpace(), yaze::gfx::Bitmap::is_active(), IsMouseInCanvas(), yaze::gui::CanvasGeometry::scaled_size, yaze::gui::CanvasGeometry::scrolling, and yaze::gui::TilePaintEvent::tile_id.

Here is the call graph for this function:

◆ HandleHover()

HoverEvent yaze::gui::HandleHover ( const CanvasGeometry & geometry,
float tile_size )

Update hover state for canvas.

Calculates hover position and grid-aligned preview position.

Parameters
geometryCanvas geometry
tile_sizeLogical tile size
Returns
HoverEvent with hover state

Definition at line 341 of file canvas_interaction.cc.

References AlignToGrid(), yaze::gui::CanvasGeometry::canvas_sz, GetMouseInCanvasSpace(), IsMouseInCanvas(), and yaze::gui::CanvasGeometry::scaled_size.

Here is the call graph for this function:

◆ RenderHoverPreview()

void yaze::gui::RenderHoverPreview ( const CanvasGeometry & geometry,
const HoverEvent & hover,
float tile_size,
ImDrawList * draw_list,
ImU32 color = IM_COL32(255, 255, 255, 80) )

Render hover preview overlay.

Draws preview rectangle at hover position.

Parameters
geometryCanvas geometry
hoverHover event from HandleHover
tile_sizeLogical tile size
draw_listImGui draw list
colorPreview color (default: white with alpha)

Definition at line 359 of file canvas_interaction.cc.

References yaze::gui::CanvasGeometry::canvas_p0, yaze::gui::CanvasGeometry::canvas_sz, yaze::gui::HoverEvent::grid_position, yaze::gui::HoverEvent::is_valid, yaze::gui::CanvasGeometry::scaled_size, and yaze::gui::CanvasGeometry::scrolling.

◆ HandleEntityInteraction()

EntityInteractionEvent yaze::gui::HandleEntityInteraction ( const CanvasGeometry & geometry,
int entity_id,
ImVec2 entity_position )

Handle entity interaction (hover, click, drag)

Processes entity manipulation events.

Parameters
geometryCanvas geometry
entity_idEntity being interacted with
entity_positionCurrent entity position
Returns
EntityInteractionEvent with interaction results

Definition at line 382 of file canvas_interaction.cc.

References yaze::gui::EntityInteractionEvent::entity_id, and IsMouseInCanvas().

Here is the call graph for this function:

◆ RenderMenuItem()

void yaze::gui::RenderMenuItem ( const CanvasMenuItem & item,
std::function< void(const std::string &, std::function< void()>)> popup_opened_callback = nullptr )

◆ RenderMenuSection()

void yaze::gui::RenderMenuSection ( const CanvasMenuSection & section,
std::function< void(const std::string &, std::function< void()>)> popup_opened_callback = nullptr )

Render a menu section.

Renders section title (if present), all items, and separator.

Parameters
sectionMenu section to render
popup_opened_callbackOptional callback invoked when popup is opened

Definition at line 78 of file canvas_menu.cc.

References yaze::gui::CanvasMenuSection::items, RenderMenuItem(), yaze::gui::CanvasMenuSection::separator_after, yaze::gui::CanvasMenuSection::title, and yaze::gui::CanvasMenuSection::title_color.

Referenced by RenderCanvasMenu().

Here is the call graph for this function:

◆ RenderCanvasMenu()

void yaze::gui::RenderCanvasMenu ( const CanvasMenuDefinition & menu,
std::function< void(const std::string &, std::function< void()>)> popup_opened_callback = nullptr )

Render a complete menu definition.

Renders all sections in order. Does not handle ImGui::BeginPopup/EndPopup - caller is responsible for popup context.

Parameters
menuMenu definition to render
popup_opened_callbackOptional callback invoked when popup is opened

Definition at line 104 of file canvas_menu.cc.

References yaze::gui::CanvasMenuDefinition::enabled, RenderMenuSection(), and yaze::gui::CanvasMenuDefinition::sections.

Referenced by yaze::gui::CanvasContextMenu::Render().

Here is the call graph for this function:

◆ RenderCanvasBackground()

void yaze::gui::RenderCanvasBackground ( ImDrawList * draw_list,
const CanvasGeometry & geometry )

Render canvas background and border.

Draws the canvas background rectangle (dark) and border (white) at the calculated geometry positions. Extracted from Canvas::DrawBackground().

Parameters
draw_listImGui draw list for rendering
geometryCanvas geometry for this frame

Definition at line 17 of file canvas_rendering.cc.

References yaze::gui::CanvasGeometry::canvas_p0, yaze::gui::CanvasGeometry::canvas_p1, kRectangleColor, and kWhiteColor.

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

◆ RenderCanvasGrid()

void yaze::gui::RenderCanvasGrid ( ImDrawList * draw_list,
const CanvasGeometry & geometry,
const CanvasConfig & config,
int highlight_tile_id = -1 )

Render canvas grid with optional highlighting.

Draws grid lines, hex labels, and optional tile highlighting. Extracted from Canvas::DrawGrid().

Parameters
draw_listImGui draw list for rendering
geometryCanvas geometry
configCanvas configuration (grid settings)
highlight_tile_idTile ID to highlight (-1 = no highlight)

Definition at line 25 of file canvas_rendering.cc.

References yaze::gui::CanvasGeometry::canvas_p0, yaze::gui::CanvasGeometry::canvas_p1, yaze::gui::CanvasUtils::CanvasRenderContext::draw_list, yaze::gui::CanvasUtils::DrawCanvasGrid(), yaze::gui::CanvasConfig::enable_grid, yaze::gui::CanvasConfig::enable_hex_labels, yaze::gui::CanvasConfig::global_scale, yaze::gui::CanvasConfig::grid_step, and yaze::gui::CanvasGeometry::scrolling.

Here is the call graph for this function:

◆ RenderCanvasOverlay()

void yaze::gui::RenderCanvasOverlay ( ImDrawList * draw_list,
const CanvasGeometry & geometry,
const CanvasConfig & config,
const ImVector< ImVec2 > & points,
const ImVector< ImVec2 > & selected_points )

Render canvas overlay (hover and selection points)

Draws hover preview points and selection rectangle points. Extracted from Canvas::DrawOverlay().

Parameters
draw_listImGui draw list for rendering
geometryCanvas geometry
configCanvas configuration (scale)
pointsHover preview points
selected_pointsSelection rectangle points

Definition at line 47 of file canvas_rendering.cc.

References yaze::gui::CanvasGeometry::canvas_p0, yaze::gui::CanvasGeometry::canvas_p1, yaze::gui::CanvasUtils::CanvasRenderContext::draw_list, yaze::gui::CanvasUtils::DrawCanvasOverlay(), yaze::gui::CanvasConfig::enable_grid, yaze::gui::CanvasConfig::enable_hex_labels, yaze::gui::CanvasConfig::global_scale, yaze::gui::CanvasConfig::grid_step, and yaze::gui::CanvasGeometry::scrolling.

Here is the call graph for this function:

◆ RenderCanvasLabels()

void yaze::gui::RenderCanvasLabels ( ImDrawList * draw_list,
const CanvasGeometry & geometry,
const CanvasConfig & config,
const ImVector< ImVector< std::string > > & labels,
int current_labels,
int tile_id_offset )

Render canvas labels on grid.

Draws custom text labels on canvas tiles. Extracted from Canvas::DrawInfoGrid().

Parameters
draw_listImGui draw list for rendering
geometryCanvas geometry
configCanvas configuration
labelsLabel arrays (one per label set)
current_labelsActive label set index
tile_id_offsetTile ID offset for calculation

Definition at line 67 of file canvas_rendering.cc.

References yaze::gui::CanvasGeometry::canvas_p0, yaze::gui::CanvasGeometry::canvas_p1, yaze::gui::CanvasUtils::CanvasRenderContext::draw_list, yaze::gui::CanvasUtils::DrawCanvasLabels(), yaze::gui::CanvasConfig::enable_custom_labels, yaze::gui::CanvasConfig::enable_grid, yaze::gui::CanvasConfig::enable_hex_labels, yaze::gui::CanvasConfig::global_scale, yaze::gui::CanvasConfig::grid_step, and yaze::gui::CanvasGeometry::scrolling.

Here is the call graph for this function:

◆ RenderBitmapOnCanvas() [1/3]

void yaze::gui::RenderBitmapOnCanvas ( ImDrawList * draw_list,
const CanvasGeometry & geometry,
gfx::Bitmap & bitmap,
int border_offset,
float scale )

Render bitmap on canvas (border offset variant)

Draws a bitmap with a border offset from canvas origin. Extracted from Canvas::DrawBitmap().

Parameters
draw_listImGui draw list
geometryCanvas geometry
bitmapBitmap to render
border_offsetOffset from canvas edges
scaleRendering scale

Definition at line 95 of file canvas_rendering.cc.

References yaze::gui::CanvasGeometry::canvas_p0, yaze::gfx::Bitmap::height(), yaze::gfx::Bitmap::is_active(), yaze::gfx::Bitmap::texture(), and yaze::gfx::Bitmap::width().

Referenced by yaze::gui::Canvas::DrawBitmap(), yaze::gui::Canvas::DrawBitmap(), yaze::gui::Canvas::DrawBitmap(), DrawBitmap(), DrawBitmap(), and DrawBitmap().

Here is the call graph for this function:

◆ RenderBitmapOnCanvas() [2/3]

void yaze::gui::RenderBitmapOnCanvas ( ImDrawList * draw_list,
const CanvasGeometry & geometry,
gfx::Bitmap & bitmap,
int x_offset,
int y_offset,
float scale,
int alpha )

Render bitmap on canvas (x/y offset variant)

Draws a bitmap at specified x/y offset with optional alpha. Extracted from Canvas::DrawBitmap().

Parameters
draw_listImGui draw list
geometryCanvas geometry
bitmapBitmap to render
x_offsetX offset from canvas origin
y_offsetY offset from canvas origin
scaleRendering scale
alphaAlpha transparency (0-255)

Definition at line 112 of file canvas_rendering.cc.

References yaze::gui::CanvasGeometry::canvas_p0, yaze::gfx::Bitmap::height(), yaze::gfx::Bitmap::is_active(), yaze::gui::CanvasGeometry::scrolling, yaze::gfx::Bitmap::texture(), and yaze::gfx::Bitmap::width().

Here is the call graph for this function:

◆ RenderBitmapOnCanvas() [3/3]

void yaze::gui::RenderBitmapOnCanvas ( ImDrawList * draw_list,
const CanvasGeometry & geometry,
gfx::Bitmap & bitmap,
ImVec2 dest_pos,
ImVec2 dest_size,
ImVec2 src_pos,
ImVec2 src_size )

Render bitmap on canvas (custom source/dest regions)

Draws a bitmap with explicit source and destination rectangles. Extracted from Canvas::DrawBitmap().

Parameters
draw_listImGui draw list
geometryCanvas geometry
bitmapBitmap to render
dest_posDestination position (canvas-relative)
dest_sizeDestination size
src_posSource position in bitmap
src_sizeSource size in bitmap

Definition at line 138 of file canvas_rendering.cc.

References yaze::gui::CanvasGeometry::canvas_p0, yaze::gfx::Bitmap::height(), yaze::gfx::Bitmap::is_active(), yaze::gfx::Bitmap::texture(), and yaze::gfx::Bitmap::width().

Here is the call graph for this function:

◆ RenderBitmapGroup()

void yaze::gui::RenderBitmapGroup ( ImDrawList * draw_list,
const CanvasGeometry & geometry,
std::vector< int > & group,
gfx::Tilemap & tilemap,
int tile_size,
float scale,
int local_map_size,
ImVec2 total_map_size )

Render group of bitmaps from tilemap.

Draws multiple tiles for multi-tile selection preview. Extracted from Canvas::DrawBitmapGroup().

Parameters
draw_listImGui draw list
geometryCanvas geometry
groupVector of tile IDs to draw
tilemapTilemap containing the tiles
tile_sizeSize of each tile
scaleRendering scale
local_map_sizeSize of local map in pixels (default 512)
total_map_sizeTotal map size for boundary clamping

Definition at line 157 of file canvas_rendering.cc.

References yaze::gfx::Tilemap::atlas, yaze::gui::CanvasGeometry::canvas_p0, yaze::gfx::Bitmap::height(), yaze::gfx::Bitmap::is_active(), yaze::gfx::Tilemap::map_size, yaze::gui::CanvasGeometry::scrolling, yaze::gfx::Bitmap::texture(), yaze::gfx::Tilemap::tile_size, yaze::gfx::Bitmap::width(), yaze::gfx::Pair::x, and yaze::gfx::Pair::y.

Here is the call graph for this function:

◆ ConvertSnesColorToImVec4()

ImVec4 yaze::gui::ConvertSnesColorToImVec4 ( const gfx::SnesColor & color)

◆ ConvertImVec4ToSnesColor()

gfx::SnesColor yaze::gui::ConvertImVec4ToSnesColor ( const ImVec4 & color)

◆ SnesColorButton()

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

◆ SnesColorEdit4()

◆ InlinePaletteSelector()

IMGUI_API bool yaze::gui::InlinePaletteSelector ( gfx::SnesPalette & palette,
int num_colors = 8,
int * selected_index = nullptr )

Small inline palette selector - just color buttons for selection.

Parameters
palettePalette to display
num_colorsNumber of colors to show (default 8)
selected_indexPointer to store selected color index (optional)
Returns
True if a color was selected

Definition at line 78 of file color.cc.

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

Here is the call graph for this function:

◆ InlinePaletteEditor()

IMGUI_API absl::Status yaze::gui::InlinePaletteEditor ( gfx::SnesPalette & palette,
const std::string & title = "",
ImGuiColorEditFlags flags = 0 )

Full inline palette editor with color picker and copy options.

Parameters
palettePalette to edit
titleDisplay title
flagsImGui color edit flags
Returns
Status of the operation

Definition at line 118 of file color.cc.

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

Referenced by yaze::editor::ScreenEditor::DrawOverworldMapEditor().

Here is the call graph for this function:

◆ PopupPaletteEditor()

IMGUI_API bool yaze::gui::PopupPaletteEditor ( const char * popup_id,
gfx::SnesPalette & palette,
ImGuiColorEditFlags flags = 0 )

Popup palette editor - same as inline but in a popup.

Parameters
popup_idID for the popup window
palettePalette to edit
flagsImGui color edit flags
Returns
True if palette was modified

Definition at line 184 of file color.cc.

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

Here is the call graph for this function:

◆ DisplayPalette()

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

Definition at line 235 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 309 of file color.cc.

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

Referenced by yaze::editor::GraphicsEditor::DrawPaletteControls().

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 )

◆ PaletteColorButton() [1/3]

◆ ConvertColorToImVec4()

ImVec4 yaze::gui::ConvertColorToImVec4 ( const Color & color)
inline

Definition at line 23 of file color.h.

References yaze::gui::Color::alpha, yaze::gui::Color::blue, yaze::gui::Color::green, and yaze::gui::Color::red.

Referenced by yaze::gui::Theme::ApplyToImGui(), yaze::gui::LayoutHelpers::BeginCanvasPanel(), yaze::gui::LayoutHelpers::BeginTableWithTheming(), yaze::gui::LayoutHelpers::BeginToolbar(), yaze::gui::BackgroundRenderer::BlendColorWithFade(), yaze::gui::plotting::anonymous_namespace{implot_support.cc}::BuildBaseStyle(), DangerButton(), yaze::editor::ToastManager::Draw(), yaze::editor::RomLoadOptionsDialog::DrawActionButtons(), yaze::editor::ActivityBar::DrawActivityBarStrip(), yaze::gui::KeyboardShortcuts::DrawCategorySection(), yaze::editor::music::PianoRollView::DrawChannelList(), yaze::editor::UICoordinator::DrawCommandPalette(), DrawDisplaySettings(), DrawDisplaySettingsForPopup(), yaze::editor::UICoordinator::DrawMenuBarExtras(), yaze::editor::UICoordinator::DrawNotificationBell(), yaze::editor::RightPanelManager::DrawNotificationsPanel(), yaze::gui::KeyboardShortcuts::DrawOverlayContent(), yaze::editor::ProjectManagementPanel::DrawQuickActions(), yaze::editor::ProjectManagementPanel::DrawRomManagement(), yaze::editor::StatusBar::DrawRomSegment(), yaze::editor::SessionCoordinator::DrawSessionIndicator(), yaze::gui::KeyboardShortcuts::DrawShortcutRow(), yaze::editor::ActivityBar::DrawSidePanel(), yaze::editor::MusicEditor::DrawToolset(), yaze::editor::RomLoadOptionsDialog::DrawVersionInfo(), yaze::editor::AgentUITheme::FromCurrentTheme(), GetAccentColor(), yaze::editor::music::anonymous_namespace{tracker_view.cc}::GetColorBeatHighlight(), yaze::editor::music::anonymous_namespace{tracker_view.cc}::GetColorCommand(), yaze::editor::music::anonymous_namespace{tracker_view.cc}::GetColorNote(), yaze::editor::music::anonymous_namespace{tracker_view.cc}::GetColorSelection(), yaze::editor::music::anonymous_namespace{tracker_view.cc}::GetColorSubroutine(), GetErrorColor(), GetInfoColor(), GetModifiedColor(), GetOnPrimaryVec4(), GetOnSurfaceVariantVec4(), GetOnSurfaceVec4(), GetOutlineVec4(), yaze::editor::music::anonymous_namespace{piano_roll_view.cc}::GetPalette(), GetPrimaryActiveVec4(), GetPrimaryHoverVec4(), GetPrimaryVec4(), GetSelectedColor(), GetShadowVec4(), GetSuccessColor(), GetSurfaceContainerHighestVec4(), GetSurfaceContainerHighVec4(), GetSurfaceContainerVec4(), GetSurfaceVariantVec4(), GetSurfaceVec4(), GetTextDisabledVec4(), GetTextSecondaryVec4(), GetWarningColor(), PanelHeader(), PrimaryButton(), yaze::emu::ui::RenderAIAgentPanel(), yaze::emu::ui::RenderApuDebugger(), yaze::emu::ui::RenderBreakpointList(), yaze::emu::ui::RenderCpuInstructionLog(), yaze::gui::BackgroundRenderer::RenderDockingBackground(), yaze::emu::ui::RenderEmulatorInterface(), yaze::emu::ui::RenderKeyboardShortcuts(), yaze::emu::ui::RenderMemoryViewer(), yaze::emu::ui::RenderModernCpuDebugger(), yaze::emu::ui::RenderNavBar(), yaze::emu::ui::RenderPerformanceMonitor(), yaze::gui::BackgroundRenderer::RenderRadialGradient(), yaze::emu::ui::RenderSnesPpu(), yaze::emu::ui::RenderVirtualController(), yaze::gui::LayoutHelpers::SectionHeader(), SectionHeader(), yaze::gui::ThemeManager::ShowSimpleThemeEditor(), yaze::gui::ThemeManager::ShowThemeSelector(), ThemedIconButton(), and TransparentIconButton().

◆ ColorToHexString()

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

◆ 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 331 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 338 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 357 of file input.cc.

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

Here is the call graph for this function:

◆ InputHexByte() [1/2]

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

◆ 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 382 of file input.cc.

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

Here is the call graph for this function:

◆ InputHexByteEx() [1/2]

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

◆ InputHexByteEx() [2/2]

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

◆ InputHexWordEx()

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

◆ Paragraph()

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

Definition at line 443 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 448 of file input.cc.

◆ ItemLabel()

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

Definition at line 502 of file input.cc.

◆ 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 547 of file input.cc.

◆ InputTileInfo()

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

◆ GetID()

◆ MapKeyToImGuiKey()

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

◆ 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 667 of file input.cc.

◆ MemoryEditorPopup()

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

Definition at line 689 of file input.cc.

References yaze::gui::MemoryEditorWidget::DrawContents().

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

Here is the call graph for this function:

◆ InputHexByteCustom()

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

Definition at line 703 of file input.cc.

◆ InputHexWordCustom()

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

◆ SliderFloatWheel()

IMGUI_API bool yaze::gui::SliderFloatWheel ( const char * label,
float * v,
float v_min,
float v_max,
const char * format,
float wheel_step,
ImGuiSliderFlags flags )

◆ SliderIntWheel()

IMGUI_API bool yaze::gui::SliderIntWheel ( const char * label,
int * v,
int v_min,
int v_max,
const char * format,
int wheel_step,
ImGuiSliderFlags flags )

◆ GetCurrentPlatform()

Platform yaze::gui::GetCurrentPlatform ( )

Get the current platform at runtime.

For native builds, this is determined at compile time. For WASM builds, this queries navigator.platform on first call.

Definition at line 44 of file platform_keys.cc.

Referenced by IsMacPlatform().

◆ IsMacPlatform()

bool yaze::gui::IsMacPlatform ( )

Check if running on macOS (native or web)

Definition at line 49 of file platform_keys.cc.

References GetCurrentPlatform(), kMacOS, and kWebMac.

Referenced by FormatShortcut(), GetAltDisplayName(), and GetCtrlDisplayName().

Here is the call graph for this function:

◆ GetCtrlDisplayName()

const char * yaze::gui::GetCtrlDisplayName ( )

Get the display name for the primary modifier key.

Returns
"Cmd" on macOS platforms, "Ctrl" elsewhere

Definition at line 54 of file platform_keys.cc.

References IsMacPlatform().

Referenced by yaze::editor::DashboardPanel::DashboardPanel(), yaze::editor::RightPanelManager::DrawEditorSpecificShortcuts(), yaze::editor::RightPanelManager::DrawGlobalShortcuts(), yaze::editor::EditorSelectionDialog::EditorSelectionDialog(), FormatShortcut(), and yaze::gui::Shortcut::GetDisplayString().

Here is the call graph for this function:

◆ GetAltDisplayName()

const char * yaze::gui::GetAltDisplayName ( )

Get the display name for the secondary modifier key.

Returns
"Opt" on macOS platforms, "Alt" elsewhere

Definition at line 58 of file platform_keys.cc.

References IsMacPlatform().

Referenced by FormatShortcut(), and yaze::gui::Shortcut::GetDisplayString().

Here is the call graph for this function:

◆ GetKeyName()

const char * yaze::gui::GetKeyName ( ImGuiKey key)

Get the ImGui key name as a string.

Parameters
keyThe ImGuiKey value
Returns
String representation (e.g., "S", "Space", "F1")

Definition at line 60 of file platform_keys.cc.

Referenced by FormatShortcut(), and yaze::gui::Shortcut::GetDisplayString().

◆ FormatShortcut()

std::string yaze::gui::FormatShortcut ( const std::vector< ImGuiKey > & keys)

Format a list of ImGui keys into a human-readable shortcut string.

Handles platform-specific modifier naming:

  • {ImGuiMod_Ctrl, ImGuiKey_S} → "Cmd+S" on macOS, "Ctrl+S" elsewhere
  • {ImGuiMod_Ctrl, ImGuiMod_Shift, ImGuiKey_P} → "Cmd+Shift+P" on macOS
Parameters
keysVector of ImGuiKey values (modifiers and key)
Returns
Formatted shortcut string for display

Definition at line 225 of file platform_keys.cc.

References GetAltDisplayName(), GetCtrlDisplayName(), GetKeyName(), and IsMacPlatform().

Referenced by FormatCtrlShiftShortcut(), FormatCtrlShortcut(), and yaze::editor::PrintShortcut().

Here is the call graph for this function:

◆ FormatCtrlShortcut()

std::string yaze::gui::FormatCtrlShortcut ( ImGuiKey key)

Convenience function for Ctrl+key shortcuts.

Parameters
keyThe main key (e.g., ImGuiKey_S)
Returns
Formatted string like "Cmd+S" or "Ctrl+S"

Definition at line 293 of file platform_keys.cc.

References FormatShortcut().

Here is the call graph for this function:

◆ FormatCtrlShiftShortcut()

std::string yaze::gui::FormatCtrlShiftShortcut ( ImGuiKey key)

Convenience function for Ctrl+Shift+key shortcuts.

Parameters
keyThe main key (e.g., ImGuiKey_P)
Returns
Formatted string like "Cmd+Shift+P" or "Ctrl+Shift+P"

Definition at line 297 of file platform_keys.cc.

References FormatShortcut().

Here is the call graph for this function:

◆ MakePopupId() [1/2]

std::string yaze::gui::MakePopupId ( size_t session_id,
const std::string & editor_name,
const std::string & popup_name )
inline

◆ MakePopupId() [2/2]

std::string yaze::gui::MakePopupId ( const std::string & editor_name,
const std::string & popup_name )
inline

Shorthand for editors without explicit session tracking.

Uses session ID 0 by default. Prefer the session-aware overload when the editor has access to its session context.

Definition at line 34 of file popup_id.h.

◆ MakePopupIdWithInstance()

std::string yaze::gui::MakePopupIdWithInstance ( const std::string & editor_name,
const std::string & popup_name,
const void * instance )
inline

Generate popup ID with instance pointer for guaranteed uniqueness.

When you need absolute uniqueness even within the same editor type, append the instance pointer. This is useful for reusable components.

Definition at line 45 of file popup_id.h.

Referenced by yaze::gui::PaletteEditorWidget::DrawPaletteGrid().

◆ FuzzyMatch()

bool yaze::gui::FuzzyMatch ( const std::string & pattern,
const std::string & str )
inline

Simple fuzzy match - returns true if all chars in pattern appear in str in order.

Parameters
patternSearch pattern (e.g., "owm" for "Overworld Main")
strString to search in
Returns
true if pattern matches str in fuzzy manner

Examples:

  • FuzzyMatch("owm", "Overworld Main") -> true
  • FuzzyMatch("dung", "Dungeon Main") -> true
  • FuzzyMatch("xyz", "Overworld") -> false

Definition at line 23 of file search.h.

Referenced by AnyPassesFilter(), FuzzyScore(), PassesFilter(), and yaze::editor::PaletteEditor::PassesSearchFilter().

◆ FuzzyScore()

int yaze::gui::FuzzyScore ( const std::string & pattern,
const std::string & str )
inline

Score a fuzzy match (higher = better, 0 = no match)

Parameters
patternSearch pattern
strString to search in
Returns
Score from 0-100 (100 = exact prefix match, 0 = no match)

Scoring:

  • 100: Exact prefix match (pattern is prefix of str, case-insensitive)
  • 80: Contains match (pattern appears as substring)
  • 50: Fuzzy only (all chars appear in order but not as substring)
  • 0: No match

Definition at line 50 of file search.h.

References FuzzyMatch().

Here is the call graph for this function:

◆ PassesFilter()

bool yaze::gui::PassesFilter ( const std::string & filter,
const std::string & str )
inline

Check if a string matches a search filter.

Parameters
filterThe search filter (can be empty for "show all")
strThe string to check
Returns
true if str should be shown given the filter

Definition at line 76 of file search.h.

References FuzzyMatch().

Here is the call graph for this function:

◆ AnyPassesFilter()

bool yaze::gui::AnyPassesFilter ( const std::string & filter,
const std::vector< std::string > & strings )
inline

Check if any of multiple strings match a search filter.

Parameters
filterThe search filter
stringsVector of strings to check
Returns
true if any string matches the filter

Definition at line 87 of file search.h.

References FuzzyMatch().

Here is the call graph for this function:

◆ ColorsYaze()

◆ DrawBitmapViewer()

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

Definition at line 132 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 249 of file style.cc.

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

◆ EndWindowWithDisplaySettings()

void yaze::gui::EndWindowWithDisplaySettings ( )

Definition at line 269 of file style.cc.

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

◆ BeginPadding()

◆ EndPadding()

◆ BeginNoPadding()

void yaze::gui::BeginNoPadding ( )

◆ EndNoPadding()

void yaze::gui::EndNoPadding ( )

◆ BeginChildWithScrollbar() [1/2]

◆ BeginChildWithScrollbar() [2/2]

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

Definition at line 302 of file style.cc.

◆ BeginChildBothScrollbars()

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

Definition at line 319 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 327 of file style.cc.

◆ EndTableCanvas()

void yaze::gui::EndTableCanvas ( )

Definition at line 343 of file style.cc.

◆ SetupCanvasTableColumn()

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

Definition at line 347 of file style.cc.

◆ BeginCanvasTableCell()

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

Definition at line 356 of file style.cc.

◆ DrawDisplaySettings()

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

Definition at line 372 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 24 of file theme_manager.cc.

◆ RGBA()

◆ GetThemeColor() [1/2]

Color yaze::gui::GetThemeColor ( const std::string & color_name)
inline

◆ GetThemeColorVec4()

ImVec4 yaze::gui::GetThemeColorVec4 ( const std::string & color_name)
inline

Definition at line 324 of file theme_manager.h.

References yaze::gui::ThemeManager::Get(), and yaze::gui::ThemeManager::GetThemeColorVec4().

Here is the call graph for this function:

◆ GetPrimary()

Color yaze::gui::GetPrimary ( )
inline

Definition at line 329 of file theme_manager.h.

References yaze::gui::ThemeManager::Get(), and yaze::gui::ThemeManager::GetPrimary().

Referenced by GetPrimaryVec4().

Here is the call graph for this function:

◆ GetPrimaryHover()

Color yaze::gui::GetPrimaryHover ( )
inline

Definition at line 332 of file theme_manager.h.

References yaze::gui::ThemeManager::Get(), and yaze::gui::ThemeManager::GetPrimaryHover().

Referenced by GetPrimaryHoverVec4().

Here is the call graph for this function:

◆ GetPrimaryActive()

Color yaze::gui::GetPrimaryActive ( )
inline

Definition at line 335 of file theme_manager.h.

References yaze::gui::ThemeManager::Get(), and yaze::gui::ThemeManager::GetPrimaryActive().

Referenced by GetPrimaryActiveVec4().

Here is the call graph for this function:

◆ GetSecondary()

Color yaze::gui::GetSecondary ( )
inline

Definition at line 338 of file theme_manager.h.

References yaze::gui::ThemeManager::Get(), and yaze::gui::ThemeManager::GetSecondary().

Here is the call graph for this function:

◆ GetSurface()

Color yaze::gui::GetSurface ( )
inline

Definition at line 341 of file theme_manager.h.

References yaze::gui::ThemeManager::Get(), and yaze::gui::ThemeManager::GetSurface().

Referenced by GetSurfaceVec4().

Here is the call graph for this function:

◆ GetSurfaceVariant()

Color yaze::gui::GetSurfaceVariant ( )
inline

Definition at line 344 of file theme_manager.h.

References yaze::gui::ThemeManager::Get(), and yaze::gui::ThemeManager::GetSurfaceVariant().

Referenced by GetSurfaceVariantVec4().

Here is the call graph for this function:

◆ GetSurfaceContainer()

Color yaze::gui::GetSurfaceContainer ( )
inline

Definition at line 347 of file theme_manager.h.

References yaze::gui::ThemeManager::Get(), and yaze::gui::ThemeManager::GetSurfaceContainer().

Referenced by GetSurfaceContainerVec4().

Here is the call graph for this function:

◆ GetSurfaceContainerHigh()

Color yaze::gui::GetSurfaceContainerHigh ( )
inline

Definition at line 350 of file theme_manager.h.

References yaze::gui::ThemeManager::Get(), and yaze::gui::ThemeManager::GetSurfaceContainerHigh().

Referenced by GetSurfaceContainerHighVec4().

Here is the call graph for this function:

◆ GetSurfaceContainerHighest()

Color yaze::gui::GetSurfaceContainerHighest ( )
inline

Definition at line 353 of file theme_manager.h.

References yaze::gui::ThemeManager::Get(), and yaze::gui::ThemeManager::GetSurfaceContainerHighest().

Referenced by GetSurfaceContainerHighestVec4().

Here is the call graph for this function:

◆ GetOnSurface()

Color yaze::gui::GetOnSurface ( )
inline

Definition at line 356 of file theme_manager.h.

References yaze::gui::ThemeManager::Get(), and yaze::gui::ThemeManager::GetOnSurface().

Referenced by GetOnSurfaceVec4().

Here is the call graph for this function:

◆ GetOnSurfaceVariant()

Color yaze::gui::GetOnSurfaceVariant ( )
inline

Definition at line 359 of file theme_manager.h.

References yaze::gui::ThemeManager::Get(), and yaze::gui::ThemeManager::GetOnSurfaceVariant().

Referenced by GetOnSurfaceVariantVec4().

Here is the call graph for this function:

◆ GetOnPrimary()

Color yaze::gui::GetOnPrimary ( )
inline

Definition at line 362 of file theme_manager.h.

References yaze::gui::ThemeManager::Get(), and yaze::gui::ThemeManager::GetOnPrimary().

Referenced by GetOnPrimaryVec4().

Here is the call graph for this function:

◆ GetOutline()

Color yaze::gui::GetOutline ( )
inline

Definition at line 365 of file theme_manager.h.

References yaze::gui::ThemeManager::Get(), and yaze::gui::ThemeManager::GetOutline().

Referenced by GetOutlineVec4().

Here is the call graph for this function:

◆ GetTextSecondary()

Color yaze::gui::GetTextSecondary ( )
inline

Definition at line 368 of file theme_manager.h.

References yaze::gui::ThemeManager::Get(), and yaze::gui::ThemeManager::GetTextSecondary().

Referenced by GetTextSecondaryVec4().

Here is the call graph for this function:

◆ GetTextDisabled()

Color yaze::gui::GetTextDisabled ( )
inline

Definition at line 371 of file theme_manager.h.

References yaze::gui::ThemeManager::Get(), and yaze::gui::ThemeManager::GetTextDisabled().

Referenced by GetTextDisabledVec4().

Here is the call graph for this function:

◆ GetShadow()

Color yaze::gui::GetShadow ( )
inline

Definition at line 374 of file theme_manager.h.

References yaze::gui::ThemeManager::Get(), and yaze::gui::ThemeManager::GetShadow().

Referenced by GetShadowVec4().

Here is the call graph for this function:

◆ GetPrimaryVec4()

◆ GetPrimaryHoverVec4()

ImVec4 yaze::gui::GetPrimaryHoverVec4 ( )
inline

Definition at line 382 of file theme_manager.h.

References ConvertColorToImVec4(), and GetPrimaryHover().

Referenced by yaze::editor::RightPanelManager::DrawAgentChatPanel().

Here is the call graph for this function:

◆ GetPrimaryActiveVec4()

ImVec4 yaze::gui::GetPrimaryActiveVec4 ( )
inline

Definition at line 385 of file theme_manager.h.

References ConvertColorToImVec4(), and GetPrimaryActive().

Referenced by yaze::editor::RightPanelManager::DrawAgentChatPanel().

Here is the call graph for this function:

◆ GetSurfaceVec4()

ImVec4 yaze::gui::GetSurfaceVec4 ( )
inline

Definition at line 388 of file theme_manager.h.

References ConvertColorToImVec4(), and GetSurface().

Here is the call graph for this function:

◆ GetSurfaceVariantVec4()

ImVec4 yaze::gui::GetSurfaceVariantVec4 ( )
inline

Definition at line 391 of file theme_manager.h.

References ConvertColorToImVec4(), and GetSurfaceVariant().

Here is the call graph for this function:

◆ GetSurfaceContainerVec4()

ImVec4 yaze::gui::GetSurfaceContainerVec4 ( )
inline

◆ GetSurfaceContainerHighVec4()

◆ GetSurfaceContainerHighestVec4()

◆ GetOnSurfaceVec4()

ImVec4 yaze::gui::GetOnSurfaceVec4 ( )
inline

Definition at line 403 of file theme_manager.h.

References ConvertColorToImVec4(), and GetOnSurface().

Referenced by yaze::editor::RightPanelManager::DrawAgentChatPanel().

Here is the call graph for this function:

◆ GetOnSurfaceVariantVec4()

ImVec4 yaze::gui::GetOnSurfaceVariantVec4 ( )
inline

Definition at line 406 of file theme_manager.h.

References ConvertColorToImVec4(), and GetOnSurfaceVariant().

Referenced by yaze::editor::UICoordinator::DrawMaterialButton().

Here is the call graph for this function:

◆ GetOnPrimaryVec4()

ImVec4 yaze::gui::GetOnPrimaryVec4 ( )
inline

Definition at line 409 of file theme_manager.h.

References ConvertColorToImVec4(), and GetOnPrimary().

Here is the call graph for this function:

◆ GetOutlineVec4()

◆ GetTextSecondaryVec4()

ImVec4 yaze::gui::GetTextSecondaryVec4 ( )
inline

Definition at line 415 of file theme_manager.h.

References ConvertColorToImVec4(), and GetTextSecondary().

Referenced by yaze::editor::FileBrowser::Draw(), yaze::editor::RightPanelManager::DrawAboutSection(), yaze::editor::ActivityBar::DrawActivityBarStrip(), yaze::editor::RightPanelManager::DrawAgentChatPanel(), yaze::editor::StatusBar::DrawCursorSegment(), yaze::editor::StatusBar::DrawCustomSegments(), yaze::editor::RightPanelManager::DrawEditorSpecificShortcuts(), yaze::editor::EditorManager::DrawMenuBar(), yaze::editor::UICoordinator::DrawMenuBarIconButton(), yaze::editor::StatusBar::DrawModeSegment(), yaze::editor::UICoordinator::DrawNotificationBell(), yaze::editor::RightPanelManager::DrawNotificationsPanel(), yaze::editor::RightPanelManager::DrawPanelHeader(), yaze::editor::RightPanelManager::DrawPanelLabel(), yaze::editor::RightPanelManager::DrawPanelToggleButtons(), yaze::editor::RightPanelManager::DrawPanelValue(), yaze::editor::ProjectManagementPanel::DrawProjectOverview(), yaze::editor::RightPanelManager::DrawProjectPanel(), yaze::editor::RightPanelManager::DrawPropertiesPanel(), yaze::editor::RightPanelManager::DrawProposalsPanel(), yaze::editor::ProjectManagementPanel::DrawQuickActions(), yaze::editor::ProjectManagementPanel::DrawRomManagement(), yaze::editor::StatusBar::DrawRomSegment(), yaze::editor::StatusBar::DrawSelectionSegment(), yaze::editor::UICoordinator::DrawSessionButton(), yaze::editor::StatusBar::DrawSessionSegment(), yaze::editor::RightPanelManager::DrawSettingsPanel(), yaze::editor::ProjectManagementPanel::DrawSnapshotHistory(), yaze::editor::ProjectManagementPanel::DrawVersionControl(), and yaze::editor::StatusBar::DrawZoomSegment().

Here is the call graph for this function:

◆ GetTextDisabledVec4()

◆ GetShadowVec4()

ImVec4 yaze::gui::GetShadowVec4 ( )
inline

Definition at line 421 of file theme_manager.h.

References ConvertColorToImVec4(), and GetShadow().

Here is the call graph for this function:

◆ GetThemeColor() [2/2]

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

Definition at line 17 of file ui_helpers.cc.

◆ GetSuccessColor()

◆ GetWarningColor()

◆ GetErrorColor()

ImVec4 yaze::gui::GetErrorColor ( )

◆ GetInfoColor()

ImVec4 yaze::gui::GetInfoColor ( )

Definition at line 36 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 ( )

◆ GetExitColor()

ImVec4 yaze::gui::GetExitColor ( )

◆ GetItemColor()

ImVec4 yaze::gui::GetItemColor ( )

◆ GetSpriteColor()

ImVec4 yaze::gui::GetSpriteColor ( )

◆ GetSelectedColor()

ImVec4 yaze::gui::GetSelectedColor ( )

Definition at line 67 of file ui_helpers.cc.

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

Here is the call graph for this function:

◆ GetLockedColor()

ImVec4 yaze::gui::GetLockedColor ( )

Definition at line 72 of file ui_helpers.cc.

Referenced by LockIndicator().

◆ GetVanillaRomColor()

ImVec4 yaze::gui::GetVanillaRomColor ( )

Definition at line 77 of file ui_helpers.cc.

References GetWarningColor().

Here is the call graph for this function:

◆ GetCustomRomColor()

ImVec4 yaze::gui::GetCustomRomColor ( )

Definition at line 81 of file ui_helpers.cc.

References GetSuccessColor().

Here is the call graph for this function:

◆ GetModifiedColor()

ImVec4 yaze::gui::GetModifiedColor ( )

Definition at line 85 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 94 of file ui_helpers.cc.

Referenced by LabeledInputHex(), and LabeledInputHex().

◆ EndField()

void yaze::gui::EndField ( )

Definition at line 106 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 111 of file ui_helpers.cc.

Referenced by yaze::zelda3::DungeonObjectEditor::DrawPropertyUI().

◆ EndPropertyTable()

void yaze::gui::EndPropertyTable ( )

Definition at line 123 of file ui_helpers.cc.

Referenced by yaze::zelda3::DungeonObjectEditor::DrawPropertyUI().

◆ PropertyRow() [1/2]

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

Definition at line 127 of file ui_helpers.cc.

Referenced by yaze::zelda3::DungeonObjectEditor::DrawPropertyUI().

◆ PropertyRow() [2/2]

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

Definition at line 134 of file ui_helpers.cc.

◆ PropertyRowHex() [1/2]

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

Definition at line 141 of file ui_helpers.cc.

◆ PropertyRowHex() [2/2]

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

Definition at line 148 of file ui_helpers.cc.

◆ SectionHeader() [1/2]

◆ IconButton()

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

Definition at line 164 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 203 of file ui_helpers.cc.

References GetSuccessColor(), and GetThemeColor().

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

Here is the call graph for this function:

◆ ToggleButton()

bool yaze::gui::ToggleButton ( const char * label,
bool active,
const ImVec2 & size )

Definition at line 222 of file ui_helpers.cc.

References GetAccentColor().

Referenced by yaze::editor::OverworldToolbar::Draw(), and yaze::editor::MapPropertiesSystem::DrawCanvasToolbar().

Here is the call graph for this function:

◆ HelpMarker()

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

◆ SeparatorText()

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

Definition at line 249 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 285 of file ui_helpers.cc.

◆ EndToolset()

void yaze::gui::EndToolset ( )

Definition at line 290 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 295 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 317 of file ui_helpers.cc.

◆ EndCanvasContainer()

void yaze::gui::EndCanvasContainer ( )

Definition at line 323 of file ui_helpers.cc.

◆ EditorTabItem()

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

Definition at line 327 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 333 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 363 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 384 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 393 of file ui_helpers.cc.

References GetLockedColor(), ICON_MD_LOCK, and ICON_MD_LOCK_OPEN.

Here is the call graph for this function:

◆ VerticalSpacing()

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

Definition at line 405 of file ui_helpers.cc.

◆ HorizontalSpacing()

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

Definition at line 409 of file ui_helpers.cc.

◆ CenterText()

◆ RightAlign()

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

Definition at line 420 of file ui_helpers.cc.

◆ GetPulseAlpha()

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

Definition at line 429 of file ui_helpers.cc.

Referenced by PushPulseEffect().

◆ GetFadeIn()

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

Definition at line 434 of file ui_helpers.cc.

◆ PushPulseEffect()

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

Definition at line 453 of file ui_helpers.cc.

References GetPulseAlpha().

Here is the call graph for this function:

◆ PopPulseEffect()

void yaze::gui::PopPulseEffect ( )

Definition at line 458 of file ui_helpers.cc.

◆ LoadingSpinner()

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

Definition at line 462 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 490 of file ui_helpers.cc.

◆ SetupResponsiveColumns()

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

Definition at line 501 of file ui_helpers.cc.

◆ BeginTwoColumns()

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

Definition at line 517 of file ui_helpers.cc.

◆ SwitchColumn()

void yaze::gui::SwitchColumn ( )

Definition at line 534 of file ui_helpers.cc.

◆ EndTwoColumns()

void yaze::gui::EndTwoColumns ( )

Definition at line 538 of file ui_helpers.cc.

◆ LabeledInputHex() [1/2]

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

Definition at line 547 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 558 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 569 of file ui_helpers.cc.

◆ MakePanelTitle()

std::string yaze::gui::MakePanelTitle ( const std::string & title)

Definition at line 576 of file ui_helpers.cc.

◆ ShortcutContextToString()

const char * yaze::gui::ShortcutContextToString ( ShortcutContext context)

◆ EditorNameToContext()

ShortcutContext yaze::gui::EditorNameToContext ( const std::string & editor_name)

Convert editor type name to ShortcutContext.

Definition at line 725 of file keyboard_shortcuts.cc.

References kCode, kDungeon, kEmulator, kGlobal, kGraphics, kMessage, kMusic, kOverworld, kPalette, and kSprite.

◆ ThemedIconButton()

bool yaze::gui::ThemedIconButton ( const char * icon,
const char * tooltip = nullptr,
const ImVec2 & size = ImVec2(0, 0),
bool is_active = false,
bool is_disabled = false )

Draw a standard icon button with theme-aware colors.

Parameters
iconThe icon string (e.g., ICON_MD_SETTINGS)
tooltipOptional tooltip text
sizeThe size of the button (default: 0,0 = auto)
is_activeWhether the button is in an active/toggled state
is_disabledWhether the button is disabled
Returns
true if clicked

Definition at line 10 of file themed_widgets.cc.

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

Referenced by yaze::editor::PaletteGroupPanel::DrawPaletteSelector(), and yaze::editor::PaletteGroupPanel::DrawToolbar().

Here is the call graph for this function:

◆ TransparentIconButton()

bool yaze::gui::TransparentIconButton ( const char * icon,
const ImVec2 & size,
const char * tooltip = nullptr,
bool is_active = false,
const ImVec4 & active_color = ImVec4(0, 0, 0, 0) )

Draw a transparent icon button (hover effect only).

Parameters
iconThe icon string (e.g., ICON_MD_SETTINGS)
sizeThe size of the button
tooltipOptional tooltip text
is_activeWhether the button is in an active/toggled state
active_colorOptional custom color for active state icon If alpha is 0, uses theme.primary instead
Returns
true if clicked

Definition at line 37 of file themed_widgets.cc.

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

Referenced by yaze::editor::ActivityBar::DrawActivityBarStrip(), and PanelHeader().

Here is the call graph for this function:

◆ ThemedButton()

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

Draw a standard text button with theme colors.

Definition at line 72 of file themed_widgets.cc.

Referenced by yaze::editor::PaletteGroupPanel::DrawBatchOperationsPopup(), and yaze::editor::PaletteGroupPanel::DrawColorPicker().

◆ PrimaryButton()

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

Draw a primary action button (accented color).

Definition at line 77 of file themed_widgets.cc.

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

Referenced by yaze::editor::PaletteGroupPanel::DrawToolbar().

Here is the call graph for this function:

◆ DangerButton()

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

Draw a danger action button (error color).

Definition at line 91 of file themed_widgets.cc.

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

Referenced by yaze::editor::PaletteGroupPanel::DrawToolbar().

Here is the call graph for this function:

◆ SectionHeader() [2/2]

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

Draw a section header.

Definition at line 105 of file themed_widgets.cc.

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

Here is the call graph for this function:

◆ PaletteColorButton() [2/3]

bool yaze::gui::PaletteColorButton ( const char * id,
const gfx::SnesColor & color,
bool is_selected,
bool is_modified,
const ImVec2 & size )

Definition at line 117 of file themed_widgets.cc.

References ConvertSnesColorToImVec4().

Here is the call graph for this function:

◆ PanelHeader()

void yaze::gui::PanelHeader ( const char * title,
const char * icon,
bool * p_open )

Draw a panel header with consistent styling.

Definition at line 134 of file themed_widgets.cc.

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

Here is the call graph for this function:

◆ PaletteColorButton() [3/3]

bool yaze::gui::PaletteColorButton ( const char * id,
const struct SnesColor & color,
bool is_selected,
bool is_modified,
const ImVec2 & size )

Draw a palette color button.

Variable Documentation

◆ g_auto_scope_stack_

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

◆ kRectangleColor

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

Definition at line 144 of file canvas.cc.

Referenced by RenderCanvasBackground().

◆ kWhiteColor

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

Definition at line 145 of file canvas.cc.

Referenced by yaze::gui::Canvas::DrawInfoGrid(), and RenderCanvasBackground().

◆ kMouseFlags

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

Definition at line 147 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.