initial player stuff
This commit is contained in:
parent
4b60ece582
commit
5100d91a72
38 changed files with 1107 additions and 93 deletions
|
@ -2,6 +2,7 @@
|
|||
|
||||
var Page = require("../lib/wModel/page");
|
||||
var String = require("../lib/wModel/string");
|
||||
var Button = require("../lib/wModel/button");
|
||||
|
||||
var Address = require("../lib/wType/address");
|
||||
|
||||
|
@ -13,6 +14,16 @@ var TestPage = Page.inherit({
|
|||
var header = new String(this._address["+"](new Address(["message"])), "This is a test page");
|
||||
header.addProperty("fontFamily", "casualFont");
|
||||
this.addItem(header, 0, 0, 1, 1, Page.Aligment.CenterTop);
|
||||
|
||||
this._button = new Button(this._address["+"](new Address(["testButton"])));
|
||||
this._button.setLabel("Push me");
|
||||
this._button.on("activated", this._onActivate, this);
|
||||
this.addItem(this._button, 1, 0, 1, 1, Page.Aligment.CenterTop);
|
||||
},
|
||||
"_onActivate": function() {
|
||||
this.trigger("serviceMessage", "Button works!");
|
||||
this._button.setEnabled(false);
|
||||
setTimeout(this._button.setEnabled.bind(this._button, true), 3000);
|
||||
}
|
||||
});
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue