diff --git a/app/templates/game-menu/choose-hero-view.jade b/app/templates/game-menu/choose-hero-view.jade index c2d7fd5c7..961ac33a2 100644 --- a/app/templates/game-menu/choose-hero-view.jade +++ b/app/templates/game-menu/choose-hero-view.jade @@ -1,17 +1,18 @@ h3(data-i18n="play_level.reload_title") Reload All Code? p(data-i18n="play_level.reload_really") Are you sure you want to reload this level back to the beginning? + +if showDevBits + p + a(href='#', data-dismiss="modal", aria-hidden="true", data-i18n="play_level.reload_confirm").btn.btn-primary#restart-level-confirm-button Reload All -p - a(href='#', data-dismiss="modal", aria-hidden="true", data-i18n="play_level.reload_confirm").btn.btn-primary#restart-level-confirm-button Reload All - -img(src="/images/pages/game-menu/choose-hero-stub.png") - -div(data-i18n="choose_hero.temp") Temp - -h3 Interactions -ul - li Click a language button. Click ‘save as default language’ if you want to carry it over to following levels. - li Click a hero. Right here it’s just a simple list on the left with a picture of the hero on the right. Might instead have a carousel on the left and stats on the right. Basically this needs more thought because it’s starting to look like the inventory screen, but this is more for later. Might also have the wizard coloring used here for heroes. - li Click equip and it puts in basically the inventory screen view to choose which items to start the level with. - li Click begin. A new LevelSession is created. LevelLoader is given the new/updated LevelSession, new data is loaded, world reruns. + img(src="/images/pages/game-menu/choose-hero-stub.png") + + div(data-i18n="choose_hero.temp") Temp + + h3 Interactions + ul + li Click a language button. Click ‘save as default language’ if you want to carry it over to following levels. + li Click a hero. Right here it’s just a simple list on the left with a picture of the hero on the right. Might instead have a carousel on the left and stats on the right. Basically this needs more thought because it’s starting to look like the inventory screen, but this is more for later. Might also have the wizard coloring used here for heroes. + li Click equip and it puts in basically the inventory screen view to choose which items to start the level with. + li Click begin. A new LevelSession is created. LevelLoader is given the new/updated LevelSession, new data is loaded, world reruns. diff --git a/app/templates/game-menu/game-menu-modal.jade b/app/templates/game-menu/game-menu-modal.jade index 2a36dabca..a8d8fb6ed 100644 --- a/app/templates/game-menu/game-menu-modal.jade +++ b/app/templates/game-menu/game-menu-modal.jade @@ -5,6 +5,11 @@ block modal-header block modal-body-content .tabbable.tabs-left - var submenus = ["inventory", "choose-hero", "save-load", "options", "guide", "multiplayer"] + - if (!showDevBits) { // Not done yet. + - submenus.splice(4, 1); + - submenus.splice(2, 1); + - submenus.splice(0, 1); + - } ul.nav.nav-tabs for submenu, index in submenus li(class=index ? "" : "active") diff --git a/app/views/game-menu/ChooseHeroView.coffee b/app/views/game-menu/ChooseHeroView.coffee index 7699be471..8568877e9 100644 --- a/app/views/game-menu/ChooseHeroView.coffee +++ b/app/views/game-menu/ChooseHeroView.coffee @@ -13,6 +13,7 @@ module.exports = class ChooseHeroView extends CocoView getRenderData: (context={}) -> context = super(context) + context.showDevBits = @options.showDevBits context afterRender: -> diff --git a/app/views/game-menu/GameMenuModal.coffee b/app/views/game-menu/GameMenuModal.coffee index 18b000857..cfb49a4db 100644 --- a/app/views/game-menu/GameMenuModal.coffee +++ b/app/views/game-menu/GameMenuModal.coffee @@ -14,17 +14,22 @@ module.exports = class GameMenuModal extends ModalView modalWidthPercent: 95 id: 'game-menu-modal' + constructor: (options) -> + super options + @options.showDevBits = me.isAdmin() or /https?:\/\/localhost/.test(window.location.href) + events: 'change input.select': 'onSelectionChanged' getRenderData: (context={}) -> context = super(context) + context.showDevBits = @options.showDevBits context afterRender: -> super() @insertSubView new submenuView @options for submenuView in submenuViews - @subviews.inventory_view.$el.addClass 'active' + (if @options.showDevBits then @subviews.inventory_view else @subviews.choose_hero_view).$el.addClass 'active' onHidden: -> subview.onHidden?() for subviewKey, subview of @subviews