mirror of
https://github.com/Relintai/pandemonium_engine_easy_charts.git
synced 2024-11-12 10:15:19 +01:00
Fix for pandemonium.
This commit is contained in:
parent
a54196ef27
commit
1d9fc083dd
@ -26,3 +26,5 @@ margin_bottom = 14.0
|
||||
|
||||
[node name="Tooltip" parent="." instance=ExtResource( 2 )]
|
||||
visible = false
|
||||
margin_right = 20.0
|
||||
margin_bottom = 16.0
|
||||
|
@ -24,12 +24,12 @@ __meta__ = {
|
||||
[node name="CheckButton" type="CheckButton" parent="."]
|
||||
margin_right = 223.0
|
||||
margin_bottom = 40.0
|
||||
custom_colors/font_color_disabled = Color( 0, 0, 0, 1 )
|
||||
custom_colors/font_color_focus = Color( 0, 0, 0, 1 )
|
||||
custom_colors/font_color_hover_pressed = Color( 0, 0, 0, 1 )
|
||||
custom_colors/font_color = Color( 0, 0, 0, 1 )
|
||||
custom_colors/font_color_hover = Color( 0, 0, 0, 1 )
|
||||
custom_colors/font_color_pressed = Color( 0, 0, 0, 1 )
|
||||
custom_colors/font_color_hover = Color( 0, 0, 0, 1 )
|
||||
custom_colors/font_color_hover_pressed = Color( 0, 0, 0, 1 )
|
||||
custom_colors/font_color_focus = Color( 0, 0, 0, 1 )
|
||||
custom_colors/font_color_disabled = Color( 0, 0, 0, 1 )
|
||||
text = "Start Relatime Plotting"
|
||||
|
||||
[node name="Label" type="Label" parent="."]
|
||||
|
@ -24,12 +24,12 @@ __meta__ = {
|
||||
[node name="CheckButton" type="CheckButton" parent="."]
|
||||
margin_right = 223.0
|
||||
margin_bottom = 40.0
|
||||
custom_colors/font_color_disabled = Color( 0, 0, 0, 1 )
|
||||
custom_colors/font_color_focus = Color( 0, 0, 0, 1 )
|
||||
custom_colors/font_color_hover_pressed = Color( 0, 0, 0, 1 )
|
||||
custom_colors/font_color = Color( 0, 0, 0, 1 )
|
||||
custom_colors/font_color_hover = Color( 0, 0, 0, 1 )
|
||||
custom_colors/font_color_pressed = Color( 0, 0, 0, 1 )
|
||||
custom_colors/font_color_hover = Color( 0, 0, 0, 1 )
|
||||
custom_colors/font_color_hover_pressed = Color( 0, 0, 0, 1 )
|
||||
custom_colors/font_color_focus = Color( 0, 0, 0, 1 )
|
||||
custom_colors/font_color_disabled = Color( 0, 0, 0, 1 )
|
||||
text = "Start Relatime Plotting"
|
||||
|
||||
[node name="Label" type="Label" parent="."]
|
||||
|
@ -24,12 +24,12 @@ __meta__ = {
|
||||
[node name="CheckButton" type="CheckButton" parent="."]
|
||||
margin_right = 223.0
|
||||
margin_bottom = 40.0
|
||||
custom_colors/font_color_disabled = Color( 0, 0, 0, 1 )
|
||||
custom_colors/font_color_focus = Color( 0, 0, 0, 1 )
|
||||
custom_colors/font_color_hover_pressed = Color( 0, 0, 0, 1 )
|
||||
custom_colors/font_color = Color( 0, 0, 0, 1 )
|
||||
custom_colors/font_color_hover = Color( 0, 0, 0, 1 )
|
||||
custom_colors/font_color_pressed = Color( 0, 0, 0, 1 )
|
||||
custom_colors/font_color_hover = Color( 0, 0, 0, 1 )
|
||||
custom_colors/font_color_hover_pressed = Color( 0, 0, 0, 1 )
|
||||
custom_colors/font_color_focus = Color( 0, 0, 0, 1 )
|
||||
custom_colors/font_color_disabled = Color( 0, 0, 0, 1 )
|
||||
text = "Start Relatime Plotting"
|
||||
|
||||
[node name="Label" type="Label" parent="."]
|
||||
|
@ -25,16 +25,16 @@ var interactive: bool = false
|
||||
var use_splines: bool = false
|
||||
|
||||
var colors: Dictionary = {
|
||||
bounding_box = Color.black,
|
||||
grid = Color.gray,
|
||||
functions = [Color.red, Color.green, Color.blue, Color.black]
|
||||
"bounding_box": Color.black,
|
||||
"grid": Color.gray,
|
||||
"functions": [Color.red, Color.green, Color.blue, Color.black]
|
||||
}
|
||||
|
||||
var point_radius: float = 3.0
|
||||
var line_width: float = 1.0
|
||||
var bar_width: float = 10.0
|
||||
var shapes: Array = [Point.Shape.CIRCLE, Point.Shape.SQUARE, Point.Shape.TRIANGLE, Point.Shape.CROSS]
|
||||
var font: BitmapFont = Label.new().get_font("")
|
||||
var font: BitmapFont = Label.new().get_theme_font("")
|
||||
|
||||
func get_function_color(function_index: int) -> Color:
|
||||
return colors.functions[function_index] if function_index < colors.functions.size() else Color.black
|
||||
|
@ -67,9 +67,9 @@ func _to_string() -> String:
|
||||
string+="%*s" % [last_string_len+1, dataset[row_i][column_i]]
|
||||
string+="\n"
|
||||
string+="\n['{table_name}' : {rows} rows x {columns} columns]\n".format({
|
||||
rows = datamatrix.rows(),
|
||||
columns = datamatrix.columns(),
|
||||
table_name = table_name})
|
||||
"rows": datamatrix.rows(),
|
||||
"columns": datamatrix.columns(),
|
||||
"table_name": table_name})
|
||||
return string
|
||||
|
||||
# ...............................................................................
|
||||
@ -160,10 +160,11 @@ func get_irows(indexes : PoolIntArray) -> Array:
|
||||
# dataset["0:5"] ---> Returns an array containing all columns from the 1st to the 4th
|
||||
# dataset["label0;label5"] ---> Returns an array containing all row from the one with label == "label0" to the one with label == "label5"
|
||||
# dataset["header0:header0"] ---> Returns an array containing all columns from the one with label == "label0" to the one with label == "label5"
|
||||
func _get(_property : String):
|
||||
func _get(_property : StringName):
|
||||
var propertystr : String = _property
|
||||
# ":" --> Columns
|
||||
if ":" in _property:
|
||||
var property : PoolStringArray = _property.split(":")
|
||||
if ":" in propertystr:
|
||||
var property : PoolStringArray = propertystr.split(":")
|
||||
if (property[0]).is_valid_integer():
|
||||
if property[1] == "*":
|
||||
return get_icolumns(range(property[0] as int, headers.size()-1))
|
||||
@ -175,16 +176,16 @@ func _get(_property : String):
|
||||
else:
|
||||
return get_icolumns(range(get_column_index(property[0]), get_column_index(property[1])))
|
||||
# ";" --> Rows
|
||||
elif ";" in _property:
|
||||
var property : PoolStringArray = _property.split(";")
|
||||
elif ";" in propertystr:
|
||||
var property : PoolStringArray = propertystr.split(";")
|
||||
if (property[0]).is_valid_integer():
|
||||
return get_irows(range(property[0] as int, property[1] as int + 1 ))
|
||||
else:
|
||||
return get_irows(range(get_row_index(property[0]), get_row_index(property[1])))
|
||||
elif "," in _property:
|
||||
var property : PoolStringArray = _property.split(",")
|
||||
elif "," in propertystr:
|
||||
var property : PoolStringArray = propertystr.split(",")
|
||||
else:
|
||||
if (_property as String).is_valid_integer():
|
||||
return get_icolumn(_property as int)
|
||||
if (propertystr as String).is_valid_integer():
|
||||
return get_icolumn(propertystr as int)
|
||||
else:
|
||||
return get_column(_property)
|
||||
return get_column(propertystr)
|
||||
|
@ -159,16 +159,17 @@ func set(position: String, value) -> void:
|
||||
values[t_pos[0]][t_pos[1]] = value
|
||||
|
||||
# --------------
|
||||
func _get(_property : String):
|
||||
func _get(_property : StringName):
|
||||
var propertystr : String = _property
|
||||
# ":" --> Columns
|
||||
if ":" in _property:
|
||||
var property : PoolStringArray = _property.split(":")
|
||||
if ":" in propertystr:
|
||||
var property : PoolStringArray = propertystr.split(":")
|
||||
var from : PoolStringArray = property[0].split(",")
|
||||
var to : PoolStringArray = property[1].split(",")
|
||||
elif "," in _property:
|
||||
var property : PoolStringArray = _property.split(",")
|
||||
elif "," in propertystr:
|
||||
var property : PoolStringArray = propertystr.split(",")
|
||||
if property.size() == 2:
|
||||
return get_row(property[0] as int)[property[1] as int]
|
||||
else:
|
||||
if (_property as String).is_valid_integer():
|
||||
return get_row(_property as int)
|
||||
if propertystr.is_valid_integer():
|
||||
return get_row(propertystr as int)
|
||||
|
Loading…
Reference in New Issue
Block a user