Grid Placement

TargetHighlighter

AUTO-GENERATED FILE — DO NOT EDIT MANUALLY

Source: shared/components/ui_controls/target_highlighter.gd

Version: 5.1

class_name: TargetHighlighter extends: GBSystemsComponent

Summary

When a target node is set on the build state, marks it by colors based on the settings of its Manipulatable node (or lack thereof)

Signals

(none)

Exports

(none)

Methods

  • resolve_gb_dependencies()
    • Resolves dependencies from the composition container. Sets up mode state, targeting service, manipulation state, and highlight settings.[br][br] [code]p_container[/code]: [i]GBCompositionContainer[/i] - Container with system dependencies and settings
  • set_movable_display()
    • Sets a canvas item modulate to either the valid or invalid move color. Returns the new modulate color.[br][br] [code]p_target[/code]: [i]CanvasItem[/i] - Target canvas item to set modulate color on[br] [code]p_movable[/code]: [i]bool[/i] - Whether the target is movable (valid) or not (invalid)
  • set_demolish_display()
    • Sets a canvas item modulate to either the valid or invalid demolish color. Returns the new modulate color.[br][br] [code]p_target[/code]: [i]CanvasItem[/i] - Target canvas item to set modulate color on[br] [code]p_demolishable[/code]: [i]bool[/i] - Whether the target is demolishable (valid) or not (invalid)
  • set_build_preview_display()
    • Sets the color of a build preview to the preview color
  • set_info_display()
  • set_actionable_colors()
    • Sets the target modulate to colors based on current mode actionability. Changes color based on whether the target can be affected by the current mode’s action.[br][br] [code]p_target[/code]: [i]CanvasItem[/i] - Target canvas item to set actionable colors on
  • should_highlight()
    • Checks if the highlighter should highlight the target based on manipulation data. Returns true if the target matches the manipulation data target.[br][br] [code]p_data[/code]: [i]ManipulationData[/i] - Current manipulation data to compare against[br] [code]p_target[/code]: [i]CanvasItem[/i] - Target canvas item to check for highlighting
  • is_locked()
    • Returns true if the highlighter is locked by active manipulation state. A locked highlighter won’t respond to target changes until manipulation finishes.
  • get_runtime_issues()
    • Validates that all required dependencies are properly set. Returns true if all dependencies are valid, false otherwise.
  • _on_highlight_changed()
  • _is_preview_object()
    • Check if the target is a preview object (marked with gb_is_preview_build metadata) Returns true if the target or any of its children have the gb_is_preview_build metadata tag