Hello, World!

For a more detailed walk-through, take a look at the Hello, World! Guide.

Import the TextView class to use locally.

import ui.TextView as TextView;

Class: Application

All user applications inherit from GC.Application.

exports = Class(GC.Application, function () {

The initUI function is called after the scene graph has been created.

	this.initUI = function () {

Create a new TextView instance

		var textview = new TextView({

Once attached to the view hierarchy, the view is a part of the scene graph and will be rendered.

			superview: this.view,

The layout system is explained in detail in the Designing User Interfaces Guide.

			layout: "box",

The text to display on screen

			text: "Hello, world!",
			color: "blue"
		});
	};

The launchUI function is executed when the game is ready, and the splash screen has been removed.

	this.launchUI = function () {};
});