always focus dscr, formatting

This commit is contained in:
sevenrats 2023-02-04 12:22:49 -05:00
parent fcf0b9fb0e
commit 7809b2e261
2 changed files with 9 additions and 31 deletions

View File

@ -6,7 +6,6 @@ sub init()
m.favBtn = m.top.findNode("favorite-button") m.favBtn = m.top.findNode("favorite-button")
m.extrasGrp = m.top.findNode("extrasGrp") m.extrasGrp = m.top.findNode("extrasGrp")
m.extrasGrp.opacity = 1.0 m.extrasGrp.opacity = 1.0
m.dscr.observeField("isTextEllipsized", "onEllipsisChanged")
createDialogPallete() createDialogPallete()
m.top.optionsAvailable = false m.top.optionsAvailable = false
end sub end sub
@ -48,26 +47,19 @@ sub loadPerson()
m.vidsList.callFunc("loadPersonVideos", m.top.Id) m.vidsList.callFunc("loadPersonVideos", m.top.Id)
setFavoriteColor() setFavoriteColor()
m.favBtn.setFocus(true) if not m.favBtn.hasFocus() then dscrShowFocus()
end sub
sub onEllipsisChanged()
if m.dscr.isTextEllipsized
dscrShowFocus()
end if
end sub end sub
sub dscrShowFocus() sub dscrShowFocus()
if m.dscr.isTextEllipsized m.dscr.setFocus(true)
m.dscr.setFocus(true) m.dscr.opacity = 1.0
m.dscr.opacity = 1.0 m.top.findNode("dscrBorder").color = "#d0d0d0ff"
m.top.findNode("dscrBorder").color = "#d0d0d0ff"
end if
end sub end sub
sub onButtonGroupEscaped() sub onButtonGroupEscaped()
key = m.btnGrp.escape key = m.btnGrp.escape
if key = "down" if key = "down"
print "key down"
m.dscr.setFocus(true) m.dscr.setFocus(true)
m.dscr.opacity = 1.0 m.dscr.opacity = 1.0
m.top.findNode("dscrBorder").color = "#d0d0d0ff" m.top.findNode("dscrBorder").color = "#d0d0d0ff"
@ -108,9 +100,7 @@ function onKeyEvent(key as string, press as boolean) as boolean
else if m.vidsList.isInFocusChain() and m.vidsList.itemFocused = 0 else if m.vidsList.isInFocusChain() and m.vidsList.itemFocused = 0
m.top.findNode("VertSlider").reverse = true m.top.findNode("VertSlider").reverse = true
m.top.findNode("pplAnime").control = "start" m.top.findNode("pplAnime").control = "start"
m.dscr.setFocus(true) dscrShowFocus()
m.dscr.opacity = 1.0
m.top.findNode("dscrBorder").color = "#d0d0d0ff"
return true return true
end if end if
end if end if
@ -139,13 +129,6 @@ sub createFullDscrDlg()
dlg.overview = m.dscr.text dlg.overview = m.dscr.text
m.fullDscrDlg = dlg m.fullDscrDlg = dlg
m.top.getScene().dialog = 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 end sub

View File

@ -23,14 +23,9 @@
<Poster id="personImage" <Poster id="personImage"
width="400" height="600" /> width="400" height="600" />
<LayoutGroup id="vertSpacer" layoutDirection="vert" itemSpacings="[24]"> <LayoutGroup id="vertSpacer" layoutDirection="vert" itemSpacings="[24]">
<LayoutGroup id="dataGroup>" layoutDirection="vert" <LayoutGroup id="dataGroup>" layoutDirection="vert" translation="[450,180]">
translation="[450,180]"> <Rectangle id="dscrBorder" height="600" width="1322" color="0x202020ff" visible="true">
<Rectangle id="dscrBorder" <Rectangle id='dscrRect' translation="[3, 3]" height="594" width="1316" color="0x202020ff">
height="600" width="1322"
color="0x202020ff">
<Rectangle id='dscrRect' translation="[3, 3]"
height="594" width="1316"
color="0x202020ff">
<Label id="description" <Label id="description"
height="582" width="1280" wrap="true" translation="[18, 15]" height="582" width="1280" wrap="true" translation="[18, 15]"
font="font:SmallestSystemFont" color="#e4e4e4ff" ellipsisText=" ... (-OK- for More)" /> font="font:SmallestSystemFont" color="#e4e4e4ff" ellipsisText=" ... (-OK- for More)" />