I have a customed Container class as following:
CODE
var Toolbar = new KONtx.Class({
ClassName: 'Toolbar',
Extends: KONtx.element.Container,
config: {
},
initialize: function() {
},
initView: function() {
},
createView: function() {
var self = this;
// set the dimension of this toolbar
this.width = $_scale(960);
this.height = $_scale(38);
this.hOffset = $_scale(0);
this.vOffset = $_scale(0);
//create a background image contain the RallyCast image right in the middle
this.controls.centeredLogo = new KONtx.element.Image({
src: "./toolbar.png",
styles: {
width: $_scale(960),
height: $_scale(38),
hOffset: $_scale(0),
vOffset: $_scale(0)
}
}).appendTo(this);
},
updateView: function() {
}
});
Here is the Fullscreen view:
CODE
var Dashboard = new KONtx.Class({
ClassName: 'Dashboard',
Extends: KONtx.system.FullscreenView,
config:{
},
initialize: function() {
this.parent();
},
initView: function() {
},
createView: function() {
this.passthroughVideoEnabled = true;
this.setTVViewportSize(0, 0, 1920, 1080);
/*
If I uncomment this snippet, the image is show up in the fullscreen view nicely!!
this.controls.centeredLogo = new KONtx.element.Image({
src: "./toolbar.png",
styles: {
width: $_scale(960),
height: $_scale(38),
hOffset: $_scale(0),
vOffset: $_scale(0)
}
}).appendTo(this);
*/
var toolbar = new Toolbar().appendTo(this);
},
updateView: function() {
}
});
Then in my code I load the fullscreen view with
CODE
KONtx.application.loadView("view-Dashboard"); //view-Dashboard is the view id
Sorry for my newbie question, I'm totally new with the YDK!
Any help would be appreciated!