Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- TestScene = Scene.extend({
- contextMenu: null,
- init: function( title ) {
- this.parent();
- this.clearColor = '#422';
- ig.input.bind( ig.KEY.MOUSE1, 'mouseClick' )
- var choices = [];
- choices = [
- new MenuItem("Start",function(){console.log("start selected");}),
- new MenuItem("Options",function(){console.log("options selected");}),
- new MenuItem("Help",function(){console.log("help selected");}),
- new MenuItem("Credits",function(){console.log("credits selected");})
- ];
- var menufont = new ig.Font( 'media/04b03.font.png' );
- this.contextMenu = new Menu(
- menufont,
- choices
- );
- },
- update: function() {
- // Update all entities and backgroundMaps
- this.parent();
- },
- draw: function() {
- // Draw all entities and backgroundMaps
- this.parent();
- this.contextMenu.draw(100, 100);
- }
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement