-- GUI clip masks: testScripts/scene40.rml (styled by scene40.rcss on top of the shipped -- Singe/gui.rcss) in a GUI the size of the overlay, over the disc. A rounded list whose rows -- must be cut off at the corners, a panel rotated 8 degrees with overflow hidden and a block -- larger than it inside, and a rounded child clipped inside a rounded parent (nested masks). -- Between the two screenshots the list scrolls through RmlUi's Lua API, so the second shows -- different rows against the same corners. 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/scene40.rml") function onOverlayUpdate() frames = frames + 1 overlayClear() colorForeground(255, 255, 255, 255) fontPrint(10, overlayGetHeight() - 30, "scene40 frame " .. frames .. " (overlay text under the GUI)") guiSetValue(gui, doc, "frame", "frame " .. frames) guiDraw(gui) if frames == 40 then singeScreenshot() end if frames == 60 then rmlui.contexts["gui0"].documents["scene40"]:GetElementById("list").scroll_top = 150 end if frames == 110 then singeScreenshot() end if frames == 130 then singeQuit() end return OVERLAY_UPDATED end