@@ -50,7 +50,7 @@ HUD.prototype.draw = function(compositor){
50
50
var hud = this ;
51
51
// draw message/prompt box
52
52
if ( this . displayQueue . length > 0 && this . message . trim ( ) === "" ) {
53
- var displayRequest = this . displayQueue . pop ( )
53
+ var displayRequest = this . displayQueue . pop ( ) ;
54
54
this . message = displayRequest . message ;
55
55
this . yesno . isUp = displayRequest . type === this . PROMPT ;
56
56
if ( this . yesno . isUp )
@@ -59,7 +59,7 @@ HUD.prototype.draw = function(compositor){
59
59
displayRequest . callback ( value ) ;
60
60
this . selectHandler = null ;
61
61
this . isUp = false ;
62
- }
62
+ } ;
63
63
}
64
64
65
65
//3 chars padding either side with twice char size
@@ -68,7 +68,11 @@ HUD.prototype.draw = function(compositor){
68
68
var lines = str . split ( '\n' ) ;
69
69
var out = [ ] ;
70
70
for ( var i = 0 ; i < lines . length ; i ++ )
71
- out = out . concat ( lines [ i ] . match ( new RegExp ( '.{1,' + charsPerLine + '}' , 'g' ) ) )
71
+ out = out . concat (
72
+ lines [ i ] . match (
73
+ new RegExp ( '.{1,' + charsPerLine + '}' , 'g' )
74
+ )
75
+ ) ;
72
76
return out . slice ( 0 , 3 ) . join ( '\n' ) ;
73
77
}
74
78
@@ -96,8 +100,8 @@ HUD.prototype.draw = function(compositor){
96
100
} ;
97
101
98
102
HUD . prototype . scrollMessage = function ( ) {
99
- var lines = this . message . split ( '\n' )
100
- lines . shift ( )
103
+ var lines = this . message . split ( '\n' ) ;
104
+ lines . shift ( ) ;
101
105
this . message = lines . join ( '\n' ) ;
102
106
} ;
103
107
@@ -141,11 +145,12 @@ HUD.prototype.handleInput = function(key){
141
145
case KeyEvent . DOM_VK_Q :
142
146
if ( this . yesno . isUp ) {
143
147
this . yesno . handleInput ( key ) ;
144
- } else if ( this . message == "" && this . menuUp ) {
148
+ } else if ( this . message === "" && this . menuUp ) {
145
149
this . menuUp = false ;
146
150
play ( 'menuDown' ) ;
147
151
} else
148
152
this . scrollMessage ( ) ;
153
+ break ;
149
154
default :
150
155
break ;
151
156
}
0 commit comments