Skip to content

Highlight

Divided by Zer0 edited this page Jul 11, 2021 · 4 revisions

Highlight

Extends: Control

Description

Sets and modulates the highlight of a Card of CardContainer scene

Property Descriptions

owner_node

var owner_node

Stores a reference to the Card that is hosting this node

Method Descriptions

set_highlight

func set_highlight(requestedFocus: bool, hoverColour) -> void

Changes card highlight colour.

highlight_potential_card (static)

func highlight_potential_card(colour: Color, potential_cards: Array, potential_slots: Array) -> Card

Goes through all the potential cards we're currently hovering onto with the mouse or targetting arrow, and highlights the one with the highest index among their common parent.

It also clears the highlights of any grid placement slots that might have been already highlighted, since potential card targets/hosts take priority.

It also colours the highlight with the specified colour

highlight_potential_container (static)

func highlight_potential_container(colour: Color, potential_containers: Array, potential_cards: Array, potential_slots: Array) -> CardContainer

Goes through all the potential cardcontainers we're currently hovering onto with the mouse, and highlights the one with the highest index among their common parent.

It also clears the highlights of any porential hosts or grid placement slots that might have been already highlighted, since CardContainers take priority

It also colours the highlight with the specified colour