mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2024-11-24 08:08:15 -05:00
Respecting coordinates setting.
This commit is contained in:
parent
e493855578
commit
019f634d9f
3 changed files with 5 additions and 3 deletions
|
@ -47,7 +47,7 @@ module.exports = Surface = class Surface extends CocoClass
|
||||||
grid: false
|
grid: false
|
||||||
navigateToSelection: true
|
navigateToSelection: true
|
||||||
choosing: false # 'point', 'region', 'ratio-region'
|
choosing: false # 'point', 'region', 'ratio-region'
|
||||||
coords: true
|
coords: null # use world defaults, or set to false/true to overrid
|
||||||
playJingle: false
|
playJingle: false
|
||||||
showInvisible: false
|
showInvisible: false
|
||||||
frameRate: 30 # Best as a divisor of 60, like 15, 30, 60, with RAF_SYNCHED timing.
|
frameRate: 30 # Best as a divisor of 60, like 15, 30, 60, with RAF_SYNCHED timing.
|
||||||
|
@ -123,7 +123,8 @@ module.exports = Surface = class Surface extends CocoClass
|
||||||
initCoordinates: ->
|
initCoordinates: ->
|
||||||
@coordinateGrid ?= new CoordinateGrid {camera: @camera, layer: @gridLayer, textLayer: @surfaceTextLayer}, @world.size()
|
@coordinateGrid ?= new CoordinateGrid {camera: @camera, layer: @gridLayer, textLayer: @surfaceTextLayer}, @world.size()
|
||||||
@coordinateGrid.showGrid() if @world.showGrid or @options.grid
|
@coordinateGrid.showGrid() if @world.showGrid or @options.grid
|
||||||
@coordinateDisplay ?= new CoordinateDisplay camera: @camera, layer: @surfaceTextLayer if @world.showCoordinates or @options.coords
|
showCoordinates = if @options.coords? then @options.coords else @world.showCoordinates
|
||||||
|
@coordinateDisplay ?= new CoordinateDisplay camera: @camera, layer: @surfaceTextLayer if showCoordinates
|
||||||
|
|
||||||
hookUpChooseControls: ->
|
hookUpChooseControls: ->
|
||||||
chooserOptions = stage: @stage, surfaceLayer: @surfaceLayer, camera: @camera, restrictRatio: @options.choosing is 'ratio-region'
|
chooserOptions = stage: @stage, surfaceLayer: @surfaceLayer, camera: @camera, restrictRatio: @options.choosing is 'ratio-region'
|
||||||
|
|
|
@ -50,7 +50,7 @@ module.exports = class WorldSelectModal extends ModalView
|
||||||
grid: true
|
grid: true
|
||||||
navigateToSelection: false
|
navigateToSelection: false
|
||||||
choosing: @dataType
|
choosing: @dataType
|
||||||
coords: false
|
coords: true
|
||||||
thangTypes: @supermodel.getModels(ThangType)
|
thangTypes: @supermodel.getModels(ThangType)
|
||||||
showInvisible: true
|
showInvisible: true
|
||||||
}
|
}
|
||||||
|
|
|
@ -188,6 +188,7 @@ module.exports = class ThangsTabView extends CocoView
|
||||||
@surface = new Surface @world, surfaceCanvas, {
|
@surface = new Surface @world, surfaceCanvas, {
|
||||||
wizards: false
|
wizards: false
|
||||||
paths: false
|
paths: false
|
||||||
|
coords: true
|
||||||
grid: true
|
grid: true
|
||||||
navigateToSelection: false
|
navigateToSelection: false
|
||||||
thangTypes: @supermodel.getModels(ThangType)
|
thangTypes: @supermodel.getModels(ThangType)
|
||||||
|
|
Loading…
Reference in a new issue