Files
PRD_TU_MP550/ems_g.gd
2024-12-13 06:45:07 +03:00

40 lines
1.2 KiB
GDScript

extends Panel
# Called when the node enters the scene tree for the first time.
func _ready() -> void:
var node_select1 = $scroll1/table1
var EMS_G_TABLE: Array
for i_row in Constants.INPUT_EMS_G.size()+1:
var column: Array
for out_colum in Constants.OUT_EMS_G.size()+1:
if out_colum > 0 and i_row > 0:
column.append(Constants.Switch)
else:
column.append(Constants.TableNode)
EMS_G_TABLE.append(column)
draw_tabl(node_select1, EMS_G_TABLE, EMS_G_TABLE.size())
node_select1.get_node2(0, 0).text = 'XЭ ТРИ'
for i in Constants.INPUT_EMS_G.size():
node_select1.get_node2(0, i+1).text = Constants.INPUT_EMS_G[i]
for i in Constants.OUT_EMS_G.size():
node_select1.get_node2(i+1, 0).text = Constants.OUT_EMS_G[i]
var columns_min_size: Array
for i in EMS_G_TABLE.size():
columns_min_size.append(70)
node_select1.set_columns_min_size(columns_min_size)
func draw_tabl(tbl, row: Array, count_row: int):
for i_row in count_row:
tbl.add_row(row[i_row])
# Called every frame. 'delta' is the elapsed time since the previous frame.
func _process(delta: float) -> void:
pass