mirror of
https://codeberg.org/StreamGraph/StreamGraph.git
synced 2024-11-13 19:49:55 +01:00
add colors to ports depending on data type
This commit is contained in:
parent
f4910617d1
commit
34220c4ad1
1 changed files with 11 additions and 2 deletions
|
@ -10,6 +10,15 @@ class_name DeckNodeRendererGraphNode
|
|||
## are based off.
|
||||
var node: DeckNode
|
||||
|
||||
const TYPE_COLORS := {
|
||||
DeckType.Types.BOOL: Color("#7048e0"),
|
||||
DeckType.Types.STRING: Color("#dbe048"),
|
||||
DeckType.Types.NUMERIC: Color("#68e36c"),
|
||||
DeckType.Types.ARRAY: Color("#e36868"),
|
||||
DeckType.Types.DICTIONARY: Color("#79ede3"),
|
||||
DeckType.Types.ANY: Color.WHITE,
|
||||
}
|
||||
|
||||
|
||||
## Setups up all the properties based off [member node]. Including looping through
|
||||
## [method DeckNode.get_all_ports()] and setting up all the descriptors.
|
||||
|
@ -191,8 +200,8 @@ func update_port(port: Port) -> void:
|
|||
port.index,
|
||||
port.port_type == DeckNode.PortType.INPUT,
|
||||
port.type,
|
||||
Color.WHITE,
|
||||
TYPE_COLORS[port.type],
|
||||
port.port_type == DeckNode.PortType.OUTPUT,
|
||||
port.type,
|
||||
Color.WHITE,
|
||||
TYPE_COLORS[port.type],
|
||||
)
|
||||
|
|
Loading…
Reference in a new issue