fix focus
This commit is contained in:
parent
dd4073d9c3
commit
2fb8d7fd12
|
@ -2,6 +2,7 @@ sub init()
|
|||
m.dscr = m.top.findNode("description")
|
||||
m.vidsList = m.top.findNode("extrasGrid")
|
||||
m.btnGrp = m.top.findNode("buttons")
|
||||
m.btnGrp.observeField("escape", "onButtonGroupEscaped")
|
||||
m.favBtn = m.top.findNode("favorite-button")
|
||||
m.extrasGrp = m.top.findNode("extrasGrp")
|
||||
m.top.findNode("VertSlider").keyValue = "[[30, 998], [30, 789], [30, 580], [30,371 ], [30, 162]]"
|
||||
|
@ -66,11 +67,20 @@ sub dscrShowFocus()
|
|||
end if
|
||||
end sub
|
||||
|
||||
sub onButtonGroupEscaped()
|
||||
key = m.btnGrp.escape
|
||||
if key = "down"
|
||||
m.dscr.setFocus(true)
|
||||
m.dscr.opacity = 1.0
|
||||
m.top.findNode("dscrBorder").color = "#d0d0d0ff"
|
||||
end if
|
||||
end sub
|
||||
|
||||
function onKeyEvent(key as string, press as boolean) as boolean
|
||||
if not press then return false
|
||||
|
||||
if key = "OK"
|
||||
if m.dscr.hasFocus() and m.dscr.isTextEllipsized
|
||||
if m.dscr.hasFocus()
|
||||
createFullDscrDlg()
|
||||
return true
|
||||
end if
|
||||
|
@ -83,12 +93,7 @@ function onKeyEvent(key as string, press as boolean) as boolean
|
|||
end if
|
||||
|
||||
if key = "down"
|
||||
if m.favBtn.hasFocus()
|
||||
m.dscr.setFocus(true)
|
||||
m.dscr.opacity = 1.0
|
||||
m.top.findNode("dscrBorder").color = "#d0d0d0ff"
|
||||
return true
|
||||
else if m.dscr.hasFocus()
|
||||
if m.dscr.hasFocus()
|
||||
m.dscr.opacity = 0.6
|
||||
m.top.findNode("dscrBorder").color = "#data202020ff"
|
||||
m.vidsList.setFocus(true)
|
||||
|
@ -130,19 +135,13 @@ end sub
|
|||
|
||||
sub createFullDscrDlg()
|
||||
dlg = CreateObject("roSGNode", "OverviewDialog")
|
||||
dlg.Title = tr("Press 'OK' to Close")
|
||||
dlg.width = 1290
|
||||
dlg.Title = m.top.itemContent.json.Name
|
||||
dlg.width = 1400
|
||||
dlg.palette = m.dlgPalette
|
||||
dlg.overview = [m.dscr.text]
|
||||
m.fullDscrDlg = dlg
|
||||
m.top.getScene().dialog = dlg
|
||||
border = createObject("roSGNode", "Poster")
|
||||
border.uri = "pkg:/images/hd_focul_9.png"
|
||||
border.blendColor = "#c9c9c9ff"
|
||||
border.width = dlg.width + 6
|
||||
border.height = dlg.height + 6
|
||||
border.translation = [dlg.translation[0] - 3, dlg.translation[1] - 3]
|
||||
border.visible = true
|
||||
|
||||
end sub
|
||||
|
||||
sub createDialogPallete()
|
||||
|
|
Loading…
Reference in New Issue
Block a user