Add spinner
This commit is contained in:
1 parent
b739742006
commit
58d2fc7041
5 files changed
+32
-13
No files matched your search
@@ -10,6 +10,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||||||
- Support for web request body parsing
|
- Support for web request body parsing
|
||||||
- Error dialog for video load fail
|
- Error dialog for video load fail
|
||||||
- SponsorBlock sections and category info
|
- SponsorBlock sections and category info
|
||||||
|
- Loading spinner
|
||||||
|
|
||||||
### Fixed
|
### Fixed
|
||||||
- Bug where playing and exiting a video too quickly would cause the video to play in the background.
|
- Bug where playing and exiting a video too quickly would cause the video to play in the background.
|
||||||
|
|||||||
@@ -0,0 +1,26 @@
|
|||||||
|
function Init()
|
||||||
|
m.busySpinner = m.top.findNode("busySpinner")
|
||||||
|
m.busyspinner.poster.width = 150
|
||||||
|
m.busyspinner.poster.height = 150
|
||||||
|
m.busyspinner.poster.observeField("loadStatus", "PositionSpinner")
|
||||||
|
m.busySpinner.poster.uri = "pkg:/images/spinner.png"
|
||||||
|
m.top.observeField("visible", "OnVisibleChange")
|
||||||
|
end function
|
||||||
|
|
||||||
|
function PositionSpinner()
|
||||||
|
if m.busyspinner.poster.loadStatus = "ready"
|
||||||
|
centerx = (1280 - m.busyspinner.poster.width) / 2
|
||||||
|
centery = (720 - m.busyspinner.poster.height) / 2
|
||||||
|
m.busyspinner.translation = [centerx, centery]
|
||||||
|
m.busyspinner.visible = true
|
||||||
|
end if
|
||||||
|
end function
|
||||||
|
|
||||||
|
function OnVisibleChange()
|
||||||
|
m.busyspinner.visible = m.top.visible
|
||||||
|
if m.busyspinner.visible
|
||||||
|
m.busyspinner.control = "start"
|
||||||
|
else
|
||||||
|
m.busyspinner.control = "stop"
|
||||||
|
end if
|
||||||
|
end function
|
||||||
@@ -6,17 +6,11 @@
|
|||||||
width="1280"
|
width="1280"
|
||||||
height="720"
|
height="720"
|
||||||
color="#000000"
|
color="#000000"
|
||||||
opacity="0.5"
|
opacity="0.5">
|
||||||
>
|
<BusySpinner
|
||||||
<Label
|
id="busySpinner"
|
||||||
text="Loading..."
|
inheritParentOpacity="false"
|
||||||
width="1280"
|
spinInterval="0.8" />
|
||||||
height="720"
|
|
||||||
translation="[0, 0]"
|
|
||||||
horizAlign="center"
|
|
||||||
vertAlign="center"
|
|
||||||
font="font:MediumBoldSystemFont"
|
|
||||||
/>
|
|
||||||
</Rectangle>
|
</Rectangle>
|
||||||
</children>
|
</children>
|
||||||
</component>
|
</component>
|
||||||
@@ -29,7 +29,6 @@
|
|||||||
horizAlign="center"
|
horizAlign="center"
|
||||||
vertAlign="center"
|
vertAlign="center"
|
||||||
font="font:SmallestSystemFont"
|
font="font:SmallestSystemFont"
|
||||||
inheritParentOpacity="true"
|
|
||||||
/>
|
/>
|
||||||
</Rectangle>
|
</Rectangle>
|
||||||
<Rectangle
|
<Rectangle
|
||||||
@@ -46,7 +45,6 @@
|
|||||||
horizAlign="center"
|
horizAlign="center"
|
||||||
vertAlign="center"
|
vertAlign="center"
|
||||||
font="font:SmallestBoldSystemFont"
|
font="font:SmallestBoldSystemFont"
|
||||||
inheritParentOpacity="true"
|
|
||||||
text="LIVE"
|
text="LIVE"
|
||||||
/>
|
/>
|
||||||
</Rectangle>
|
</Rectangle>
|
||||||
|
|||||||
Binary file not shown.
|
After Width: | Height: | Size: 18 KiB |
Reference in new issue
Block a user