1 package org
.sevenchan
.dongs
.screens
3 import org
.sevenchan
.dongs
.creature
.Player
;
4 import org
.sevenchan
.dongs
.Screen;
10 public class LoadSaveScreen
extends Screen
13 private var text
:String = "";
14 private var loading
:Boolean;
16 public function LoadSaveScreen
(load
:Boolean)
19 this.exportGameButton
= true;
20 this.importGameButton
= true;
21 this.appearanceButton
= false;
22 this.debugMenuButton
= false;
23 this.loadOrSaveButton
= false;
24 this.newGameButton
= false;
25 this.showLoadOrSaveButton
= false;
28 override public function getScreenText
():String
33 override public function processButtonPress
(id
:int):Boolean
38 text
= "<h2>" + ((loading
)?"Load":"Save") + " Game</h2>";
39 setButton
(0, "CANCEL");
40 for (var i
:int = 1; i
< 12; i
++) {
41 var slotInfo
:String = Player
.previewSlot
(i
);
42 if(!loading
|| slotInfo
!="Slot Empty") {
43 setButton
(i
, "Slot " + i
);
45 text
+= "<p>" + slotInfo
+ "</p>";
53 InfoScreen
.push
("Game " + ((loading
)?"Loaded":"Saved") + "!");
55 main
.player
= new Player
(main
);
56 main
.player
.setMain
(main
);