On this page
- Echo Chamber Scripting Reference
- Enums
- Constructors
EchoChamberInputBinding()EchoChamberInputBindingKey(_key, _check, _ctrl, _alt, _shift)EchoChamberInputBindingFunc(_fn)EchoChamberInputBindingBlock()EchoChamberInputContext(_id)SetParent(_parent_id): Set the parent context id for inheritance.GetBinding(_action_id): Get the binding for an action id.BindAction(_action_id, _binding): Bind an action to a binding.BindKey(_action_id, _key, _check, _ctrl, _alt, _shift): Bind an action to a keyboard key.BindFunc(_action_id, _fn): Bind an action to a function.BindBlock(_action_id): Bind an action to a blocker (prevents inheritance).ClearAction(_action_id): Clear a local action binding so the parent can take over.
EchoChamberRoot(_theme)ApplyTheme(_theme): Apply a new theme and reapply defaults across windows and panels.BeginFrame(): Snapshot mouse and wheel for this frame.GetDefaultInputContextId(): Return the default input context id.BindCoreInputAction(_action_id, _binding): Bind a core Echo Chamber action in the default context.GetInputContext(_id): Get an input context by id.CreateInputContext(_id, _parent_id): Create or return an input context by id.RemoveInputContext(_id): Remove an input context by id.InputPressed(_action_id, _window): Check whether an action is pressed in the active input context.InputDown(_action_id, _window): Check whether an action is held in the active input context.InputReleased(_action_id, _window): Check whether an action is released in the active input context.AddPanel(_panel): Add a top-level panel to the root.CreateWindow(_id): Create and register a floating debug window.RegisterWindow(_window): Register an externally created window instance.FindWindow(_id): Find a registered window by id.FindControl(_id): Find a control by id across all windows.DumpUI(): Dump the current UI tree and focus/overlay state to the debug log.RemoveWindow(_window_or_id): Remove a registered window and detach its panels/controls.BringWindowToFront(_window_or_id): Bring a window (or id) to the front of the z-order.BringWindowToFrontById(_id): Bring a window to the front by id.SendWindowToBack(_window_or_id): Send a window (or id) to the back of the z-order.BringWindowsBack(): Bring all windows back into view so their title bars remain accessible.SetWindowZIndex(_window_or_id, _index): Set a window z-order index (0 = back, last = front).SetModalWindow(_window_or_id): Set the modal window (blocks input to other windows).ClearModalWindow(): Clear the current modal window.GetModalWindow(): Get the current modal window (if any).SetPersistenceFile(_filename): Set the INI filename used for saving and loading UI layout state.SetPersistenceSection(_section): Set the INI section prefix used for saving and loading UI layout state.SaveLayout(): Save window layout, z-order, and panel state to an INI file.LoadLayout(): Load window layout, z-order, and panel state from an INI file.SetMouseCapture(_window): Capture the mouse for a window interaction (drag/resize).ClearMouseCapture(_window): Release mouse capture if owned by the given window.RunDesktop(): Run the managed desktop: capture input, process the active window, draw all windows, then draw overlays and tooltip.ConsumeMouse(): Consume mouse input for all remaining controls this frame.ConsumeWheel(): Consume mouse wheel for all remaining scroll regions.DrawScrollArea(_scroll_state, _rect, _content_h, _draw_fn): Draw a scrollable clipped region and handle mouse wheel scrolling when hovered.PushClipRect(_x1, _y1, _x2, _y2): Push a clip rectangle.PopClipRect(): Pop the most recently pushed clip rectangle.HitTestRect(_x1, _y1, _x2, _y2): Simple hit test for a rect.RequestTooltip(_control_id, _text, _anchor_x, _anchor_y): Request a tooltip for a given control id.SetActiveOverlayOwner(_control_id): Mark a control as owning a modal overlay (e.g. a dropdown).ClearActiveOverlayOwner(): Clear the active overlay (if any).RequestCloseOverlay(): Request the currently active overlay (if any) to close.QueueOverlay(_owner_id, _draw_fn, _rect, _owner_window): Queue an overlay draw callback. Overlays are drawn after all windows.OpenContextMenu(_items, _x, _y, _owner_window): Open a context menu overlay at a screen position.CloseContextMenu(): Close the active context menu overlay (if open).IsContextMenuOpen(): Returns true if the context menu overlay is open.DrawOverlays(): Draw all queued overlays once per frame.LayoutPanels(_x1, _y1, _x2, _y2): Dock + collapse layout. Assigns rects to all top-level panels.DrawTooltip(): Draw simple tooltip for the current tooltip_control_id (if delay elapsed).ShowToast(_text, _duration_ms): Show a short toast message (non-blocking).CopyToClipboard(_text, _toast_text, _duration_ms): Copy text to clipboard and show a toast confirmation.DrawToast(): Draw active toast notifications for this frame.DrawPanelBackground(_panel): Convenience: draw a basic panel background.DrawPanelCollapseHandle(_panel): Draw a collapse handle for a panel (if it supports collapsing).SetTextInputSource(_fn): Set a function that returns the current active text input string. If not set, keyboard_string is used.SetTextInputSeed(_fn): Set a function that seeds the active text input string when focusing. If not set, keyboard_string is used.FocusTextInput(_id, _initial_text, _placeholder, _commit_fn, _config): Focus a text input by id and seed its initial content.BlurTextInput(_id): Blur a focused text input by id.IsActiveTextInput(_id): Returns true if the given id is the currently focused text input.GetActiveText(): Return the current active text string while a text input is focused.GetTextBuffer(): Return the last committed text buffer for the active text input.FocusControl(_id, _rect): Give keyboard focus to a non-text control by id.IsControlFocused(_id): Returns true if the given control id currently owns keyboard focus (and no text input is active).BlurControlFocus(_id): Blur (clear) keyboard focus from a control by id.RegisterFocusable(_id, _rect): Register a focusable control for Tab navigation.
EchoChamberWindow(_id)SetTitle(_title): Set the window title text.SetInputContext(_context_id, _parent_id): Set the input context id used for this window.SwapInputContext(_context_id, _parent_id): Swap the input context and remove the old one if unused.SetWindowStyleKey(_key): Set the window style key (for theme.window_styles).SetHeaderStyleKey(_key): Set the header style key (for theme.header_styles).SetChromeButtonStyleKey(_key): Set the chrome button style key (for theme.button_styles).ApplyTheme(_theme): Apply a theme override to this window and its children.ClearThemeOverride(): Clear the window theme override (reverts to the root theme).SetPadding(_value): Set the content padding for this window.SetMargin(_x, [_y]): Set the outer margin for this window in GUI-space.SetTitlebarHeight(_value): Set the titlebar height for this window.SetTitlebarAuto(_flag): Set whether the titlebar height is driven by the current theme.SetResizeGripSize(_value): Set the resize grip size for this window.SetVisible(_flag): Show or hide this window.SetShowChromeButtons(_show_close, _show_minimize, _show_pin): Configure which chrome buttons are shown in the window header.OnClose(_fn): Set a callback that runs when the window is closed via the close button.OnMove(_fn): Set a callback that runs when the window moves.OnResize(_fn): Set a callback that runs when the window resizes.OnShow(_fn): Set a callback that runs when the window becomes visible.OnFocus(_fn): Set a callback that runs when the window gains focus.OnBlur(_fn): Set a callback that runs when the window loses focus.OnMinimize(_fn): Set a callback that runs when the window is minimized.OnRestore(_fn): Set a callback that runs when the window is restored.Close(): Close the window (sets visible to false) and firesOnClose.SetPinned(_flag): Set whether the window is pinned (disables dragging and resizing).TogglePinned(): Toggle pinned state.SetMinimized(_flag): Set whether the window is minimized (collapses content; only the title bar remains).ToggleMinimized(): Toggle minimized state.SetRect(_x1, _y1, _x2, _y2): Set the window rectangle in GUI-space.SetPosition(_x, _y): Set the window position in GUI-space (size is unchanged).GetWidth(): Get the current window width (in GUI-space).GetHeight(): Get the current window height (in GUI-space).SetMinSize(_w, _h): Set minimum width and height for this window.SetMaxSize(_w, _h): Set maximum width and height for this window (0 means no max).FitToContent([_root]): Resize the window once to fit current content.SetAutoFit(_flag): Enable or disable auto-fit after layout changes.AddPanel(_panel): Add a top-level panel to this window.RemovePanel(_panel_or_id): Remove a panel from this window (top-level or nested).ClearPanels(): Remove all panels from this window.FindPanel(_id): Find a panel in this window by id (searches nested container panels too).FindControl(_id): Find a control in this window by id (searches nested panels too).MoveControlToPanel(_control_or_id, _panel_or_id, [_index]): Move a control to another panel in this window.ContainsPoint(_x, _y): Return true if a point is inside this window’s current rectangle.BeginLayoutBatch(): Begin a layout batch (defers FitToContent until EndLayoutBatch).EndLayoutBatch(): End a layout batch and apply any deferred FitToContent.LayoutPanels(_root): Layout this window’s panels into the current content rect.ProcessWindowInteractions(_root): Handle mouse interactions for dragging/resizing and chrome button clicks.Draw(_root): Draw the window chrome and all owned panels.
EchoChamberPanel(_id, _dock)AddControl(_control): Add a control to this panel.InsertControl(_control, _index): Insert a control at a specific index (clamped).MoveControl(_control_or_id, _index): Reorder a direct control to a specific index (clamped).MoveControlToPanel(_control_or_id, _target_panel, [_index]): Move a control to another panel.SetControlOrder(_ids): Reorder direct controls using a list of ids.RemoveControl(_control_or_id): Remove a control from this panel (direct or nested).ClearControls(): Remove all direct controls from this panel.AddChildPanel(_panel): Add a child panel (for container usage).RemoveChildPanel(_panel_or_id): Remove a child panel from this panel (direct or nested).ClearChildPanels(): Remove all child panels from this panel.FindControl(_id): Find a direct or nested control within this panel by id.SetSizeMode(_mode): Configure how this panel resolves its dock size.SetSize(_value): Set dock thickness when using fixed sizing.SetFlowMode(_flow_mode): Set how child controls flow within the panel.SetScrollable(_flag): Enable or disable vertical scrolling for this panel.SetScrollState(_state): Assign a scroll state for this panel (used when scrollable).SetPadding(_value): Set panel content padding.SetMargin(_x, [_y]): Set panel outer margin in GUI-space.SetGap(_value): Set panel control gap spacing.SetRowHeight(_value): Set panel row height for controls.SetCollapsedSize(_value): Set collapsed dock thickness for this panel.SetCollapseMode(_mode): Set the panel collapse mode.SetCollapsed(_value): Set whether this panel is collapsed.SetPanelStyleKey(_key): Set the panel style key (for theme.panel_styles).SetMinSize(_value): Set minimum dock thickness when using fit-to-content.SetMaxSize(_value): Set maximum dock thickness when using fit-to-content.SetContentDrawer(_fn): Assign a custom content drawer for this panel.GetThickness(): Get panel thickness based on collapsed state.ResolveThickness(_root, _avail_width, _avail_height): Resolve actual thickness for layout considering size mode.Draw(_root): Draw this panel and its contents (controls or child panels).
EchoChamberScrollState(_id)EchoChamberControlBase(_id)GetRoot(): Get the owning root for this control (if attached).GetWindow(): Get the owning window for this control (if attached).GetPanel(): Get the owning panel for this control (if attached).SetPreferredWidth(_width): Set a preferred pixel width for this control when arranged in a row panel.SetPreferredHeight(_height): Set a preferred pixel height for this control.SetFillWidth(_flag): Set whether this control fills the available row width.SetPadding(_x, [_y]): Set inner padding for this control.SetMargin(_x, [_y]): Set outer margin for this control.SetLabel(_text): Set the control’s display label (used by controls that render a label).SetTooltip(_text): Set the control tooltip (shown on hover where supported).SetControlStyleKey(_style): Set the theme style key for this control (e.g. button/toggle/dropdown styles).SetVisible(_flag): Show or hide this control.SetEnabled(_flag): Enable or disable this control (disabled controls should not accept input).ProcessAndDraw(_root, _panel, _rect): Override: process input and draw using the given rect.
EchoChamberLabel(_id)EchoChamberTextBox(_id)SetText(_text): Set the text content for this box.BindText(_source, [_key_or_fn]): Bind the text content to a struct field or getter function.SetAlign(_align): Set text alignment (“left”, “center”, “right”).UseSmallFont(_flag): Use the smaller theme font.SetPadding(_x, [_y]): Set inner padding for the text box.SetFillWidth(_flag): Set whether this box fills the available row width.
EchoChamberButton(_id)EchoChamberSlider(_id)EchoChamberToggle(_id)EchoChamberTextInput(_id)BindText(_struct, _key): Bind the text input to a struct field.SetPlaceholder(_text): Set placeholder text shown when empty.OnChange(_fn): Set a callback that runs when text is committed.SetReadOnly(_flag): Toggle read-only mode.SetMaxLength(_len): Set the maximum number of characters (0 for unlimited).SetAllowedChars(_chars): Restrict input to a specific set of characters.SetNumericOnly(_flag, [_allow_decimal], [_allow_negative]): Restrict input to numeric characters.SetSelectAllOnFocus(_flag): Select all text when the input gains focus.SetFilter(_fn): Provide a filter function for inserted text.SetInvalid(_flag): Toggle invalid styling.
EchoChamberSeparator(_id)EchoChamberListView(_id)SetRowHeight(_h): Set row height in pixels.SetVisibleRows(_rows): Set a visible row count (auto height from row height).SetAutoHeightFromCount(_max_rows): Auto-size to row count up to a maximum.SetAutoWidthFromContent(_max_rows): Auto-size width from row content (sample limit).SetFillWidth(_flag): Toggle fill width for row layouts.SetPreferredHeight(_h): Set the preferred height for FitToContent.SetPreferredWidth(_w): Set the preferred width for FitToContent.SetCountGetter(_fn): Set a function that returns the row count.SetRowDrawer(_fn): Set a function that draws a row.SetRowMeasure(_fn): Set a function that returns row text/width for auto width.SetOnSelect(_fn): Set a callback that runs when selection changes.SetOnActivate(_fn): Set a callback that runs when a row is activated.SetOnDoubleClick(_fn): Set a callback for double click on a row.SetOnRightClick(_fn): Set a callback for right click on a row.SetAutoScroll(_enabled): Enable or disable auto scroll to bottom.JumpToBottom(): Jump scroll to the bottom.IsNearBottom(): Return true if the scroll is near the bottom.IsAutoFollowPaused(): Return true if auto follow is paused.GetSelectedIndex(): Get the selected index.SetSelectedIndex(_index): Set the selected index.
EchoChamberDropdownBase(_id)GetSelectedIndex(): Get the selected index.SetSelectedIndex(_idx): Set the selected index.DrawOverlayRow(_root, _row_index, _row_rect, _hover, _selected): Draw an overlay row (override to customize).OnOverlayRowClick(_root, _row_index, _rect, _mx, _my): Handle overlay row click (override to customize).SetOptions(_array): Set the dropdown options array.SetUnfoldDirection(_dir): Set the overlay unfold direction (“up” or “down”).SetUseSelectedLabelWhenClosed(_flag): Use the selected label when closed.SetOverlayMaxHeight(_height): Set the max overlay height.
EchoChamberDropdownSelect(_id)EchoChamberDropdownToggleMenu(_id)SetItems(_items): Set the item list for the menu.OnAnyChange(_fn): Set a callback that runs when any item changes.GetSelectedIndex(): Get the selected index.SetSelectedIndex(_idx): Set the selected index.DrawOverlayRow(_root, _row_index, _rect, _hover, _is_selected): Draw an overlay row.OnOverlayRowClick(_root, _row_index, _rect, _mx, _my): Handle overlay row click.
EchoChamberMachinePicker(_id)EchoChamberOpenConsole(_ui_root)
- Echo Chamber Themes
- Default theme structure
- Style map conventions
- Theme constructors
EchoChamberTheme()- Pre-built Custom Themes
EchoChamberThemeMidnightNeon()EchoChamberThemeAmberForest()EchoChamberThemeSakuraPunch()EchoChamberThemeArcadeWave()EchoChamberThemeCircuitCandy()EchoChamberThemeToxicTerminal()EchoChamberThemeSunsetGlitch()EchoChamberThemeBubblegumTerminal()EchoChamberThemeMangoMint()- Functions
EchoChamberThemeTryGetFont(_font_name)EchoChamberThemeTryGetSprite(_sprite_name)
Echo Chamber Scripting Reference
Echo Chamber is the in-game debug UI builder. It is a set of constructors that output structs (Root, Window, Panel, Controls).
Important: you can use Echo Chamber without Echo, but they are designed to play nicely together.
Enums
eEchoChamberDock
FILLTOPBOTTOMLEFTRIGHT
eEchoChamberCollapse
NONETO_LEFTTO_RIGHTTO_TOPTO_BOTTOM
eEchoChamberPanelSizeMode
FIXEDFIT_CONTENT
eEchoChamberPanelFlow
ROWCOLUMN
eEchoChamberInputCheck
PRESSEDDOWNRELEASED
eEchoChamberInputBindKind
KEYFUNCBLOCK
Constructors
EchoChamberInputBinding()
Base binding type for input actions.
Returns: Struct.EchoChamberInputBinding
EchoChamberInputBindingKey(_key, _check, _ctrl, _alt, _shift)
Keyboard binding for an input action.
Arguments
_keyRealKeycode (vk_* or ord())._checkeEchoChamberInputCheckOptional, defaults toPRESSED._ctrlBoolOptional, require Ctrl held._altBoolOptional, require Alt held._shiftBoolOptional, require Shift held.
Returns: Struct.EchoChamberInputBinding
EchoChamberInputBindingFunc(_fn)
Function binding for an input action.
Arguments
_fnFunctionFunction that returns true when the action should fire (signature:function() -> Bool).
Returns: Struct.EchoChamberInputBinding
EchoChamberInputBindingBlock()
Binding that blocks an action from inheriting from its parent context.
Returns: Struct.EchoChamberInputBinding
EchoChamberInputContext(_id)
Input context for Echo Chamber actions, supports inheritance.
Arguments
_idString
Returns: Struct.EchoChamberInputContext
Public methods
-
SetParent(_parent_id): Set the parent context id for inheritance.- Arguments:
_parent_idStringParent context id (useundefinedto clear the parent).
- Returns:
Struct.EchoChamberInputContext - Additional details:
- If
_parent_idresolves to this context’s own id, the call is ignored.
- If
- Arguments:
-
GetBinding(_action_id): Get the binding for an action id.- Arguments:
_action_idStringAction id to look up.
- Returns:
Struct.EchoChamberInputBinding,Undefined - Additional details:
- This only returns the local binding (it does not walk parent contexts).
- Arguments:
-
BindAction(_action_id, _binding): Bind an action to a binding.- Arguments:
_action_idStringAction id to bind._bindingStruct.EchoChamberInputBindingBinding instance (built fromEchoChamberInputBinding*).
- Returns:
Struct.EchoChamberInputContext - Additional details:
- If
_bindingis not anEchoChamberInputBinding, the call is ignored.
- If
- Arguments:
-
BindKey(_action_id, _key, _check, _ctrl, _alt, _shift): Bind an action to a keyboard key.- Arguments:
_action_idStringAction id to bind._keyRealKeycode (vk_* or ord())._checkeEchoChamberInputCheckOptional check type (pressed/down/released)._ctrlBoolOptional, require Ctrl held._altBoolOptional, require Alt held._shiftBoolOptional, require Shift held.
- Returns:
Struct.EchoChamberInputContext - Additional details:
- Creates a key binding and forwards to
BindAction.
- Creates a key binding and forwards to
- Arguments:
-
BindFunc(_action_id, _fn): Bind an action to a function.- Arguments:
_action_idStringAction id to bind._fnFunctionFunction that returns true when the action should fire (signature:function() -> Bool).
- Returns:
Struct.EchoChamberInputContext - Additional details:
- The function is polled each frame while this context is active.
- Arguments:
-
BindBlock(_action_id): Bind an action to a blocker (prevents inheritance).- Arguments:
_action_idStringAction id to bind.
- Returns:
Struct.EchoChamberInputContext - Additional details:
- Blocks inheritance from the parent context for this action id.
- Arguments:
-
ClearAction(_action_id): Clear a local action binding so the parent can take over.- Arguments:
_action_idStringAction id to clear.
- Returns:
Struct.EchoChamberInputContext - Additional details:
- Clears only the local binding; parent bindings (if any) will be used again.
- Arguments:
EchoChamberRoot(_theme)
Root container for debug UI panels and controls.
Arguments
_themeStruct.EchoChamberTheme
Returns: Struct.EchoChamberRoot
If you plan to create and manage your own root, set
ECHO_CONSOLE_ENABLEDto 0 inscr_echo.gmlso Echo does not auto create a second root.
Public methods
-
ApplyTheme(_theme): Apply a new theme and reapply defaults across windows and panels.- Arguments:
_themeStruct.EchoChamberThemeTheme instance to apply.
- Returns:
Struct.EchoChamberRoot - Additional details:
- If
_themeis not anEchoChamberTheme, the call is ignored. - Reapplies theme defaults to all registered windows and panels.
- If
- Arguments:
-
BeginFrame(): Snapshot mouse and wheel for this frame.- Arguments: None.
- Returns: N/A
- Additional details:
- Resets per-frame state such as mouse/wheel consumption and overlay queue.
- This is automatically called by
RunDesktop(), so you do not need to manually call it unless you have a specific reason to do so.
-
GetDefaultInputContextId(): Return the default input context id.- Arguments: None.
- Returns:
String
-
BindCoreInputAction(_action_id, _binding): Bind a core Echo Chamber action in the default context.- Arguments:
_action_idStringAction id to bind._bindingStruct.EchoChamberInputBindingBinding instance.
- Returns:
Struct.EchoChamberRoot - Additional details:
- If the default context or binding is invalid, the call is ignored.
- Arguments:
-
GetInputContext(_id): Get an input context by id.- Arguments:
_idStringContext id to look up.
- Returns:
Struct.EchoChamberInputContext,Undefined
- Arguments:
-
CreateInputContext(_id, _parent_id): Create or return an input context by id.- Arguments:
_idStringContext id to create or fetch._parent_idStringOptional parent context id (defaults to the root default context when created).
- Returns:
Struct.EchoChamberInputContext,Undefined - Additional details:
- If a context already exists, it is returned and the parent is optionally updated.
- Arguments:
-
RemoveInputContext(_id): Remove an input context by id.- Arguments:
_idStringContext id to remove.
- Returns:
Bool - Additional details:
- Returns false if the context is the default or is currently in use by any window.
- Arguments:
-
InputPressed(_action_id, _window): Check whether an action is pressed in the active input context.- Arguments:
_action_idStringAction id to check._windowStruct.EchoChamberWindowOptional window whose input context should be used.
- Returns:
Bool - Additional details:
- If
_windowis omitted, the focused window context is used.
- If
- Arguments:
-
InputDown(_action_id, _window): Check whether an action is held in the active input context.- Arguments:
_action_idStringAction id to check._windowStruct.EchoChamberWindowOptional window whose input context should be used.
- Returns:
Bool - Additional details:
- If
_windowis omitted, the focused window context is used.
- If
- Arguments:
-
InputReleased(_action_id, _window): Check whether an action is released in the active input context.- Arguments:
_action_idStringAction id to check._windowStruct.EchoChamberWindowOptional window whose input context should be used.
- Returns:
Bool - Additional details:
- If
_windowis omitted, the focused window context is used.
- If
- Arguments:
-
AddPanel(_panel): Add a top-level panel to the root.- Arguments:
_panelStruct.EchoChamberPanelPanel instance to attach.
- Returns:
Struct.EchoChamberPanel,Undefined - Additional details:
- Assigns ownership to the root and its child panels/controls.
- Arguments:
-
CreateWindow(_id): Create and register a floating debug window.- Arguments:
_idAnyWindow id.
- Returns:
Struct.EchoChamberWindow - Additional details:
- Applies theme defaults and registers the window with this root.
- Arguments:
-
RegisterWindow(_window): Register an externally created window instance.- Arguments:
_windowStruct.EchoChamberWindowWindow instance to register.
- Returns:
Struct.EchoChamberWindow,Undefined - Additional details:
- Applies theme defaults, sets the window owner, and assigns ownership for all panels/controls.
- Arguments:
-
FindWindow(_id): Find a registered window by id.- Arguments:
_idAnyWindow id.
- Returns:
Struct.EchoChamberWindow,Undefined
- Arguments:
-
FindControl(_id): Find a control by id across all windows.- Arguments:
_idAnyControl id.
- Returns:
Struct.EchoChamberControlBase,Undefined
- Arguments:
-
DumpUI(): Dump the current UI tree and focus/overlay state to the debug log.- Arguments: None.
- Returns:
Struct.EchoChamberRoot - Additional details:
- Uses
EchoDebugInfoto output the structure.
- Uses
-
RemoveWindow(_window_or_id): Remove a registered window and detach its panels/controls.- Arguments:
_window_or_idStruct.EchoChamberWindow,AnyWindow instance or id.
- Returns:
Bool - Additional details:
- Clears focus, modal, overlays, and mouse capture if they reference the removed window.
- Arguments:
-
BringWindowToFront(_window_or_id): Bring a window (or id) to the front of the z-order.- Arguments:
_window_or_idStruct.EchoChamberWindow,AnyWindow instance or id.
- Returns: N/A
- Additional details:
- Updates keyboard focus to the brought window.
- Arguments:
-
BringWindowToFrontById(_id): Bring a window to the front by id.- Arguments:
_idAnyWindow id.
- Returns:
Struct.EchoChamberWindow,Undefined
- Arguments:
-
SendWindowToBack(_window_or_id): Send a window (or id) to the back of the z-order.- Arguments:
_window_or_idStruct.EchoChamberWindow,AnyWindow instance or id.
- Returns:
Bool - Additional details:
- Modal windows stay on top; sending a modal window to back just re-brings it to front.
- Arguments:
-
BringWindowsBack(): Bring all windows back into view so their title bars remain accessible.- Arguments: None.
- Returns:
Struct.EchoChamberRoot
-
SetWindowZIndex(_window_or_id, _index): Set a window z-order index (0 = back, last = front).- Arguments:
_window_or_idStruct.EchoChamberWindow,AnyWindow instance or id._indexRealTarget z-order index.
- Returns:
Bool - Additional details:
- Modal windows are forced to the front index.
- Arguments:
-
SetModalWindow(_window_or_id): Set the modal window (blocks input to other windows).- Arguments:
_window_or_idStruct.EchoChamberWindow,AnyWindow instance or id, orundefinedto clear.
- Returns:
Bool - Additional details:
- Clears overlays, context menus, and focus that are owned by other windows.
- Arguments:
-
ClearModalWindow(): Clear the current modal window.- Arguments: None.
- Returns:
Bool
-
GetModalWindow(): Get the current modal window (if any).- Arguments: None.
- Returns:
Struct.EchoChamberWindow,Undefined
-
SetPersistenceFile(_filename): Set the INI filename used for saving and loading UI layout state.- Arguments:
_filenameStringINI filename (relative or absolute path).
- Returns:
Struct.EchoChamberRoot
- Arguments:
-
SetPersistenceSection(_section): Set the INI section prefix used for saving and loading UI layout state.- Arguments:
_sectionStringINI section prefix.
- Returns:
Struct.EchoChamberRoot
- Arguments:
-
SaveLayout(): Save window layout, z-order, and panel state to an INI file.- Arguments: None.
- Returns:
Bool - Additional details:
- Returns false if the persistence file name is empty.
-
LoadLayout(): Load window layout, z-order, and panel state from an INI file.- Arguments: None.
- Returns:
Bool - Additional details:
- Windows and panels must already be created/registered before calling this.
- Returns false if the file does not exist.
-
SetMouseCapture(_window): Capture the mouse for a window interaction (drag/resize).- Arguments:
_windowStruct.EchoChamberWindowWindow to own mouse capture.
- Returns: N/A
- Additional details:
- Only used internally for drag/resize; you usually don’t call this directly.
- Arguments:
-
ClearMouseCapture(_window): Release mouse capture if owned by the given window.- Arguments:
_windowStruct.EchoChamberWindowWindow attempting to release capture.
- Returns: N/A
- Additional details:
- Capture is only cleared if
_windowcurrently owns it.
- Capture is only cleared if
- Arguments:
-
RunDesktop(): Run the managed desktop: capture input, process the active window, draw all windows, then draw overlays and tooltip.- Arguments: None.
- Returns: N/A
- Additional details:
- Call this once per Draw GUI frame to run Echo Chamber.
-
ConsumeMouse(): Consume mouse input for all remaining controls this frame.- Arguments: None.
- Returns: N/A
-
ConsumeWheel(): Consume mouse wheel for all remaining scroll regions.- Arguments: None.
- Returns: N/A
-
DrawScrollArea(_scroll_state, _rect, _content_h, _draw_fn): Draw a scrollable clipped region and handle mouse wheel scrolling when hovered.- Arguments:
_scroll_stateStruct.EchoChamberScrollStateScroll state that stores the current scroll offset._rectStruct{x1,y1,x2,y2}Visible clip rect in GUI space._content_hRealTotal content height in pixels._draw_fnFunctionDraw callback (signature:function(_root, _rect, _scroll_y)).
- Returns: N/A
- Additional details:
- The draw callback should offset its content by
_scroll_y(positive values scroll down). - The scissor clip is already applied to
_rectwhen_draw_fnruns.
- The draw callback should offset its content by
- Arguments:
-
PushClipRect(_x1, _y1, _x2, _y2): Push a clip rectangle.- Arguments:
_x1RealLeft bound (GUI space)._y1RealTop bound (GUI space)._x2RealRight bound (GUI space)._y2RealBottom bound (GUI space).
- Returns: N/A
- Additional details:
- Any existing clip is intersected with the new rect.
- Arguments:
-
PopClipRect(): Pop the most recently pushed clip rectangle.- Arguments: None.
- Returns: N/A
-
HitTestRect(_x1, _y1, _x2, _y2): Simple hit test for a rect.- Arguments:
_x1RealLeft bound (GUI space)._y1RealTop bound (GUI space)._x2RealRight bound (GUI space)._y2RealBottom bound (GUI space).
- Returns:
Bool - Additional details:
- Respects
mouse_consumedand the current clip region.
- Respects
- Arguments:
-
RequestTooltip(_control_id, _text, _anchor_x, _anchor_y): Request a tooltip for a given control id.- Arguments:
_control_idStringControl id requesting the tooltip._textStringTooltip text._anchor_xRealTooltip anchor X (GUI space)._anchor_yRealTooltip anchor Y (GUI space).
- Returns: N/A
- Additional details:
- If a modal overlay is active, only its owner may request a tooltip.
- Arguments:
-
SetActiveOverlayOwner(_control_id): Mark a control as owning a modal overlay (e.g. a dropdown).- Arguments:
_control_idString,UndefinedControl id to own the overlay (useundefinedto clear).
- Returns: N/A
- Additional details:
- Overlay ownership is tied to the current window context.
- Arguments:
-
ClearActiveOverlayOwner(): Clear the active overlay (if any).- Arguments: None.
- Returns: N/A
-
RequestCloseOverlay(): Request the currently active overlay (if any) to close.- Arguments: None.
- Returns: N/A
- Additional details:
- Overlay owners should honor this during
ProcessAndDraw.
- Overlay owners should honor this during
-
QueueOverlay(_owner_id, _draw_fn, _rect, _owner_window): Queue an overlay draw callback. Overlays are drawn after all windows.- Arguments:
_owner_idAnyControl id that owns the overlay (used for overlay focus tracking)._draw_fnFunctionDraw callback (signature:function(_root))._rectStructOptional{x1,y1,x2,y2}overlay rect used for clipping and hit testing._owner_windowStruct.EchoChamberWindowOptional owner window used for theme overrides.
- Returns: N/A
- Arguments:
-
OpenContextMenu(_items, _x, _y, _owner_window): Open a context menu overlay at a screen position.- Arguments:
_itemsArrayArray of item structs:{ label, on_click, enabled, shortcut }or{ is_separator:true }._xRealScreen X position (GUI space)._yRealScreen Y position (GUI space)._owner_windowStruct.EchoChamberWindowOptional owner window for theme overrides.
- Returns: N/A
- Additional details:
on_clickis a callback with signaturefunction().
- Arguments:
-
CloseContextMenu(): Close the active context menu overlay (if open).- Arguments: None.
- Returns: N/A
-
IsContextMenuOpen(): Returns true if the context menu overlay is open.- Arguments: None.
- Returns:
Bool
-
DrawOverlays(): Draw all queued overlays once per frame.- Arguments: None.
- Returns: N/A
- Additional details:
- Overlays are drawn after all windows and are clipped to their queued rects.
-
LayoutPanels(_x1, _y1, _x2, _y2): Dock + collapse layout. Assigns rects to all top-level panels.- Arguments:
_x1RealLeft bound (GUI space)._y1RealTop bound (GUI space)._x2RealRight bound (GUI space)._y2RealBottom bound (GUI space).
- Returns: N/A
- Arguments:
-
DrawTooltip(): Draw simple tooltip for the current tooltip_control_id (if delay elapsed).- Arguments: None.
- Returns: N/A
-
ShowToast(_text, _duration_ms): Show a short toast message (non-blocking).- Arguments:
_textAnyToast text (converted to string)._duration_msRealOptional duration in milliseconds.
- Returns: N/A
- Additional details:
- Toasts appear in the bottom right of the game window.
- Arguments:
-
CopyToClipboard(_text, _toast_text, _duration_ms): Copy text to clipboard and show a toast confirmation.- Arguments:
_textAnyText to copy._toast_textAnyOptional toast text (defaults to a preview of_text)._duration_msRealOptional toast duration in milliseconds.
- Returns: N/A
- Arguments:
-
DrawToast(): Draw active toast notifications for this frame.- Arguments: None.
- Returns: N/A
-
DrawPanelBackground(_panel): Convenience: draw a basic panel background.- Arguments:
_panelStruct.EchoChamberPanelPanel to draw.
- Returns: N/A
- Arguments:
-
DrawPanelCollapseHandle(_panel): Draw a collapse handle for a panel (if it supports collapsing).- Arguments:
_panelStruct.EchoChamberPanelPanel to draw.
- Returns: N/A
- Arguments:
-
SetTextInputSource(_fn): Set a function that returns the current active text input string. If not set, keyboard_string is used.- Arguments:
_fnFunctionText source callback (signature:function() -> String).
- Returns: N/A
- Additional details:
- When a source function is set, the active text input is treated as read-only and pulls its value from this function each frame.
- Arguments:
-
SetTextInputSeed(_fn): Set a function that seeds the active text input string when focusing. If not set, keyboard_string is used.- Arguments:
_fnFunctionSeed callback (signature:function(_text)), where_textis the initial seed value.
- Returns: N/A
- Additional details:
- Use this to sync the initial focus value into your own input storage when a text input gains focus.
- Arguments:
-
FocusTextInput(_id, _initial_text, _placeholder, _commit_fn, _config): Focus a text input by id and seed its initial content.- Arguments:
_idAnyText input id to focus._initial_textStringInitial text value._placeholderStringPlaceholder text shown when empty._commit_fnFunctionOptional commit callback (signature:function(_final_text))._configStructOptional config struct for read-only, filters, and caret styling.
- Returns: N/A
- Additional details:
_commit_fnruns on blur after the final string is synced from the text source (if any).
- Arguments:
-
BlurTextInput(_id): Blur a focused text input by id.- Arguments:
_idAnyText input id to blur.
- Returns:
String - Additional details:
- Returns
""if the id is not currently focused. - Commits the final value (after syncing from the text source) before returning.
- Returns
- Arguments:
-
IsActiveTextInput(_id): Returns true if the given id is the currently focused text input.- Arguments:
_idAnyText input id to check.
- Returns:
Bool
- Arguments:
-
GetActiveText(): Return the current active text string while a text input is focused.- Arguments: None.
- Returns:
String - Additional details:
- If a text source is set, this returns the source value.
-
GetTextBuffer(): Return the last committed text buffer for the active text input.- Arguments: None.
- Returns:
String
-
FocusControl(_id, _rect): Give keyboard focus to a non-text control by id.- Arguments:
_idAnyControl id to focus._rectStruct{x1,y1,x2,y2}control rect in GUI space.
- Returns: N/A
- Additional details:
- This focus is separate from text input focus.
- Arguments:
-
IsControlFocused(_id): Returns true if the given control id currently owns keyboard focus (and no text input is active).- Arguments:
_idAnyControl id to check.
- Returns:
Bool - Additional details:
- Returns false when an overlay is active and owned by another control.
- Arguments:
-
BlurControlFocus(_id): Blur (clear) keyboard focus from a control by id.- Arguments:
_idAnyOptional id to validate before clearing (if provided, it must match the focused id).
- Returns:
Bool
- Arguments:
-
RegisterFocusable(_id, _rect): Register a focusable control for Tab navigation.- Arguments:
_idAnyControl id._rectStruct{x1,y1,x2,y2}control rect in GUI space.
- Returns: N/A
- Arguments:
EchoChamberWindow(_id)
Floating debug window that owns a collection of docked panels.
Arguments
_idAny
Returns: Struct.EchoChamberWindow
Public methods
-
SetTitle(_title): Set the window title text.- Arguments:
_titleAnyTitle text (converted to string).
- Returns:
Struct.EchoChamberWindow
- Arguments:
-
SetInputContext(_context_id, _parent_id): Set the input context id used for this window.- Arguments:
_context_idStringContext id (useundefinedto clear)._parent_idStringOptional parent context id.
- Returns:
Struct.EchoChamberWindow - Additional details:
- When a root is assigned, the context is created if missing.
- Arguments:
-
SwapInputContext(_context_id, _parent_id): Swap the input context and remove the old one if unused.- Arguments:
_context_idStringNew context id._parent_idStringOptional parent context id.
- Returns:
Struct.EchoChamberWindow - Additional details:
- Attempts to remove the previous context if it is unused by any window.
- Arguments:
-
SetWindowStyleKey(_key): Set the window style key (for theme.window_styles).- Arguments:
_keyStringStyle key.
- Returns:
Struct.EchoChamberWindow
- Arguments:
-
SetHeaderStyleKey(_key): Set the header style key (for theme.header_styles).- Arguments:
_keyStringStyle key.
- Returns:
Struct.EchoChamberWindow
- Arguments:
-
SetChromeButtonStyleKey(_key): Set the chrome button style key (for theme.button_styles).- Arguments:
_keyStringStyle key.
- Returns:
Struct.EchoChamberWindow
- Arguments:
-
ApplyTheme(_theme): Apply a theme override to this window and its children.- Arguments:
_themeStruct.EchoChamberThemeTheme override (useundefinedto clear).
- Returns:
Struct.EchoChamberWindow - Additional details:
- Overrides only this window and its panels/controls.
- Arguments:
-
ClearThemeOverride(): Clear the window theme override (reverts to the root theme).- Arguments: None.
- Returns:
Struct.EchoChamberWindow
-
SetPadding(_value): Set the content padding for this window.- Arguments:
_valueRealPadding in pixels.
- Returns:
Struct.EchoChamberWindow
- Arguments:
-
SetMargin(_x, [_y]): Set the outer margin for this window in GUI-space.- Arguments:
_xRealHorizontal margin._yRealOptional vertical margin (defaults to_x).
- Returns:
Struct.EchoChamberWindow
- Arguments:
-
SetTitlebarHeight(_value): Set the titlebar height for this window.- Arguments:
_valueRealTitlebar height in pixels.
- Returns:
Struct.EchoChamberWindow - Additional details:
- Disables theme-driven titlebar sizing until
SetTitlebarAuto(true)is used.
- Disables theme-driven titlebar sizing until
- Arguments:
-
SetTitlebarAuto(_flag): Set whether the titlebar height is driven by the current theme.- Arguments:
_flagBoolEnable or disable auto sizing.
- Returns:
Struct.EchoChamberWindow
- Arguments:
-
SetResizeGripSize(_value): Set the resize grip size for this window.- Arguments:
_valueRealGrip size in pixels.
- Returns:
Struct.EchoChamberWindow
- Arguments:
-
SetVisible(_flag): Show or hide this window.- Arguments:
_flagBoolVisible flag.
- Returns:
Struct.EchoChamberWindow - Additional details:
- Hiding clears modal/capture/overlay ownership tied to this window.
- Arguments:
-
SetShowChromeButtons(_show_close, _show_minimize, _show_pin): Configure which chrome buttons are shown in the window header.- Arguments:
_show_closeBoolShow or hide the close button._show_minimizeBoolShow or hide the minimize button._show_pinBoolShow or hide the pin button.
- Returns:
Struct.EchoChamberWindow
- Arguments:
-
OnClose(_fn): Set a callback that runs when the window is closed via the close button.- Arguments:
_fnFunctionCallback (signature:function()).
- Returns:
Struct.EchoChamberWindow - Additional details:
- Also fired when
Close()is called.
- Also fired when
- Arguments:
-
OnMove(_fn): Set a callback that runs when the window moves.- Arguments:
_fnFunctionCallback (signature:function()).
- Returns:
Struct.EchoChamberWindow - Additional details:
- Fired after the window rect changes position.
- Arguments:
-
OnResize(_fn): Set a callback that runs when the window resizes.- Arguments:
_fnFunctionCallback (signature:function()).
- Returns:
Struct.EchoChamberWindow - Additional details:
- Fired after the window rect changes size.
- Arguments:
-
OnShow(_fn): Set a callback that runs when the window becomes visible.- Arguments:
_fnFunctionCallback (signature:function()).
- Returns:
Struct.EchoChamberWindow
- Arguments:
-
OnHide(_fn): Set a callback that runs when the window is hidden.- Arguments:
_fnFunctionCallback (signature:function()).
- Returns:
Struct.EchoChamberWindow
- Arguments:
-
OnFocus(_fn): Set a callback that runs when the window gains focus.- Arguments:
_fnFunctionCallback (signature:function()).
- Returns:
Struct.EchoChamberWindow
- Arguments:
-
OnBlur(_fn): Set a callback that runs when the window loses focus.- Arguments:
_fnFunctionCallback (signature:function()).
- Returns:
Struct.EchoChamberWindow
- Arguments:
-
OnMinimize(_fn): Set a callback that runs when the window is minimized.- Arguments:
_fnFunctionCallback (signature:function()).
- Returns:
Struct.EchoChamberWindow
- Arguments:
-
OnRestore(_fn): Set a callback that runs when the window is restored.- Arguments:
_fnFunctionCallback (signature:function()).
- Returns:
Struct.EchoChamberWindow
- Arguments:
-
Close(): Close the window (sets visible to false) and firesOnClose.- Arguments: None.
- Returns: N/A
- Additional details:
- Calls
SetVisible(false)first, then runs the close callback if assigned.
- Calls
-
SetPinned(_flag): Set whether the window is pinned (disables dragging and resizing).- Arguments:
_flagBoolTrue to pin, false to unpin.
- Returns:
Struct.EchoChamberWindow - Additional details:
- Cancels any active drag/resize and clears mouse capture.
- Arguments:
-
TogglePinned(): Toggle pinned state.- Arguments: None.
- Returns:
Struct.EchoChamberWindow
-
SetMinimized(_flag): Set whether the window is minimized (collapses content; only the title bar remains).- Arguments:
_flagBoolTrue to minimize, false to restore.
- Returns:
Struct.EchoChamberWindow - Additional details:
- Restores to the previous height (clamped by min/max).
- Clears any active overlay owned by this window.
- Fires
OnMinimizeorOnRestoreas appropriate.
- Arguments:
-
ToggleMinimized(): Toggle minimized state.- Arguments: None.
- Returns:
Struct.EchoChamberWindow
-
SetRect(_x1, _y1, _x2, _y2): Set the window rectangle in GUI-space.- Arguments:
_x1RealLeft edge._y1RealTop edge._x2RealRight edge._y2RealBottom edge.
- Returns:
Struct.EchoChamberWindow - Additional details:
- Size is clamped to min/max.
- Marks the rect as user-set and clears any pending fit-to-content on add.
- Arguments:
-
SetPosition(_x, _y): Set the window position in GUI-space (size is unchanged).- Arguments:
_xRealNew left edge._yRealNew top edge.
- Returns:
Struct.EchoChamberWindow
- Arguments:
-
GetWidth(): Get the current window width (in GUI-space).- Arguments: None.
- Returns:
Real
-
GetHeight(): Get the current window height (in GUI-space).- Arguments: None.
- Returns:
Real
-
SetMinSize(_w, _h): Set minimum width and height for this window.- Arguments:
_wRealMinimum width (clamped to at least 64)._hRealMinimum height (clamped to at least 64).
- Returns:
Struct.EchoChamberWindow - Additional details:
- If the current max size is smaller, it is raised to match.
- Arguments:
-
SetMaxSize(_w, _h): Set maximum width and height for this window (0 means no max).- Arguments:
_wRealMaximum width (0 disables max width)._hRealMaximum height (0 disables max height).
- Returns:
Struct.EchoChamberWindow - Additional details:
- If the max size is smaller than the minimum, it is clamped up to the minimum.
- Arguments:
-
FitToContent([_root]): Resize the window once to fit current content.- Arguments:
_rootStruct.EchoChamberRootOptional root to use for measurement (defaults to owner root).
- Returns:
Struct.EchoChamberWindow - Additional details:
- If no panels exist yet, the fit is deferred until the next panel is added.
- The result is clamped to any min/max size settings.
- Arguments:
-
SetAutoFit(_flag): Enable or disable auto-fit after layout changes.- Arguments:
_flagBoolTrue to auto-fit on future layout changes.
- Returns:
Struct.EchoChamberWindow - Additional details:
- If a layout batch is active, the fit is deferred until
EndLayoutBatch.
- If a layout batch is active, the fit is deferred until
- Arguments:
-
AddPanel(_panel): Add a top-level panel to this window.- Arguments:
_panelStruct.EchoChamberPanelPanel to add.
- Returns:
Struct.EchoChamberPanel,Undefined - Additional details:
- Assigns ownership pointers on the panel and its children.
- Triggers fit-to-content or auto-fit depending on window settings.
- Arguments:
-
RemovePanel(_panel_or_id): Remove a panel from this window (top-level or nested).- Arguments:
_panel_or_idStruct.EchoChamberPanel,AnyPanel struct or panel id.
- Returns:
Bool - Additional details:
- Detaches ownership pointers for the removed panel tree.
- Triggers auto-fit when enabled.
- Arguments:
-
ClearPanels(): Remove all panels from this window.- Arguments: None.
- Returns: N/A
- Additional details:
- Detaches all panel trees and triggers auto-fit when enabled.
-
FindPanel(_id): Find a panel in this window by id (searches nested container panels too).- Arguments:
_idAnyPanel id (converted to string).
- Returns:
Struct.EchoChamberPanel,Undefined
- Arguments:
-
FindControl(_id): Find a control in this window by id (searches nested panels too).- Arguments:
_idAnyControl id (converted to string).
- Returns:
Struct.EchoChamberControlBase,Undefined
- Arguments:
-
MoveControlToPanel(_control_or_id, _panel_or_id, [_index]): Move a control to another panel in this window.- Arguments:
_control_or_idStruct.EchoChamberControlBase,AnyControl or control id._panel_or_idStruct.EchoChamberPanel,AnyTarget panel or panel id._indexRealOptional target index (clamped).
- Returns:
Bool
- Arguments:
-
ContainsPoint(_x, _y): Return true if a point is inside this window’s current rectangle.- Arguments:
_xRealX position in GUI space._yRealY position in GUI space.
- Returns:
Bool - Additional details:
- Returns false when the window is not visible.
- Arguments:
-
BeginLayoutBatch(): Begin a layout batch (defers FitToContent until EndLayoutBatch).- Arguments: None.
- Returns:
Struct.EchoChamberWindow
-
EndLayoutBatch(): End a layout batch and apply any deferred FitToContent.- Arguments: None.
- Returns:
Struct.EchoChamberWindow - Additional details:
- Only triggers when the batch depth returns to zero.
-
LayoutPanels(_root): Layout this window’s panels into the current content rect.- Arguments:
_rootStruct.EchoChamberRootRoot for layout metrics.
- Returns: N/A
- Arguments:
-
ProcessWindowInteractions(_root): Handle mouse interactions for dragging/resizing and chrome button clicks.- Arguments:
_rootStruct.EchoChamberRootRoot for input state and focus.
- Returns: N/A
- Additional details:
- Does nothing if the window is not visible.
- Arguments:
-
Draw(_root): Draw the window chrome and all owned panels.- Arguments:
_rootStruct.EchoChamberRootRoot for theme and drawing helpers.
- Returns: N/A
- Arguments:
EchoChamberPanel(_id, _dock)
Layout panel docked to an edge or fill.
Arguments
_idAny_dockeEchoChamberDock
Returns: Struct.EchoChamberPanel
Public methods
-
AddControl(_control): Add a control to this panel.- Arguments:
_controlStruct.EchoChamberControlBaseControl to add.
- Returns:
Struct.EchoChamberControlBase,Undefined - Additional details:
- Assigns ownership pointers to the control.
- Triggers fit-to-content or auto-fit depending on window settings.
- Arguments:
-
InsertControl(_control, _index): Insert a control at a specific index (clamped).- Arguments:
_controlStruct.EchoChamberControlBaseControl to insert._indexRealTarget index (clamped).
- Returns:
Struct.EchoChamberControlBase,Undefined - Additional details:
- If the control already belongs to another panel, it is removed first.
- Arguments:
-
MoveControl(_control_or_id, _index): Reorder a direct control to a specific index (clamped).- Arguments:
_control_or_idStruct.EchoChamberControlBase,AnyControl or control id._indexRealTarget index (clamped).
- Returns:
Bool - Additional details:
- Only reorders direct children of this panel.
- Arguments:
-
MoveControlToPanel(_control_or_id, _target_panel, [_index]): Move a control to another panel.- Arguments:
_control_or_idStruct.EchoChamberControlBase,AnyControl or control id._target_panelStruct.EchoChamberPanelTarget panel._indexRealOptional target index (clamped).
- Returns:
Bool
- Arguments:
-
SetControlOrder(_ids): Reorder direct controls using a list of ids.- Arguments:
_idsArray<Any>Control ids in desired order.
- Returns:
Struct.EchoChamberPanel - Additional details:
- Any ids not listed keep their relative order at the end.
- Arguments:
-
RemoveControl(_control_or_id): Remove a control from this panel (direct or nested).- Arguments:
_control_or_idStruct.EchoChamberControlBase,AnyControl or control id.
- Returns:
Bool - Additional details:
- If attached to a root, control focus/hover state is cleaned up.
- Arguments:
-
ClearControls(): Remove all direct controls from this panel.- Arguments: None.
- Returns:
Struct.EchoChamberPanel - Additional details:
- Only direct controls are removed; nested panels are untouched.
-
AddChildPanel(_panel): Add a child panel (for container usage).- Arguments:
_panelStruct.EchoChamberPanelChild panel to add.
- Returns:
Struct.EchoChamberPanel,Undefined - Additional details:
- Marks this panel as a container and assigns ownership pointers.
- Arguments:
-
RemoveChildPanel(_panel_or_id): Remove a child panel from this panel (direct or nested).- Arguments:
_panel_or_idStruct.EchoChamberPanel,AnyPanel or panel id.
- Returns:
Bool
- Arguments:
-
ClearChildPanels(): Remove all child panels from this panel.- Arguments: None.
- Returns:
Struct.EchoChamberPanel - Additional details:
- Clears container state and triggers auto-fit when enabled.
-
FindControl(_id): Find a direct or nested control within this panel by id.- Arguments:
_idAnyControl id (converted to string).
- Returns:
Struct.EchoChamberControlBase,Undefined
- Arguments:
-
SetSizeMode(_mode): Configure how this panel resolves its dock size.- Arguments:
_modeeEchoChamberPanelSizeModeFixed or fit-to-content.
- Returns:
Struct.EchoChamberPanel
- Arguments:
-
SetSize(_value): Set dock thickness when using fixed sizing.- Arguments:
_valueRealDock thickness in pixels.
- Returns:
Struct.EchoChamberPanel - Additional details:
- Raises max size if it is below the fixed size.
- Arguments:
-
SetFlowMode(_flow_mode): Set how child controls flow within the panel.- Arguments:
_flow_modeeEchoChamberPanelFlowRow or column layout.
- Returns:
Struct.EchoChamberPanel
- Arguments:
-
SetScrollable(_flag): Enable or disable vertical scrolling for this panel.- Arguments:
_flagBoolScrollable flag.
- Returns:
Struct.EchoChamberPanel - Additional details:
- When enabling, a scroll state is created if missing.
- Arguments:
-
SetScrollState(_state): Assign a scroll state for this panel (used when scrollable).- Arguments:
_stateStruct.EchoChamberScrollStateScroll state to use.
- Returns:
Struct.EchoChamberPanel
- Arguments:
-
SetPadding(_value): Set panel content padding.- Arguments:
_valueRealPadding in pixels.
- Returns:
Struct.EchoChamberPanel
- Arguments:
-
SetMargin(_x, [_y]): Set panel outer margin in GUI-space.- Arguments:
_xRealHorizontal margin._yRealOptional vertical margin (defaults to_x).
- Returns:
Struct.EchoChamberPanel
- Arguments:
-
SetGap(_value): Set panel control gap spacing.- Arguments:
_valueRealGap in pixels.
- Returns:
Struct.EchoChamberPanel
- Arguments:
-
SetRowHeight(_value): Set panel row height for controls.- Arguments:
_valueRealRow height in pixels.
- Returns:
Struct.EchoChamberPanel
- Arguments:
-
SetCollapsedSize(_value): Set collapsed dock thickness for this panel.- Arguments:
_valueRealCollapsed thickness in pixels.
- Returns:
Struct.EchoChamberPanel
- Arguments:
-
SetCollapseMode(_mode): Set the panel collapse mode.- Arguments:
_modeeEchoChamberCollapseCollapse direction (orNONE).
- Returns:
Struct.EchoChamberPanel
- Arguments:
-
SetCollapsed(_value): Set whether this panel is collapsed.- Arguments:
_valueBoolCollapsed flag.
- Returns:
Struct.EchoChamberPanel
- Arguments:
-
SetPanelStyleKey(_key): Set the panel style key (for theme.panel_styles).- Arguments:
_keyStringStyle key.
- Returns:
Struct.EchoChamberPanel
- Arguments:
-
SetMinSize(_value): Set minimum dock thickness when using fit-to-content.- Arguments:
_valueRealMinimum thickness in pixels.
- Returns:
Struct.EchoChamberPanel - Additional details:
- Raises max size if it is below the minimum.
- Arguments:
-
SetMaxSize(_value): Set maximum dock thickness when using fit-to-content.- Arguments:
_valueRealMaximum thickness in pixels.
- Returns:
Struct.EchoChamberPanel
- Arguments:
-
SetContentDrawer(_fn): Assign a custom content drawer for this panel.- Arguments:
_fnFunctionDraw callback (signature:function(_root, _rect)), where_rectis the panel content rect.
- Returns:
Struct.EchoChamberPanel - Additional details:
- The callback runs after controls/child panels are drawn.
- Arguments:
-
GetThickness(): Get panel thickness based on collapsed state.- Arguments: None.
- Returns:
Real - Additional details:
- Returns
collapsed_sizewhen collapsed and a collapse mode is active.
- Returns
-
ResolveThickness(_root, _avail_width, _avail_height): Resolve actual thickness for layout considering size mode.- Arguments:
_rootStruct.EchoChamberRootRoot for theme metrics._avail_widthRealAvailable width._avail_heightRealAvailable height.
- Returns:
Real - Additional details:
- Includes margins and collapse handle sizing.
- Uses fit-to-content sizing when size mode is
FIT_CONTENT.
- Arguments:
-
Draw(_root): Draw this panel and its contents (controls or child panels).- Arguments:
_rootStruct.EchoChamberRootRoot for theme and drawing helpers.
- Returns: N/A
- Arguments:
EchoChamberScrollState(_id)
Persistent scroll state for a scrollable region.
Arguments
_idAny
Returns: Struct.EchoChamberScrollState
Public methods
-
SetScrollY(_y): Set the scroll offset in pixels.- Arguments:
_yRealScroll offset in pixels.
- Returns:
Struct.EchoChamberScrollState
- Arguments:
-
ScrollBy(_dy): Scroll by a delta in pixels (positive scrolls down).- Arguments:
_dyRealDelta in pixels.
- Returns:
Struct.EchoChamberScrollState
- Arguments:
-
Reset(): Reset scroll to the top.- Arguments: None.
- Returns:
Struct.EchoChamberScrollState
EchoChamberControlBase(_id)
Base type for all debug UI controls.
Arguments
_idAny
Returns: Struct.EchoChamberControlBase
Public methods
-
GetRoot(): Get the owning root for this control (if attached).- Arguments: None.
- Returns:
Struct.EchoChamberRoot,Undefined
-
GetWindow(): Get the owning window for this control (if attached).- Arguments: None.
- Returns:
Struct.EchoChamberWindow,Undefined
-
GetPanel(): Get the owning panel for this control (if attached).- Arguments: None.
- Returns:
Struct.EchoChamberPanel,Undefined
-
SetPreferredWidth(_width): Set a preferred pixel width for this control when arranged in a row panel.- Arguments:
_widthRealPreferred width in pixels.
- Returns:
Struct.EchoChamberControlBase
- Arguments:
-
SetPreferredHeight(_height): Set a preferred pixel height for this control.- Arguments:
_heightRealPreferred height in pixels.
- Returns:
Struct.EchoChamberControlBase
- Arguments:
-
SetFillWidth(_flag): Set whether this control fills the available row width.- Arguments:
_flagBoolFill width flag.
- Returns:
Struct.EchoChamberControlBase
- Arguments:
-
SetPadding(_x, [_y]): Set inner padding for this control.- Arguments:
_xRealHorizontal padding in pixels._yRealOptional vertical padding (defaults to_x).
- Returns:
Struct.EchoChamberControlBase
- Arguments:
-
SetMargin(_x, [_y]): Set outer margin for this control.- Arguments:
_xRealHorizontal margin in pixels._yRealOptional vertical margin (defaults to_x).
- Returns:
Struct.EchoChamberControlBase
- Arguments:
-
SetLabel(_text): Set the control’s display label (used by controls that render a label).- Arguments:
_textAnyLabel text (converted to string).
- Returns:
Struct.EchoChamberControlBase
- Arguments:
-
SetTooltip(_text): Set the control tooltip (shown on hover where supported).- Arguments:
_textAnyTooltip text (converted to string).
- Returns:
Struct.EchoChamberControlBase
- Arguments:
-
SetControlStyleKey(_style): Set the theme style key for this control (e.g. button/toggle/dropdown styles).- Arguments:
_styleAnyStyle key (converted to string).
- Returns:
Struct.EchoChamberControlBase
- Arguments:
-
SetVisible(_flag): Show or hide this control.- Arguments:
_flagBoolVisible flag.
- Returns:
Struct.EchoChamberControlBase
- Arguments:
-
SetEnabled(_flag): Enable or disable this control (disabled controls should not accept input).- Arguments:
_flagBoolEnabled flag.
- Returns:
Struct.EchoChamberControlBase
- Arguments:
-
ProcessAndDraw(_root, _panel, _rect): Override: process input and draw using the given rect.- Arguments:
_rootStruct.EchoChamberRootRoot for input and theme._panelStruct.EchoChamberPanelOwning panel._rectStruct{x1,y1,x2,y2}draw rect in GUI space.
- Returns: N/A
- Arguments:
EchoChamberLabel(_id)
Non-interactive text label.
Arguments
_idAny
Returns: Struct.EchoChamberLabel
Public methods
-
SetText(_text): Set the label text.- Arguments:
_textAnyText to display (converted to string).
- Returns:
Struct.EchoChamberLabel
- Arguments:
-
BindText(_source, [_key_or_fn]): Bind the label text to a struct field or getter function.- Arguments:
_sourceStruct,FunctionStruct to read from, or a getter function (signature:function() -> Any)._key_or_fnStringOptional struct field key when_sourceis a struct.
- Returns:
Struct.EchoChamberLabel - Additional details:
- If
_sourceis callable, it becomes the getter,_key_or_fnis ignored, and any struct binding is cleared. - If
_sourceis a struct,_key_or_fnis the field key and any function binding is cleared. - If the getter returns
undefined, the label keeps its previous text.
- If
- Arguments:
-
SetAlign(_align): Set text alignment (“left”, “center”, “right”).- Arguments:
_alignStringAlignment string.
- Returns:
Struct.EchoChamberLabel
- Arguments:
-
UseSmallFont(_flag): Use the smaller theme font.- Arguments:
_flagBoolTrue to usefont_small, false to usefont_body.
- Returns:
Struct.EchoChamberLabel
- Arguments:
EchoChamberTextBox(_id)
Non-interactive text box that wraps text to its width.
Arguments
_idAny
Returns: Struct.EchoChamberTextBox
Public methods
-
SetText(_text): Set the text content for this box.- Arguments:
_textAnyText to display (converted to string).
- Returns:
Struct.EchoChamberTextBox
- Arguments:
-
BindText(_source, [_key_or_fn]): Bind the text content to a struct field or getter function.- Arguments:
_sourceStruct,FunctionStruct to read from, or a getter function (signature:function() -> Any)._key_or_fnStringOptional struct field key when_sourceis a struct.
- Returns:
Struct.EchoChamberTextBox - Additional details:
- If
_sourceis callable, it becomes the getter,_key_or_fnis ignored, and any struct binding is cleared. - If
_sourceis a struct,_key_or_fnis the field key and any function binding is cleared. - If the getter returns
undefined, the text box keeps its previous text.
- If
- Arguments:
-
SetAlign(_align): Set text alignment (“left”, “center”, “right”).- Arguments:
_alignStringAlignment string.
- Returns:
Struct.EchoChamberTextBox
- Arguments:
-
UseSmallFont(_flag): Use the smaller theme font.- Arguments:
_flagBoolTrue to usefont_small, false to usefont_body.
- Returns:
Struct.EchoChamberTextBox
- Arguments:
-
SetPadding(_x, [_y]): Set inner padding for the text box.- Arguments:
_xRealHorizontal padding in pixels._yRealOptional vertical padding (defaults to_x).
- Returns:
Struct.EchoChamberTextBox
- Arguments:
-
SetFillWidth(_flag): Set whether this box fills the available row width.- Arguments:
_flagBoolFill width flag.
- Returns:
Struct.EchoChamberTextBox
- Arguments:
EchoChamberButton(_id)
Clickable button.
Arguments
_idAny
Returns: Struct.EchoChamberButton
Public methods
-
OnClick(_fn): Set a callback to run when the button is activated.- Arguments:
_fnFunctionCallback (signature:function()).
- Returns:
Struct.EchoChamberButton - Additional details:
- Triggered by mouse click or Enter while the button is focused.
- Arguments:
-
BindLabel(_source, [_key_or_fn]): Bind the button label to a struct field or getter function.- Arguments:
_sourceStruct,FunctionStruct to read from, or a getter function (signature:function() -> Any)._key_or_fnStringOptional struct field key when_sourceis a struct.
- Returns:
Struct.EchoChamberButton - Additional details:
- If
_sourceis callable, it becomes the getter,_key_or_fnis ignored, and any struct binding is cleared. - If
_sourceis a struct,_key_or_fnis the field key and any function binding is cleared. - If the getter returns
undefined, the button keeps its previous label.
- If
- Arguments:
EchoChamberSlider(_id)
Horizontal slider control.
Arguments
_idAny
Returns: Struct.EchoChamberSlider
Public methods
-
SetRange(_min, _max): Set the slider value range.- Arguments:
_minRealMinimum value._maxRealMaximum value.
- Returns:
Struct.EchoChamberSlider
- Arguments:
-
SetStep(_step): Set snap step size (0 for no snapping).- Arguments:
_stepRealStep size (0 disables snapping).
- Returns:
Struct.EchoChamberSlider
- Arguments:
-
BindValue(_source, [_key_or_fn]): Bind the slider value to a struct field or getter/setter functions.- Arguments:
_sourceStruct,FunctionStruct to bind, or a getter function (signature:function() -> Real)._key_or_fnString,FunctionOptional struct field key, or a setter function (signature:function(_value)).
- Returns:
Struct.EchoChamberSlider - Additional details:
- If
_sourceis callable, it becomes the getter and_key_or_fnis used as the optional setter (if callable); struct binding is cleared. - If
_sourceis a struct,_key_or_fnis treated as the field key and getter/setter functions are cleared. - If no setter is provided, the slider still changes visually and
OnChangestill fires.
- If
- Arguments:
-
OnChange(_fn): Set a callback that runs when the value changes.- Arguments:
_fnFunctionCallback (signature:function(_value)).
- Returns:
Struct.EchoChamberSlider - Additional details:
- Fires when the slider changes via user input.
- Arguments:
EchoChamberToggle(_id)
Checkbox-style toggle.
Arguments
_idAny
Returns: Struct.EchoChamberToggle
Public methods
-
BindBool(_source, [_key_or_fn]): Bind the toggle value to a struct field or getter/setter functions.- Arguments:
_sourceStruct,FunctionStruct to bind, or a getter function (signature:function() -> Bool)._key_or_fnString,FunctionOptional struct field key, or a setter function (signature:function(_value)).
- Returns:
Struct.EchoChamberToggle - Additional details:
- If
_sourceis callable, it becomes the getter and_key_or_fnis used as the optional setter (if callable); struct binding is cleared. - If
_sourceis a struct,_key_or_fnis treated as the field key and getter/setter functions are cleared. - If no setter is provided, the toggle still updates visually and
OnChangestill fires.
- If
- Arguments:
-
BindValue(_source, [_key_or_fn]): Bind the toggle value (alias of BindBool).- Arguments:
_sourceStruct,FunctionStruct to bind, or a getter function (signature:function() -> Bool)._key_or_fnString,FunctionOptional struct field key, or a setter function (signature:function(_value)).
- Returns:
Struct.EchoChamberToggle - Additional details:
- Same behavior as
BindBool.
- Same behavior as
- Arguments:
-
OnChange(_fn): Set a callback that runs when the value changes.- Arguments:
_fnFunctionCallback (signature:function(_value)).
- Returns:
Struct.EchoChamberToggle - Additional details:
- Fires when the toggle changes via click or keyboard.
- Arguments:
EchoChamberTextInput(_id)
Single-line text input.
Arguments
_idAny
Returns: Struct.EchoChamberTextInput
Public methods
-
BindText(_struct, _key): Bind the text input to a struct field.- Arguments:
_structStructStruct holding the field to update._keyStringField key to read/write.
- Returns:
Struct.EchoChamberTextInput - Additional details:
- If
_structis not a struct, the binding is not changed.
- If
- Arguments:
-
SetPlaceholder(_text): Set placeholder text shown when empty.- Arguments:
_textAnyPlaceholder text (converted to string).
- Returns:
Struct.EchoChamberTextInput
- Arguments:
-
OnChange(_fn): Set a callback that runs when text is committed.- Arguments:
_fnFunctionCallback (signature:function(_text)).
- Returns:
Struct.EchoChamberTextInput - Additional details:
- Fired when the input is committed (blur or Enter).
- Arguments:
-
SetReadOnly(_flag): Toggle read-only mode.- Arguments:
_flagBoolRead-only flag.
- Returns:
Struct.EchoChamberTextInput
- Arguments:
-
SetMaxLength(_len): Set the maximum number of characters (0 for unlimited).- Arguments:
_lenRealMaximum length (0 disables the limit).
- Returns:
Struct.EchoChamberTextInput
- Arguments:
-
SetAllowedChars(_chars): Restrict input to a specific set of characters.- Arguments:
_charsStringAllowed characters (empty string allows all).
- Returns:
Struct.EchoChamberTextInput
- Arguments:
SetDeniedChars(_chars): Reject characters in the given set.- Arguments:
_charsStringDenied characters.
- Returns:
Struct.EchoChamberTextInput
- Arguments:
-
SetNumericOnly(_flag, [_allow_decimal], [_allow_negative]): Restrict input to numeric characters.- Arguments:
_flagBoolEnable numeric-only mode._allow_decimalBoolOptional, allow decimal points (defaults to false)._allow_negativeBoolOptional, allow a leading negative sign (defaults to false).
- Returns:
Struct.EchoChamberTextInput
- Arguments:
-
SetSelectAllOnFocus(_flag): Select all text when the input gains focus.- Arguments:
_flagBoolSelect-all flag.
- Returns:
Struct.EchoChamberTextInput
- Arguments:
-
SetFilter(_fn): Provide a filter function for inserted text.- Arguments:
_fnFunctionFilter callback (signature:function(_insert_text) -> String).
- Returns:
Struct.EchoChamberTextInput - Additional details:
- The filter runs before allow/deny/numeric constraints.
- Return an empty string to reject the insert.
- Arguments:
-
SetInvalid(_flag): Toggle invalid styling.- Arguments:
_flagBoolInvalid flag.
- Returns:
Struct.EchoChamberTextInput
- Arguments:
EchoChamberSeparator(_id)
Non-interactive separator line.
Arguments
_idAny
Returns: Struct.EchoChamberSeparator
Public methods
SetOrientation(_ori): Set orientation (“horizontal” or “vertical”).- Arguments:
_oriStringOrientation string.
- Returns:
Struct.EchoChamberSeparator
- Arguments:
EchoChamberListView(_id)
Virtualized list view control for very large row counts. Draws and hit-tests only visible rows.
Arguments
_idAny
Returns: Struct.EchoChamberListView
Public methods
-
SetRowHeight(_h): Set row height in pixels.- Arguments:
_hRealRow height in pixels.
- Returns:
Struct.EchoChamberListView
- Arguments:
-
SetVisibleRows(_rows): Set a visible row count (auto height from row height).- Arguments:
_rowsRealVisible row count (<= 0 clears).
- Returns:
Struct.EchoChamberListView - Additional details:
- Setting this disables auto-height-from-count.
- Arguments:
-
SetAutoHeightFromCount(_max_rows): Auto-size to row count up to a maximum.- Arguments:
_max_rowsRealMaximum row count to use for auto height (0 disables).
- Returns:
Struct.EchoChamberListView - Additional details:
- Setting this clears any explicit visible row count.
- Arguments:
-
SetAutoWidthFromContent(_max_rows): Auto-size width from row content (sample limit).- Arguments:
_max_rowsRealMaximum rows to sample (0 disables).
- Returns:
Struct.EchoChamberListView - Additional details:
- Requires
SetRowMeasureto be provided.
- Requires
- Arguments:
-
SetFillWidth(_flag): Toggle fill width for row layouts.- Arguments:
_flagBoolFill width flag.
- Returns:
Struct.EchoChamberListView
- Arguments:
-
SetPreferredHeight(_h): Set the preferred height for FitToContent.- Arguments:
_hRealPreferred height in pixels.
- Returns:
Struct.EchoChamberListView
- Arguments:
-
SetPreferredWidth(_w): Set the preferred width for FitToContent.- Arguments:
_wRealPreferred width in pixels.
- Returns:
Struct.EchoChamberListView
- Arguments:
-
SetCountGetter(_fn): Set a function that returns the row count.- Arguments:
_fnFunctionRow count callback (signature:function() -> Real).
- Returns:
Struct.EchoChamberListView - Additional details:
- Called whenever the list view needs to know its row count.
- Arguments:
-
SetRowDrawer(_fn): Set a function that draws a row.- Arguments:
_fnFunctionRow draw callback (signature:function(_index, _rect, _is_selected, _is_hover)).
- Returns:
Struct.EchoChamberListView - Additional details:
_rectis{x1,y1,x2,y2}in GUI space and already excludes padding/scrollbar.- Background is already drawn; this function should only draw row content.
- Arguments:
-
SetRowMeasure(_fn): Set a function that returns row text/width for auto width.- Arguments:
_fnFunctionMeasure callback (signature:function(_index, _root, _panel) -> String,Real).
- Returns:
Struct.EchoChamberListView - Additional details:
- Returning a string uses the theme body font to measure width.
- Returning a real value treats it as a pixel width.
- Only used when
SetAutoWidthFromContentis enabled.
- Arguments:
-
SetOnSelect(_fn): Set a callback that runs when selection changes.- Arguments:
_fnFunctionCallback (signature:function(_index)).
- Returns:
Struct.EchoChamberListView - Additional details:
- Fired when the selected index changes via mouse or keyboard.
- Arguments:
-
SetOnActivate(_fn): Set a callback that runs when a row is activated.- Arguments:
_fnFunctionCallback (signature:function(_index)).
- Returns:
Struct.EchoChamberListView - Additional details:
- Triggered by Enter while a row is selected.
- Arguments:
-
SetOnDoubleClick(_fn): Set a callback for double click on a row.- Arguments:
_fnFunctionCallback (signature:function(_index)).
- Returns:
Struct.EchoChamberListView - Additional details:
- Triggered by a fast double-click on the same row.
- Arguments:
-
SetOnRightClick(_fn): Set a callback for right click on a row.- Arguments:
_fnFunctionCallback (signature:function(_index, _x, _y)).
- Returns:
Struct.EchoChamberListView - Additional details:
_x/_yare GUI-space mouse coordinates._indexis -1 when right-clicking empty space.
- Arguments:
-
SetAutoScroll(_enabled): Enable or disable auto scroll to bottom.- Arguments:
_enabledBoolAuto-scroll flag.
- Returns:
Struct.EchoChamberListView - Additional details:
- Enabling does not force a snap unless the list is already near bottom.
- Arguments:
-
JumpToBottom(): Jump scroll to the bottom.- Arguments: None.
- Returns:
Struct.EchoChamberListView - Additional details:
- Also resumes auto-follow if it was paused.
-
IsNearBottom(): Return true if the scroll is near the bottom.- Arguments: None.
- Returns:
Bool - Additional details:
- Based on the last draw frame.
-
IsAutoFollowPaused(): Return true if auto follow is paused.- Arguments: None.
- Returns:
Bool
-
GetSelectedIndex(): Get the selected index.- Arguments: None.
- Returns:
Real
-
SetSelectedIndex(_index): Set the selected index.- Arguments:
_indexRealSelected row index (use -1 to clear selection).
- Returns:
Struct.EchoChamberListView
- Arguments:
EchoChamberDropdownBase(_id)
Base dropdown control. Variants override selection and row behavior.
Arguments
_idAny
Returns: Struct.EchoChamberDropdownBase
Public methods
-
GetSelectedIndex(): Get the selected index.- Arguments: None.
- Returns:
Real
-
SetSelectedIndex(_idx): Set the selected index.- Arguments:
_idxRealSelected index (clamped to available options).
- Returns: N/A
- Arguments:
-
DrawOverlayRow(_root, _row_index, _row_rect, _hover, _selected): Draw an overlay row (override to customize).- Arguments:
_rootStruct.EchoChamberRootRoot for theme access and metrics._row_indexRealRow index being drawn._row_rectStruct{x1,y1,x2,y2}row rect in GUI space._hoverBoolTrue if the row is hovered._selectedBoolTrue if the row is selected.
- Returns: N/A
- Arguments:
-
OnOverlayRowClick(_root, _row_index, _rect, _mx, _my): Handle overlay row click (override to customize).- Arguments:
_rootStruct.EchoChamberRootRoot for focus/overlay management._row_indexRealRow index that was clicked._rectStruct{x1,y1,x2,y2}row rect in GUI space._mxRealMouse X (GUI space)._myRealMouse Y (GUI space).
- Returns: N/A
- Arguments:
-
SetOptions(_array): Set the dropdown options array.- Arguments:
_arrayArray<String>Option labels.
- Returns:
Struct.EchoChamberDropdownBase - Additional details:
- The array is stored directly; pass a new array to replace options.
- Arguments:
-
SetUnfoldDirection(_dir): Set the overlay unfold direction (“up” or “down”).- Arguments:
_dirStringDirection string.
- Returns:
Struct.EchoChamberDropdownBase
- Arguments:
-
SetUseSelectedLabelWhenClosed(_flag): Use the selected label when closed.- Arguments:
_flagBoolTrue to show the selected option label in the base control.
- Returns:
Struct.EchoChamberDropdownBase
- Arguments:
-
SetOverlayMaxHeight(_height): Set the max overlay height.- Arguments:
_heightRealMax height in pixels (0 disables the cap).
- Returns:
Struct.EchoChamberDropdownBase
- Arguments:
EchoChamberDropdownSelect(_id)
Dropdown variant that binds a selected index to a struct field.
Arguments
_idAny
Returns: Struct.EchoChamberDropdownSelect
Public methods
-
BindIndex(_struct, _key): Bind the selected index to a struct field.- Arguments:
_structStructStruct holding the selected index field._keyStringField key to read/write.
- Returns:
Struct.EchoChamberDropdownSelect
- Arguments:
-
OnChange(_fn): Set a callback that runs when the selected index changes.- Arguments:
_fnFunctionCallback (signature:function(_index, _value)).
- Returns:
Struct.EchoChamberDropdownSelect - Additional details:
- Only fires when the selected index actually changes.
- Arguments:
-
GetSelectedIndex(): Get the selected index.- Arguments: None.
- Returns:
Real
SetSelectedIndex(_idx): Set the selected index.- Arguments:
_idxRealSelected index (clamped to available options).
- Returns: N/A
- Additional details:
- Updates the bound struct field when one is configured.
- Arguments:
-
OnOverlayRowClick(_root, _row_index, _rect, _mx, _my): Handle overlay row click.- Arguments:
_rootStruct.EchoChamberRootRoot for overlay management._row_indexRealRow index that was clicked._rectStruct{x1,y1,x2,y2}row rect in GUI space._mxRealMouse X (GUI space)._myRealMouse Y (GUI space).
- Returns: N/A
- Arguments:
EchoChamberDropdownToggleMenu(_id)
Dropdown variant that shows a checklist menu that stays open.
Arguments
_idAny
Returns: Struct.EchoChamberDropdownToggleMenu
Public methods
-
SetItems(_items): Set the item list for the menu.- Arguments:
_itemsArray<Struct>Array of item structs ({ label, bind_struct, bind_key }).
- Returns:
Struct.EchoChamberDropdownToggleMenu - Additional details:
- Each item reads/writes
bind_struct[bind_key]as a Bool toggle.
- Each item reads/writes
- Arguments:
-
OnAnyChange(_fn): Set a callback that runs when any item changes.- Arguments:
_fnFunctionCallback (signature:function()).
- Returns:
Struct.EchoChamberDropdownToggleMenu
- Arguments:
-
GetSelectedIndex(): Get the selected index.- Arguments: None.
- Returns:
Real - Additional details:
- Toggle menus do not track a single selection; this is a placeholder.
-
SetSelectedIndex(_idx): Set the selected index.- Arguments:
_idxRealIgnored for toggle menus.
- Returns: N/A
- Arguments:
-
DrawOverlayRow(_root, _row_index, _rect, _hover, _is_selected): Draw an overlay row.- Arguments:
_rootStruct.EchoChamberRootRoot for theme access and metrics._row_indexRealRow index being drawn._rectStruct{x1,y1,x2,y2}row rect in GUI space._hoverBoolTrue if the row is hovered._is_selectedBoolTrue if the row is selected (unused for toggle menus).
- Returns: N/A
- Arguments:
-
OnOverlayRowClick(_root, _row_index, _rect, _mx, _my): Handle overlay row click.- Arguments:
_rootStruct.EchoChamberRootRoot for overlay management._row_indexRealRow index that was clicked._rectStruct{x1,y1,x2,y2}row rect in GUI space._mxRealMouse X (GUI space)._myRealMouse Y (GUI space).
- Returns: N/A
- Arguments:
EchoChamberMachinePicker(_id)
Dropdown-style machine picker with search field at top.
Arguments
_idAny
Returns: Struct.EchoChamberMachinePicker
Public methods
-
SetListBuilder(_fn): Set a function that provides the list of machines based on the current filter text.- Arguments:
_fnFunctionList builder (signature:function(_filter_string) -> Structwithlabels,index_map, andselected_index).
- Returns:
Struct.EchoChamberMachinePicker - Additional details:
labelsis the filtered display list.index_mapmaps filtered indices to real indices in your source list.selected_indexis the initially selected filtered index.
- Arguments:
-
OnSelect(_fn): Set a callback that runs when the user selects a machine.- Arguments:
_fnFunctionCallback (signature:function(_real_index)).
- Returns:
Struct.EchoChamberMachinePicker - Additional details:
_real_indexcomes fromindex_mapfor the selected filtered row.
- Arguments:
-
SetUnfoldDirection(_dir): Set the overlay unfold direction (“up” or “down”).- Arguments:
_dirStringDirection string.
- Returns:
Struct.EchoChamberMachinePicker
- Arguments:
EchoChamberOpenConsole(_ui_root)
Open or create the built-in Echo Console window (log history viewer + filters).
Arguments
_ui_rootStruct.EchoChamberRoot
Returns: Struct.EchoChamberWindow
Echo Chamber Themes
Themes are just structs that hold fonts, sprites, colors, spacing, and sizing rules. They’re essentially a big bag of settings that Echo Chamber reads when drawing.
Default theme structure
The base theme constructor is: EchoChamberTheme().
It outputs a struct with fields in roughly these buckets (names below are from the actual theme struct):
CORE
statementgap
BUTTON
button_styles
COL
col_window_bgcol_panel_bgcol_textcol_text_dimcol_accentcol_accent_dimcol_mutedcol_muted_strongcol_errorcol_hover_rowcol_hover_row_altcol_menu_bgcol_menu_hovercol_label_hover_bgcol_checkbox_offcol_checkbox_on
DEFAULT
default_control_widthdefault_control_max_widthdefault_paddingdefault_row_height
DROPDOWN
dropdown_styles
FONT
font_headerfont_bodyfont_small
HEADER
header_styles
LABEL
label_styles(style keys includefont,text,text_alpha,text_disabled,text_disabled_alpha)
LIST
list_row_styles(style keys includebg_*,text_*, and*_alphavariants)
SEPARATOR
separator_styles(style keys includeline,line_alpha,line_disabled,line_disabled_alpha)
MIN
min_hit_h
PAD
pad_xpad_y
PANEL
panel_styles(style keys includebg,border,bg_alpha,border_alpha)panel_paddingpanel_gappanel_row_heightpanel_collapsed_sizepanel_collapse_handle_size
POPUP
popup_styles
ROW
row_header_hrow_toolbar_hrow_small_h
SCROLLBAR
scrollbar_stylesscrollbar_w
TEXTINPUT
textinput_styles
TOGGLE
toggle_styles
TOOLTIP
tooltip_stylestooltip_delay_mstooltip_padding
UI
ui_scale
WINDOW
window_styleswindow_paddingwindow_titlebar_hwindow_resize_grip_sizewindow_minimized_hwindow_button_gapwindow_button_sizewindow_button_close_labelwindow_button_minimize_labelwindow_button_restore_labelwindow_button_pin_labelwindow_button_unpin_label
Style map conventions
Most control styles are stored in a map of named styles (including _default). A control reads its style_id key and falls back to _default.
Common interaction keys (buttons, toggles, dropdowns, text inputs):
bg,bg_alphaborder,border_alphatext,text_alphabg_hover,bg_hover_alpha,border_hover,border_hover_alpha,text_hover,text_hover_alphabg_pressed,bg_pressed_alpha,border_pressed,border_pressed_alpha,text_pressed,text_pressed_alphabg_disabled,bg_disabled_alpha,border_disabled,border_disabled_alpha,text_disabled,text_disabled_alpha
Control-specific keys
label_styles:font,text,text_alpha,text_disabled,text_disabled_alpha.separator_styles:line,line_alpha,line_disabled,line_disabled_alpha.list_row_styles:bg_normal,bg_hover,bg_selected,bg_pressed,bg_disabled,text_normal,text_hover,text_selected,text_pressed,text_disabled, and matching*_alphakeys.toggle_styles:box_on,box_off,box_border, plusbox_*_hover,box_*_pressed,box_*_disabled, and matching*_alphakeys.slider_styles:track_bg,track_fill,knob, plus hover/pressed/disabled variants and matching*_alphakeys.dropdown_styles:bg_open,border_open,text_openwith*_alphakeys, plus overlay keys:overlay_bg,overlay_bg_alpha,overlay_border,overlay_border_alphaoverlay_row_*andoverlay_text_*keys, each with*_alphaoverlay_search_bg,overlay_search_hover_bg,overlay_search_border,overlay_search_text,overlay_search_placeholder, each with*_alpha
textinput_styles:bg_active,border_active,text_active,bg_readonly,border_readonly,text_readonly,bg_invalid,border_invalid,text_invalidwith*_alphakeys, plus:selection_bg,selection_text,selection_bg_inactive,selection_text_inactivewith*_alphacaret_color,caret_alpha,caret_char,caret_blink_ms,caret_width,caret_height,caret_inset_x,caret_inset_yplaceholder,placeholder_alpha,align
scrollbar_styles:track_bg,track_bg_hover,track_border,handle_bg,handle_bg_hover,handle_bg_pressed,handle_border, each with*_alpha.
Theme constructors
EchoChamberTheme()
Creates the shared default UI theme container for Echo Chamber visuals.
Returns: Struct.EchoChamberTheme
If you wish to create your own themes, the simplest way is to create a constructor that inherits from the EchoChamberTheme and then just override the specific values you wish to change.
Public methods
RefreshMetrics(): Recompute row heights based on current fonts and padding.- Arguments: None.
- Returns: N/A
- Additional details:
- Updates derived layout metrics such as row heights, padding, and window sizing.
Pre-built Custom Themes
EchoChamberThemeMidnightNeon()
Dark midnight blues with neon purple accent.
Returns: Struct.EchoChamberThemeMidnightNeon
EchoChamberThemeAmberForest()
Forest greens with warm amber highlights.
Returns: Struct.EchoChamberThemeAmberForest
EchoChamberThemeSakuraPunch()
Inky plum with candy pink accents.
Returns: Struct.EchoChamberThemeSakuraPunch
EchoChamberThemeArcadeWave()
Retro arcade navy with bright cyan accents.
Returns: Struct.EchoChamberThemeArcadeWave
EchoChamberThemeCircuitCandy()
Playful teal and orange on a soft dark background.
Returns: Struct.EchoChamberThemeCircuitCandy
EchoChamberThemeToxicTerminal()
Acid terminal green with rogue magenta highlights.
Returns: Struct.EchoChamberThemeToxicTerminal
EchoChamberThemeSunsetGlitch()
Sunset oranges colliding with cyan and grape.
Returns: Struct.EchoChamberThemeSunsetGlitch
EchoChamberThemeBubblegumTerminal()
Bubblegum pink UI with teal statement nodes.
Returns: Struct.EchoChamberThemeBubblegumTerminal
EchoChamberThemeMangoMint()
Warm mango chrome with mint green graph.
Returns: Struct.EchoChamberThemeMangoMint
Functions
EchoChamberThemeTryGetFont(_font_name)
Resolve a font asset by name. If missing, returns the current draw font.
Arguments
_font_nameString, Asset.GMFont
Returns: Asset.GMFont
EchoChamberThemeTryGetSprite(_sprite_name)
Resolve a sprite asset by name. If missing, returns -1.
Arguments
_sprite_nameString, Asset.GMSprite
Returns: Asset.GMSprite,Real