-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathScene_File.js
71 lines (58 loc) · 1.96 KB
/
Scene_File.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
//-----------------------------------------------------------------------------
// Scene_File
//
// The superclass of Scene_Save and Scene_Load.
function Scene_File() {
this.initialize.apply(this, arguments);
}
Scene_File.prototype = Object.create(Scene_MenuBase.prototype);
Scene_File.prototype.constructor = Scene_File;
Scene_File.prototype.initialize = function() {
Scene_MenuBase.prototype.initialize.call(this);
};
Scene_File.prototype.create = function() {
Scene_MenuBase.prototype.create.call(this);
DataManager.loadAllSavefileImages();
this.createHelpWindow();
this.createListWindow();
};
Scene_File.prototype.start = function() {
Scene_MenuBase.prototype.start.call(this);
this._listWindow.refresh();
};
Scene_File.prototype.savefileId = function() {
return this._listWindow.index() + 1;
};
Scene_File.prototype.createHelpWindow = function() {
this._helpWindow = new Window_Help(1);
this._helpWindow.setText(this.helpWindowText());
this.addWindow(this._helpWindow);
};
Scene_File.prototype.createListWindow = function() {
var x = 0;
var y = this._helpWindow.height;
var width = Graphics.boxWidth;
var height = Graphics.boxHeight - y;
this._listWindow = new Window_SavefileList(x, y, width, height);
this._listWindow.setHandler('ok', this.onSavefileOk.bind(this));
this._listWindow.setHandler('cancel', this.popScene.bind(this));
this._listWindow.select(this.firstSavefileIndex());
this._listWindow.setTopRow(this.firstSavefileIndex() - 2);
this._listWindow.setMode(this.mode());
this._listWindow.refresh();
this.addWindow(this._listWindow);
};
Scene_File.prototype.mode = function() {
return null;
};
Scene_File.prototype.activateListWindow = function() {
this._listWindow.activate();
};
Scene_File.prototype.helpWindowText = function() {
return '';
};
Scene_File.prototype.firstSavefileIndex = function() {
return 0;
};
Scene_File.prototype.onSavefileOk = function() {
};