|
|
@@ -138,5 +138,37 @@ exports.update = function() {
|
|
|
|
|
|
}
|
|
|
|
|
|
+createInstructions();
|
|
|
+
|
|
|
+function createInstructions() {
|
|
|
+
|
|
|
+ var view = new Atomic.UIView();
|
|
|
+
|
|
|
+ // Create a layout, otherwise child widgets won't know how to size themselves
|
|
|
+ // and would manually need to be sized
|
|
|
+ var layout = new Atomic.UILayout();
|
|
|
+
|
|
|
+ // specify the layout region
|
|
|
+ layout.rect = view.rect;
|
|
|
+
|
|
|
+ view.addChild(layout);
|
|
|
+
|
|
|
+ // we're laying out on the X axis so "position" controls top and bottom alignment
|
|
|
+ layout.layoutPosition = Atomic.UI_LAYOUT_POSITION_RIGHT_BOTTOM;
|
|
|
+ // while "distribution" handles the Y axis
|
|
|
+ layout.layoutDistributionPosition = Atomic.UI_LAYOUT_DISTRIBUTION_POSITION_RIGHT_BOTTOM;
|
|
|
+
|
|
|
+ var fd = new Atomic.UIFontDescription();
|
|
|
+ fd.id = "Vera";
|
|
|
+ fd.size = 18;
|
|
|
+
|
|
|
+ var scoreText = new Atomic.UIEditField();
|
|
|
+ scoreText.fontDescription = fd;
|
|
|
+ scoreText.readOnly = true;
|
|
|
+ scoreText.multiline = true;
|
|
|
+ scoreText.adaptToContentSize = true;
|
|
|
+ scoreText.text = "BunnyMark\nLeft Click - Spawn Bunnies";
|
|
|
+ layout.addChild(scoreText);
|
|
|
+ }
|
|
|
|
|
|
;
|