OSL ‐ Example Application - Mistium/Origin-OS GitHub Wiki
window "show"
// this command makes the background of the window visible to the user and makes it draggable
variable = 0
// sets variable to 0
mainloop:
// anything after "mainloop" will be run every frame
// anything before "mainloop" will be run only once
variable = variable + 1
// sets variable to itself + 1
goto 0 0
// sets the location for the next ui command to be drawn
colour #fff ⚪
// sets the colour to white
text variable 10
// this renders text that says the value of "variable" at 0,0 that has the colour white and a size of 10
import "win-buttons"
Starting a line with "//"
means that the OSL interpreter will not run that line and you can write whatever you want there
import runs another osl file, in this case, running "win-buttons"
adds these buttons to your window: