jf-roku/components/config/ConfigItem.brs

37 lines
669 B
Plaintext
Raw Normal View History

2019-05-03 12:48:59 +00:00
sub init()
2021-07-09 20:08:32 +00:00
m.name = m.top.findNode("label")
m.value = m.top.findNode("value")
2019-05-03 12:48:59 +00:00
2021-07-09 20:08:32 +00:00
m.name.width = 240
m.name.height = 75
2019-05-03 12:48:59 +00:00
2021-07-09 20:08:32 +00:00
m.name.vertAlign = "center"
m.name.horizAlign = "center"
2019-05-03 12:48:59 +00:00
2021-07-09 20:08:32 +00:00
m.value.hintText = tr("Enter a value...")
m.value.maxTextLength = 120
2019-05-03 12:48:59 +00:00
end sub
sub itemContentChanged()
2021-07-09 20:08:32 +00:00
data = m.top.itemContent
2019-05-03 12:48:59 +00:00
2021-07-09 20:08:32 +00:00
m.name.text = data.label
if data.type = "password"
m.value.secureMode = true
end if
2019-05-03 12:48:59 +00:00
2021-07-09 20:08:32 +00:00
m.value.text = data.value
2019-05-03 12:48:59 +00:00
end sub
sub setColors()
2021-07-09 20:08:32 +00:00
if m.top.itemHasFocus
color = "#101010FF"
else
color = "#ffffffFF"
end if
m.name.color = color
m.value.textColor = color
2019-05-03 12:48:59 +00:00
end sub