mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2025-04-04 17:19:47 -04:00
Hid flags view during real-time playback for non-flag-using levels.
This commit is contained in:
parent
5e0b42068a
commit
58e0ba1c10
2 changed files with 13 additions and 7 deletions
app
|
@ -23,12 +23,16 @@ $level-resize-transition-time: 0.5s
|
|||
width: 100%
|
||||
button, h4
|
||||
display: none
|
||||
#playback-view
|
||||
$flags-width: 200px
|
||||
width: 90%
|
||||
width: -webkit-calc(100% - $flags-width)
|
||||
width: calc(100% - $flags-width)
|
||||
left: $flags-width
|
||||
&:not(.flags)
|
||||
#playback-view
|
||||
width: 100%
|
||||
&.flags
|
||||
#playback-view
|
||||
$flags-width: 200px
|
||||
width: 90%
|
||||
width: -webkit-calc(100% - $flags-width)
|
||||
width: calc(100% - $flags-width)
|
||||
left: $flags-width
|
||||
#code-area, #thang-hud, #goals-view
|
||||
display: none
|
||||
visibility: hidden
|
||||
|
|
|
@ -205,6 +205,8 @@ module.exports = class PlayLevelView extends RootView
|
|||
@session = @levelLoader.session
|
||||
@world = @levelLoader.world
|
||||
@level = @levelLoader.level
|
||||
@$el.addClass 'hero' if @level.get('type', true) is 'hero'
|
||||
@$el.addClass 'flags' if @level.get('slug') is 'sky-span' # TODO: figure out when the player has flags.
|
||||
@otherSession = @levelLoader.opponentSession
|
||||
@worldLoadFakeResources = [] # first element (0) is 1%, last (100) is 100%
|
||||
for percent in [1 .. 100]
|
||||
|
@ -258,7 +260,7 @@ module.exports = class PlayLevelView extends RootView
|
|||
@insertSubView @tome = new TomeView levelID: @levelID, session: @session, otherSession: @otherSession, thangs: @world.thangs, supermodel: @supermodel, level: @level
|
||||
@insertSubView new LevelPlaybackView session: @session
|
||||
@insertSubView new GoalsView {}
|
||||
@insertSubView new LevelFlagsView world: @world
|
||||
@insertSubView new LevelFlagsView world: @world if @levelID is 'sky-span' # TODO: figure out when flags are available
|
||||
@insertSubView new GoldView {}
|
||||
@insertSubView new HUDView {}
|
||||
@insertSubView new ChatView levelID: @levelID, sessionID: @session.id, session: @session
|
||||
|
|
Loading…
Add table
Reference in a new issue