| function Window_Alert() { | |
| this.initialize.apply(this, arguments); | |
| } | |
| Window_Alert.prototype = Object.create(Window_Base.prototype); | |
| Window_Alert.prototype.constructor = Window_Alert; | |
| Window_Alert.prototype.initialize = function(x, y) { | |
| var width = Graphics.boxWidth * .263; | |
| var height = Graphics.boxHeight / 3.69; | |
| Window_Base.prototype.initialize.call(this, x, y, width, height); | |
| this.refresh(); | |
| }; | |
| Window_Alert.prototype.windowWidth = function() { | |
| var mainBoxWidth = Graphics.boxWidth * .263; | |
| return mainBoxWidth; | |
| }; | |
| Window_Alert.prototype.windowHeight = function() { | |
| var mainBoxHeight = Graphics.boxHeight / 3.69; | |
| return mainBoxHeight; | |
| }; | |
| Window_Alert.prototype.refresh = function() { | |
| var appicon = "kevinicon" | |
| var mainBoxWidth = Graphics.boxWidth * .263; | |
| this.contents.clear(); | |
| this._windowAlertSprite = new Sprite_Base(); | |
| this._windowAlertSprite.bitmap = ImageManager.loadPicture(appicon); | |
| this._windowAlertSprite.x = (0.5 * mainBoxWidth) - (0.5 * this._windowAlertSprite.width); | |
| this.addChild(this._windowAlertSprite); | |
| var width = this.contents.width; - this.textPadding() * 2; | |
| var height = this.contents.height; - this.textPadding() * 2; | |
| this.contents.drawText("ALERTS", 0, 0, width, height, "center"); | |
| }; | |
| Window_Alert.prototype.open = function() { | |
| Window_Base.prototype.open.call(this); | |
| }; | |
| Scene_Menu.prototype.create = function() { | |
| Scene_MenuBase.prototype.create.call(this); | |
| }; | |
| Scene_Menu.prototype.createAlertWindow = function() { | |
| this._alertWindow = new Window_Alert(0, 0); | |
| this._alertWindow.y = Graphics.boxHeight - this._alertWindow.height; | |
| this.addWindow(this._alertWindow); | |
| }; |