Skinnable canvas window: Difference between revisions
Jump to navigation
Jump to search
(Created page with "{{Template:Canvas Navigation}} skinnable.nas implements the skinnable class. == Constructor == === new: func(size,title) === '''size''' mandatory as [width, height] vector,...") |
|||
Line 4: | Line 4: | ||
== Constructor == | == Constructor == | ||
=== new: func(size,title) === | === new: func(size,title) === | ||
'''size''' mandatory as [width, height] vector, the window dimension.<br /> | '''size''' mandatory as [''width, height''] vector, the window dimension.<br /> | ||
'''title''' optional as string , the window title. Empty by default.<br /> | '''title''' optional as string , the window title. Empty by default.<br /> | ||
: e.g. var sk = canvas.skinnable.new([575,290]); | : e.g. <syntaxhighlight>var sk = canvas.skinnable.new([575,290]);</syntaxhighlight> | ||
== Methods == | == Methods == |
Revision as of 20:18, 1 March 2018
The FlightGear forum has a subforum related to: Canvas |
skinnable.nas implements the skinnable class.
Constructor
new: func(size,title)
size mandatory as [width, height] vector, the window dimension.
title optional as string , the window title. Empty by default.
- e.g.
var sk = canvas.skinnable.new([575,290]);
Methods
Skinnable objects includes 2 methods:
addSkin: func(filename)
filename as the absolute file path. The file must be a .png or a .jpg image.
- e.g. sk.addSkin("/foo/osc2.png"));