specific graphics element types rather than graphics_element
This commit is contained in:
@@ -18,7 +18,7 @@ local ALIGN = core.ALIGN
|
||||
local cpair = core.cpair
|
||||
|
||||
-- create a pocket list entry
|
||||
---@param parent graphics_element parent
|
||||
---@param parent ListBox parent
|
||||
---@param id integer PKT session ID
|
||||
local function init(parent, id)
|
||||
local s_hi_box = style.fp_theme.highlight_box
|
||||
|
||||
@@ -37,7 +37,7 @@ local function init(main)
|
||||
ping.register(facility.ps, "sv_ping", ping.update)
|
||||
datetime.register(facility.ps, "date_time", datetime.set_value)
|
||||
|
||||
---@type graphics_element, graphics_element, graphics_element, graphics_element
|
||||
---@type Div, Div, Div, Div
|
||||
local uo_1, uo_2, uo_3, uo_4
|
||||
|
||||
local cnc_y_start = 3
|
||||
|
||||
@@ -8,17 +8,17 @@ local util = require("scada-common.util")
|
||||
local pgi = {}
|
||||
|
||||
local data = {
|
||||
pkt_list = nil, ---@type nil|graphics_element
|
||||
pkt_list = nil, ---@type ListBox|nil
|
||||
pkt_entry = nil, ---@type function
|
||||
-- session entries
|
||||
s_entries = {
|
||||
pkt = {} ---@type graphics_element[]
|
||||
pkt = {} ---@type Div[]
|
||||
}
|
||||
}
|
||||
|
||||
-- link list boxes
|
||||
---@param pkt_list graphics_element pocket list element
|
||||
---@param pkt_entry function pocket entry constructor
|
||||
---@param pkt_list ListBox pocket list element
|
||||
---@param pkt_entry fun(parent: ListBox, id: integer) : Div pocket entry constructor
|
||||
function pgi.link_elements(pkt_list, pkt_entry)
|
||||
data.pkt_list = pkt_list
|
||||
data.pkt_entry = pkt_entry
|
||||
|
||||
Reference in New Issue
Block a user