Skip to content

SkillNodeVisual ​

Inherits: Control

Visual representation of a skill node - uses scene-based UI

Properties ​

SkillNode : setskill_nodeset_skill_node
boolis_selectedfalse : set = set_selected
floatzoom_level1.0 : set = set_zoom_level
boolshow_debug_infotrue

Variables ​

boolis_draggingfalse
Vector2drag_start_pos

Methods ​

voidset_skill_node( node: SkillNode )
voidset_selected( selected: bool )
voidset_zoom_level( zoom: float )
voidplay_select_animation()
voidplay_hover_animation()
voidplay_unhover_animation()
SkillNodeget_node_data()
Vector2get_center_position()
Dictionaryget_connection_points()
voidset_highlight( enabled: bool )
voidset_error_state( has_error: bool )
voidupdate_rank_display( current_rank: int = 0 )

Signals ​

node_clicked( node: SkillNodeVisual, event: InputEvent ) ​

node_right_clicked( node: SkillNodeVisual, global_position: Vector2 ) ​

node_drag_started( node: SkillNodeVisual ) ​

node_dragged( node: SkillNodeVisual, relative_motion: Vector2 ) ​

node_drag_ended( node: SkillNodeVisual ) ​

Constants ​

  • Vector2 NODE_SIZE = Vector2(50, 50)
  • float BORDER_WIDTH = 2.0
  • float CORNER_RADIUS = 8.0
  • Vector2 ICON_SIZE = Vector2(45, 45)
  • Color NODE_DEFAULT_COLOR = Color(0.4, 0.4, 0.6, 1.0)
  • Color NODE_SELECTED_COLOR = Color(0.6, 0.8, 1.0, 1.0)
  • Color NODE_CHOICE_COLOR = Color(0.6, 0.4, 0.8, 1.0)
  • Color NODE_RANKED_COLOR = Color(0.4, 0.6, 0.4, 1.0)
  • Color BORDER_DEFAULT_COLOR = Color(0.2, 0.2, 0.3, 1.0)
  • Color BORDER_SELECTED_COLOR = Color(1.0, 1.0, 0.5, 1.0)
  • Color TEXT_COLOR = Color.WHITE
  • Color ID_TEXT_COLOR = Color(0.7, 0.7, 0.7, 1.0)

Property descriptions ​

SkillNode : set skill_node = set_skill_node ​

No description yet.

bool is_selected = false : set = set_selected ​

No description yet.

float zoom_level = 1.0 : set = set_zoom_level ​

No description yet.

bool show_debug_info = true ​

No description yet.

Variable descriptions ​

bool is_dragging = false ​

No description yet.

Vector2 drag_start_pos ​

No description yet.

Method descriptions ​

void set_skill_node( node: SkillNode ) ​

No description yet.

void set_selected( selected: bool ) ​

No description yet.

void set_zoom_level( zoom: float ) ​

No description yet.

void play_select_animation() ​

No description yet.

void play_hover_animation() ​

No description yet.

void play_unhover_animation() ​

No description yet.

SkillNode get_node_data() ​

No description yet.

Vector2 get_center_position() ​

No description yet.

Dictionary get_connection_points() ​

No description yet.

void set_highlight( enabled: bool ) ​

No description yet.

void set_error_state( has_error: bool ) ​

No description yet.

void update_rank_display( current_rank: int = 0 ) ​

No description yet.