diff options
author | Mike Buland <Mike.Buland@mjfirm.com> | 2016-10-26 08:05:15 -0600 |
---|---|---|
committer | Mike Buland <Mike.Buland@mjfirm.com> | 2016-10-26 08:05:15 -0600 |
commit | a267b561f392c2f3355b4f2e8c4536501e8d327d (patch) | |
tree | f248b2bdec121557d31944aa8e2f824dfab8aad6 | |
parent | c8b8770f49883f94678f215b98ece3d67f8aa9ef (diff) | |
download | lost-a267b561f392c2f3355b4f2e8c4536501e8d327d.tar.gz lost-a267b561f392c2f3355b4f2e8c4536501e8d327d.tar.bz2 lost-a267b561f392c2f3355b4f2e8c4536501e8d327d.tar.xz lost-a267b561f392c2f3355b4f2e8c4536501e8d327d.zip |
Minor UI tweaks. Humans start at 1, not zero.
-rw-r--r-- | js/lost.js | 11 |
1 files changed, 8 insertions, 3 deletions
@@ -829,10 +829,15 @@ function RenderCanvas2D( rMap, params ) // eMazeContainer, eUIContainer ) | |||
829 | 829 | ||
830 | this.iBorder = 3; | 830 | this.iBorder = 3; |
831 | this.iIconSize = Math.floor( | 831 | this.iIconSize = Math.floor( |
832 | ((iTargetSize/this.rMap.getSize( 0 ))-3-(this.iIconSquare*3))/this.iIconSquare | 832 | ( |
833 | (iTargetSize/this.rMap.getSize( 0 )) - | ||
834 | 3 - (this.iIconSquare*3) | ||
835 | )/this.iIconSquare | ||
833 | ); | 836 | ); |
834 | if( this.iIconSize > 15 ) | 837 | if( this.iIconSize > 15 ) |
835 | this.iIconSize = 15; | 838 | this.iIconSize = 15; |
839 | else if( this.iIconSize < 5 ) | ||
840 | this.iIconSize = 5; | ||
836 | 841 | ||
837 | this.iCellSize = | 842 | this.iCellSize = |
838 | this.iBorder + | 843 | this.iBorder + |
@@ -1154,10 +1159,10 @@ RenderCanvas2D.prototype.updateReadout = function updateReadout() | |||
1154 | if( this.rMap.getDims() <= 2 ) | 1159 | if( this.rMap.getDims() <= 2 ) |
1155 | return; | 1160 | return; |
1156 | 1161 | ||
1157 | let text = 'Floor: ' + this.rMap.pPlayer.get( 2 ); | 1162 | let text = 'Floor: ' + (this.rMap.pPlayer.get( 2 )+1); |
1158 | for( let j = 3; j < this.rMap.getDims(); j++ ) | 1163 | for( let j = 3; j < this.rMap.getDims(); j++ ) |
1159 | { | 1164 | { |
1160 | text += ', ' + this.rMap.pPlayer.get( j ) | 1165 | text += ', ' + (this.rMap.pPlayer.get( j )+1); |
1161 | } | 1166 | } |
1162 | 1167 | ||
1163 | this.readoutNode.textContent = text; | 1168 | this.readoutNode.textContent = text; |