Canvas snippets

From FlightGear wiki
Revision as of 19:10, 14 September 2014 by Hooray (talk | contribs) (by popular request: Starting "the definite Copy & Paste guide to Canvas" :-))
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
This article is a stub. You can help the wiki by expanding it.
WIP.png Work in progress
This article or section will be worked on in the upcoming hours or days.
See history for the latest developments.

Creating a Canvas GUI Window

var window = canvas.Window.new([320,160],"dialog");
var myCanvas = window.createCanvas().setColorBackground(1,1,1,1);
var root = myCanvas.createGroup();