Grid Placement

PlaceableUIInteraction

AUTO-GENERATED FILE — DO NOT EDIT MANUALLY

Source: ui/placeable/shared/placeable_ui_interaction.gd

Version: 5.1

class_name: PlaceableUIInteraction extends: RefCounted

Summary

Shared UI interaction helper for placeable UI components.

Provides consistent pressed/hover/normal state interaction for placeable views and list entries. Handles mouse interactions and visual feedback to ensure consistent user experience. Uses theme file for style definitions while managing state transitions.

The theme resource can be overridden by calling [method set_theme_override] before [method init].

Signals

  • clicked
    • Emitted when a full click action is completed (press + release inside the control).

Exports

(none)

Methods

  • init()
    • Initialize the style helper with a control reference [param control] The control to apply styles to [param theme] Optional theme resource. Uses GBConstants.PLACEABLE_UI_THEME if not provided.
  • _load_theme_styles()
    • Load style definitions from the theme file [param fallback_theme] Optional theme to use if no override is set. Uses GBConstants.PLACEABLE_UI_THEME if not provided.
  • set_theme_override()
    • Override the default theme with a custom theme resource. [param theme] Custom theme resource. If null, reverts to default.
  • _create_fallback_styles()
    • Create fallback styles if theme file is unavailable
  • _connect_signals()
    • Connect mouse and input signals to the control
  • _apply_normal_style()
    • Apply normal style to the control
  • _apply_hover_style()
    • Apply hover style to the control
  • _apply_pressed_style()
    • Apply pressed style to the control
  • _on_mouse_entered()
    • Handle mouse enter events
  • _on_mouse_exited()
    • Handle mouse exit events
  • _on_gui_input()
    • Handle GUI input events for press/release detection
  • _on_click()
    • Handle click events by emitting signal
  • cleanup()
    • Cleanup method to disconnect signals when no longer needed