28 lines
1 KiB
Text
28 lines
1 KiB
Text
-- GUI over the disc: an RmlUi document (testScripts/scene36.rml styled by scene36.rcss on top of
|
|
-- the shipped Singe/gui.rcss) rendered into a GUI the size of the overlay and composited over it
|
|
-- every frame; a heading, a nine slice panel from crate.png, a scrolling list and a progress bar
|
|
-- animated from RCSS, plus a line the script rewrites each frame through guiSetValue.
|
|
local font = fontLoad("Singe/FreeSansBold.ttf", 24)
|
|
local frames = 0
|
|
|
|
fontSelect(font)
|
|
overlaySetResolution(discGetWidth(), discGetHeight())
|
|
|
|
local gui = guiNew(overlayGetWidth(), overlayGetHeight())
|
|
local doc = guiLoad(gui, "testScripts/scene36.rml")
|
|
|
|
function onOverlayUpdate()
|
|
frames = frames + 1
|
|
overlayClear()
|
|
colorForeground(255, 255, 255, 255)
|
|
fontPrint(10, overlayGetHeight() - 30, "scene36 frame " .. frames .. " (overlay text under the GUI)")
|
|
guiSetValue(gui, doc, "frame", "frame " .. frames)
|
|
guiDraw(gui)
|
|
if frames == 40 or frames == 110 then
|
|
singeScreenshot()
|
|
end
|
|
if frames == 130 then
|
|
singeQuit()
|
|
end
|
|
return OVERLAY_UPDATED
|
|
end
|