Cleaned up JFMessageDialog
This commit is contained in:
parent
84f4baebd1
commit
23c468977f
|
@ -1,5 +1,9 @@
|
|||
sub init()
|
||||
m.top.findNode("optionList").setFocus(true)
|
||||
options = m.top.findNode("optionList")
|
||||
options.focusBitmapBlendColor="0x0cb0e8"
|
||||
options.color="0xffffff"
|
||||
options.focusedColor="0xffffff"
|
||||
options.setFocus(true)
|
||||
end sub
|
||||
|
||||
function onKeyEvent(key as string, press as boolean) as boolean
|
||||
|
@ -43,7 +47,7 @@ sub redraw()
|
|||
text.width = textWidth
|
||||
text.numLines = int(fontWidth / textWidth) + 1
|
||||
text.translation = [ border , border ]
|
||||
textHeight = (fontHeight * text.numLines) + itemSpacing
|
||||
textHeight = (fontHeight * text.numLines)
|
||||
else
|
||||
textHeight = 0
|
||||
itemSpacing = border
|
||||
|
@ -51,6 +55,7 @@ sub redraw()
|
|||
|
||||
options.translation = [ border * 2, textHeight + itemSpacing]
|
||||
options.itemSize = [ boxWidth - ( border * 4 ), optionHeight ]
|
||||
options.itemSpacing = "[0,20]"
|
||||
|
||||
boxHeight = options.translation[1] + (options.itemSize[1] * options.numRows ) + (options.itemSpacing[1] * (options.NumRows - 1)) + border
|
||||
|
||||
|
|
|
@ -3,14 +3,12 @@
|
|||
<children>
|
||||
<Poster
|
||||
id="dialogBackground"
|
||||
width="800"
|
||||
height="500"
|
||||
uri="pkg:/images/dialog.9.png"
|
||||
blendColor="#000000"
|
||||
translation="[0, 0]"
|
||||
/>
|
||||
<Label id="messageText" width="720" horizAlign="center" wrap="true" />
|
||||
<LabelList id="optionList" itemSize="[650,80]" vertFocusAnimationStyle="floatingFocus" focusBitmapBlendColor="0x0cb0e8" color="0xffffff" focusedColor="0xffffff" textHorizAlign="center" itemSpacing="[0,20]" translation="[40,200]">
|
||||
<Label id="messageText" horizAlign="center" wrap="true" />
|
||||
<LabelList id="optionList" vertFocusAnimationStyle="floatingFocus" textHorizAlign="center">
|
||||
<ContentNode id = "content" role = "content"></ContentNode>
|
||||
</LabelList>
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user