2020-12-06 09:42:02 -05:00
|
|
|
function onload()
|
|
|
|
b_display = { index = 0,
|
2020-12-06 09:42:32 -05:00
|
|
|
click_function = 'updateDisplay',
|
|
|
|
label = self.getName(),
|
|
|
|
function_owner = self,
|
|
|
|
position = {0, 1.4, 0},
|
|
|
|
rotation = {0, 270, 0},
|
|
|
|
width = 500,
|
|
|
|
height = 200,
|
2020-12-06 09:42:02 -05:00
|
|
|
font_size = 200}
|
|
|
|
|
2020-12-06 09:42:32 -05:00
|
|
|
local description = string.match(self.getDescription(), '%d+')
|
|
|
|
if description != '' and type(tonumber(description)) == 'number' then
|
|
|
|
b_display.font_size = tonumber(description)
|
2020-12-06 09:42:02 -05:00
|
|
|
end
|
2020-12-06 09:42:32 -05:00
|
|
|
|
|
|
|
self.createButton(b_display)
|
2020-12-06 09:42:02 -05:00
|
|
|
end
|
|
|
|
|
2020-12-06 09:42:32 -05:00
|
|
|
function updateDisplay()
|
2020-12-06 09:42:02 -05:00
|
|
|
b_display.label = self.getName()
|
|
|
|
|
2020-12-06 09:42:32 -05:00
|
|
|
local description = string.match(self.getDescription(), '%d+')
|
|
|
|
if description != '' and type(tonumber(description)) == 'number' then
|
|
|
|
b_display.font_size = tonumber(description)
|
2020-12-06 09:42:02 -05:00
|
|
|
end
|
2020-12-06 09:42:32 -05:00
|
|
|
|
|
|
|
self.editButton(b_display)
|
2020-12-06 09:42:02 -05:00
|
|
|
end
|