@@ -127,9 +127,6 @@ function setupFullscreen(display, canvas, options) {
127
127
display . fullscreen = fullscreen ;
128
128
var fullwindow = fullscreen || options . fullscreen ;
129
129
box . style . background = fullwindow ? 'black' : '' ;
130
- if ( options . header ) options . header . style . display = fullwindow ? 'none' : '' ;
131
- if ( options . footer ) options . footer . style . display = fullwindow ? 'none' : '' ;
132
- if ( options . fullscreenCheckbox ) options . fullscreenCheckbox . checked = fullscreen ;
133
130
setTimeout ( onresize , 0 ) ;
134
131
}
135
132
@@ -146,35 +143,16 @@ function setupFullscreen(display, canvas, options) {
146
143
} else {
147
144
var isFullscreen = false ;
148
145
checkFullscreen = function ( ) {
149
- if ( ( options . header || options . footer ) && isFullscreen != display . fullscreen ) {
146
+ if ( isFullscreen != display . fullscreen ) {
150
147
isFullscreen = display . fullscreen ;
151
148
fullscreenChange ( isFullscreen ) ;
152
149
}
153
150
} ;
154
151
}
155
152
156
- if ( options . fullscreenCheckbox ) options . fullscreenCheckbox . onclick = function ( ) {
157
- display . fullscreen = options . fullscreenCheckbox . checked ;
158
- checkFullscreen ( ) ;
159
- } ;
160
-
161
153
return checkFullscreen ;
162
154
}
163
155
164
- function setupSwapButtons ( options ) {
165
- if ( options . swapCheckbox ) {
166
- var imageName = Squeak . Settings [ "squeakImageName" ] || "default" ,
167
- settings = JSON . parse ( Squeak . Settings [ "squeakSettings:" + imageName ] || "{}" ) ;
168
- if ( "swapButtons" in settings ) options . swapButtons = settings . swapButtons ;
169
- options . swapCheckbox . checked = options . swapButtons ;
170
- options . swapCheckbox . onclick = function ( ) {
171
- options . swapButtons = options . swapCheckbox . checked ;
172
- settings [ "swapButtons" ] = options . swapButtons ;
173
- Squeak . Settings [ "squeakSettings:" + imageName ] = JSON . stringify ( settings ) ;
174
- } ;
175
- }
176
- }
177
-
178
156
function recordModifiers ( evt , display ) {
179
157
var shiftPressed = evt . shiftKey ,
180
158
ctrlPressed = evt . ctrlKey && ! evt . altKey ,
@@ -358,8 +336,6 @@ function createSqueakDisplay(canvas, options) {
358
336
document . body . style . margin = 0 ;
359
337
document . body . style . backgroundColor = 'black' ;
360
338
document . ontouchmove = function ( evt ) { evt . preventDefault ( ) ; } ;
361
- if ( options . header ) options . header . style . display = 'none' ;
362
- if ( options . footer ) options . footer . style . display = 'none' ;
363
339
}
364
340
var display = {
365
341
context : canvas . getContext ( "2d" ) ,
@@ -383,7 +359,6 @@ function createSqueakDisplay(canvas, options) {
383
359
changedCallback : null , // invoked when display size/scale changes
384
360
// additional functions added below
385
361
} ;
386
- setupSwapButtons ( options ) ;
387
362
if ( options . pixelated ) {
388
363
canvas . classList . add ( "pixelated" ) ;
389
364
display . cursorCanvas && display . cursorCanvas . classList . add ( "pixelated" ) ;
@@ -964,18 +939,11 @@ function createSqueakDisplay(canvas, options) {
964
939
else
965
940
onresize ( ) ;
966
941
} , 300 ) ;
967
- // if no fancy layout, don't bother
968
- if ( ( ! options . header || ! options . footer ) && ! options . fullscreen ) {
969
- display . width = canvas . width ;
970
- display . height = canvas . height ;
971
- return ;
972
- }
973
942
// CSS won't let us do what we want so we will layout the canvas ourselves.
974
- var fullscreen = options . fullscreen || display . fullscreen ,
975
- x = 0 ,
976
- y = fullscreen ? 0 : options . header . offsetTop + options . header . offsetHeight ,
943
+ var x = 0 ,
944
+ y = 0 ,
977
945
w = window . innerWidth ,
978
- h = fullscreen ? window . innerHeight : Math . max ( 100 , options . footer . offsetTop - y ) ,
946
+ h = window . innerHeight ,
979
947
paddingX = 0 , // padding outside canvas
980
948
paddingY = 0 ;
981
949
// above are the default values for laying out the canvas
@@ -1077,7 +1045,6 @@ SqueakJS.runImage = function(buffer, name, display, options) {
1077
1045
var vm = new Squeak . Interpreter ( image , display , options ) ;
1078
1046
SqueakJS . vm = vm ;
1079
1047
Squeak . Settings [ "squeakImageName" ] = name ;
1080
- setupSwapButtons ( options ) ;
1081
1048
display . clear ( ) ;
1082
1049
display . showBanner ( "Starting " + SqueakJS . appName ) ;
1083
1050
var spinner = setupSpinner ( vm , options ) ;
0 commit comments