AUTO-GENERATED FILE — DO NOT EDIT MANUALLY
Source: systems/interaction/ui_selection_system.gd
Version: 6.0
class_name: UISelectionSystem
extends: System
Signals
(none)
Exports
enable_mouse_selection: bool = true- Selection configuration
- Performance settings
- Private state
enable_keyboard_selection: bool = true- Selection configuration
- Performance settings
- Private state
enable_touch_selection: bool = true- Selection configuration
- Performance settings
- Private state
selection_tolerance: float = 5.0- Selection configuration
- Performance settings
- Private state
default_selection_mode: UISelectionComponent- Performance settings
- Private state
allow_multi_select: bool = true- Performance settings
- Private state
allow_area_select: bool = true- Performance settings
- Private state
max_selections: int = 100- Performance settings
- Private state
update_frequency: float = 30.0- Private state
cull_distance: float = 500.0- Private state
batch_size: int = 20- Private state
Methods
query -> QueryBuilderprocess(entities: Array, components: Array, delta: float) -> void- Event-driven system - no per-frame processing needed
setup -> void- Connect to event buses for event-driven updates
cleanup -> void- Disconnect from event buses
_connect_to_events -> void_disconnect_from_events -> void_on_target_changed(event: TargetChangedEvent) -> void- Update hover state based on new target position
_on_selection_changed(event: SelectionChangeEvent) -> void- Handle selection state changes
_on_hover_changed(event: HoverChangeEvent) -> void- Update global hover state
_on_focus_changed(event: FocusChangeEvent) -> void- Update global focus state
_update_hover_from_target(grid_pos: Vector2i, world_pos: Vector2) -> void_handle_selection_event(event: SelectionChangeEvent) -> void_update_global_selection_state -> void- Update timing
_process_selection_component(entity: Entity, selection: UISelectionComponent, delta: float) -> void- Update timing
_update_hover_state(entity: Entity, selection: UISelectionComponent) -> void- Check if this entity should be hovered
_update_focus_state(entity: Entity, selection: UISelectionComponent) -> void- Check if this entity should be focused
_apply_selection_constraints(selection: UISelectionComponent) -> void- Enforce maximum selection limit
_update_global_state -> void- Update timing
_setup_input_processor -> void_connect_input_events -> void_disconnect_input_events -> void_on_gui_input(event: InputEvent) -> void_on_input_event(event: InputEvent) -> void_process_input_event(event: InputEvent) -> void_handle_mouse_button(event: InputEventMouseButton) -> void_handle_mouse_motion(event: InputEventMouseMotion) -> void_handle_touch(event: InputEventScreenTouch) -> void_handle_touch_drag(event: InputEventScreenDrag) -> void_handle_keyboard(event: InputEventKey) -> void_handle_mouse_press(event: InputEventMouseButton) -> void_select_all -> void- Query all entities with UISelectionComponent
_handle_mouse_release(position: Vector2) -> void_handle_mouse_move(position: Vector2) -> void_handle_right_click(position: Vector2) -> void- Could show context menu or perform right-click actions
_handle_touch_press(position: Vector2, index: int) -> void_handle_touch_release(position: Vector2, index: int) -> void_handle_touch_move(position: Vector2, index: int) -> void_handle_key_press(event: InputEventKey) -> void_handle_key_release(event: InputEventKey) -> void- Handle key release events if needed
_handle_entity_selection_at_position(position: Vector2, multi_select: bool = false) -> void_start_area_selection(position: Vector2) -> void_update_area_selection(position: Vector2) -> void_end_area_selection(position: Vector2) -> void_finalize_selection -> void- This could emit selection completion events
select_all -> voidclear_all_selection -> void_toggle_selection_mode -> void_select_current_hovered -> void_navigate_selection -> void_get_entity_at_position(position: Vector2) -> Entity- Query entities with position components
_update_hover_at_position(position: Vector2) -> void_set_hovered_entity(entity: Entity) -> void_clear_hovered_entity -> void_set_focused_entity(entity: Entity) -> void_clear_focused_entity -> void_should_be_hovered(entity: Entity) -> bool_should_be_focused(entity: Entity) -> bool_is_entity_selectable(entity: Entity) -> bool_passes_tag_filter(entity: Entity) -> bool_passes_type_filter(entity: Entity) -> bool_select_entities_in_area(bounds: Rect2) -> void_remove_entity_from_selection(entity: Entity, selection: UISelectionComponent) -> voidget_selected_entities -> Arrayto_string -> String_grid_to_world(grid_pos: Vector2i) -> Vector2- This should be implemented based on grid configuration
set_selection_mode(mode: UISelectionComponent) -> void_clear_all_selection -> void