[skip ci] video player button focus nudge
This commit is contained in:
1 parent
21c0900fac
commit
29dd94352e
9 files changed
+93
-4
No files matched your search
@@ -69,6 +69,19 @@ namespace Tests
|
||||
m.assertEqual(anim.control, "start")
|
||||
end function
|
||||
|
||||
@it("a nudge with an out-of-range focusedIndex is a safe no-op")
|
||||
function _()
|
||||
m.top.rowFocused = true
|
||||
m.top.focusedIndex = 5
|
||||
playAnim = m.top.findNode("PlayPauseButton").findNode("nudgeAnim")
|
||||
minimizeAnim = m.top.findNode("MinimizeButton").findNode("nudgeAnim")
|
||||
playAnim.control = "stop"
|
||||
minimizeAnim.control = "stop"
|
||||
m.top.nudge = true
|
||||
m.assertEqual(playAnim.control, "stop")
|
||||
m.assertEqual(minimizeAnim.control, "stop")
|
||||
end function
|
||||
|
||||
@describe("play/pause icon tracks the play state")
|
||||
|
||||
@it("shows the pause icon while playing, the play icon while paused")
|
||||
|
||||
@@ -18,7 +18,8 @@
|
||||
<field id="focusedIndex" type="integer" value="0" />
|
||||
<field id="playing" type="boolean" value="true" /> <!-- selects the play vs pause icon -->
|
||||
<field id="buttonCount" type="integer" value="0" /> <!-- read-only: set in Init from m.buttons -->
|
||||
<!-- pulse the focused button's scale nudge (a Left/Right that couldn't move focus). -->
|
||||
<!-- pulse the focused button's scale nudge (a press that couldn't move focus: Left/Right clamped at
|
||||
the row's ends, Up at the top tier). -->
|
||||
<field id="nudge" type="boolean" alwaysNotify="true" />
|
||||
</interface>
|
||||
<children>
|
||||
|
||||
Reference in new issue
Block a user