Add basic instructions

This commit is contained in:
Brahim Hadriche committed 2022-11-06 16:48:51 -05:00
1 parent 59a2e1037c
commit efa7c6b923
3 files changed
+38 -29

No files matched your search

+1
View File
@@ -14,6 +14,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Video information (Author, view count, release date)
- Trending categories, subscription view, and custom (hardcoded) search categories
- User Playlist support
- Added basic instructions
## [0.1.0] - 2022-10-30
### Added
+11 -22
View File
@@ -1,28 +1,17 @@
' Credits to https://github.com/kazuhikoarase/qrcode-generator/pull/110
import "pkg:/source/services/Invidious.bs"
sub init()
print "Init: "; m.top.subtype()
m.instructions = m.top.findNode("instructions")
timer = CreateObject("roTimespan")
timer.mark()
text = "- Scan the QR Code" + chr(10)
text += "- Login (Create account if needed)" + chr(10)
text += "- Scan the QR Code again" + chr(10)
text += "- Click ""Authorize""" + chr(10)
text += "- If the error ""Invalid signature"" shows, press back and ""Authorize"" again" + chr(10)
text += "- Your TV should go to home screen automatically" + chr(10)
text += chr(10) + chr(10) + chr(10)
text += "Invidious instance: " + RokuYoutube.Services.Invidious.GetCurrentHost()
m.QRCode = createObject("roSGNode", "TestQRCode")
print "Creating QRCode took:", timer.TotalMilliseconds().ToStr();"ms"
timer.mark()
m.QRPoster = m.top.findNode("TestQRPoster")
m.QRPoster.qrcode = m.QRCode
print "Creating PNG took:", timer.TotalMilliseconds().ToStr();"ms"
print "QRCode image created as:", m.QRPoster.uri
timer.mark()
m.QRPrinter = createObject("roSGNode", "QRPrinter")
m.QRPrinter.qrcode = m.QRCode
print m.QRPrinter.qrstring
print "Printing to console took:", timer.TotalMilliseconds().ToStr();"ms"
m.instructions.text = text
end sub
+26 -7
View File
@@ -1,11 +1,30 @@
<?xml version="1.0" encoding="utf-8" ?>
<component name="QRTestScene" extends="Scene">
<?xml version='1.0' encoding='utf-8'?>
<component
name='QRTestScene'
extends='Scene'>
<children>
<!-- This is example use of QRPoster: show QRCode centered on screen -->
<QRPoster id="TestQRPoster"
loadWidth="500"
loadHeight="500"
loadPadding="20"
translation="[390, 110]" />
<QRPoster
id='TestQRPoster'
loadWidth='500'
loadHeight='500'
loadPadding='20'
translation='[100, 110]' />
<Label
id='instructionsTitle'
height='50'
width='500'
text='Instructions'
font='font:MediumBoldSystemFont'
wrap='true'
translation='[650,110]' />
<Label
id='instructions'
height='500'
width='500'
font='font:MediumSystemFont'
wrap='true'
translation='[650,160]' />
</children>
</component>