2020-05-14 02:36:45 +02:00
|
|
|
extends VBoxContainer
|
|
|
|
|
|
|
|
onready var Function : Label = $Function
|
|
|
|
onready var FunctionColor : ColorRect = $Color
|
|
|
|
|
2020-05-14 13:55:30 +02:00
|
|
|
var function : String setget set_function, get_function
|
|
|
|
var color : Color setget set_function_color, get_function_color
|
2020-05-14 02:36:45 +02:00
|
|
|
var font_color : Color
|
|
|
|
var font : Font
|
|
|
|
|
|
|
|
func _ready():
|
|
|
|
Function.set("custom_fonts/font",font)
|
|
|
|
Function.set("custom_colors/font_color",font_color)
|
2020-05-14 13:55:30 +02:00
|
|
|
Function.set_text(function)
|
2020-05-14 02:36:45 +02:00
|
|
|
FunctionColor.set_frame_color(color)
|
|
|
|
|
|
|
|
func create_legend(text : String, color : Color, font : Font, font_color : Color):
|
2020-05-14 13:55:30 +02:00
|
|
|
self.function = text
|
2020-05-14 02:36:45 +02:00
|
|
|
self.color = color
|
|
|
|
self.font_color = font_color
|
|
|
|
self.font = font
|
2020-05-14 13:55:30 +02:00
|
|
|
|
|
|
|
func set_function( t : String ):
|
|
|
|
function = t
|
|
|
|
|
|
|
|
func get_function() -> String:
|
|
|
|
return function
|
|
|
|
|
|
|
|
func set_function_color( c : Color ):
|
|
|
|
color = c
|
|
|
|
|
|
|
|
func get_function_color() -> Color:
|
|
|
|
return color
|