File tree Expand file tree Collapse file tree 2 files changed +13
-1
lines changed
Expand file tree Collapse file tree 2 files changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -17,7 +17,8 @@ package game
1717 public static var showTime: Boolean ;
1818
1919 public static var particles: Boolean ;
20-
20+
21+ public static var fullscreen: Boolean ;
2122
2223 public function Options ()
2324 {
@@ -52,6 +53,7 @@ package game
5253 obj . data . options. volume = FP . volume ;
5354 obj . data . options. voices = voices;
5455 obj . data . options. particles = particles;
56+ obj . data . options. fullscreen = fullscreen;
5557 }
5658
5759 public static function loadOptions () : void
@@ -65,6 +67,7 @@ package game
6567 FP . volume = 1 ;
6668 voices = true ;
6769 particles = true ;
70+ fullscreen = false ;
6871 }
6972 else
7073 {
@@ -74,6 +77,7 @@ package game
7477 FP . volume = obj . data . options. volume ;
7578 voices = obj . data . options. voices;
7679 particles = obj . data . options. particles;
80+ fullscreen = obj . data . options. fullscreen;
7781 }
7882 }
7983 }
Original file line number Diff line number Diff line change @@ -14,6 +14,7 @@ package game.menus
1414 import net.flashpunk.Sfx ;
1515 import net.flashpunk.utils.Input ;
1616 import net.flashpunk.utils.Key ;
17+ import flash.display.StageDisplayState ;
1718
1819 public class MainMenu extends MattWorld
1920 {
@@ -80,6 +81,13 @@ package game.menus
8081 Options. particles = ! Options. particles;
8182 button. setText("Particles: " + this . getBoolName(Options. particles));
8283 }
84+
85+ private function toggleFullscreen (button :MenuButton ) : void
86+ {
87+ Options. fullscreen = ! Options. fullscreen;
88+ button. setText("Fullscreen: " + this . getBoolName(Options. fullscreen))
89+ Main. instance. stage . displayState = Options. fullscreen ? StageDisplayState . FULL_SCREEN_INTERACTIVE : StageDisplayState . NORMAL ;
90+ }
8391
8492 override public function update () : void
8593 {
You can’t perform that action at this time.
0 commit comments