(function() {
var _Scene_Map_start = Scene_Map.prototype.start;
Scene_Map.prototype.start = function() {
_Scene_Map_start.call(this);
this._myWindow = new Clock_HUD(30, 100);
this.addWindow(this._myWindow);
};
function Clock_HUD() {
this.initialize.apply(this, arguments);
}
Clock_HUD.prototype = Object.create(Window_Base.prototype);
Clock_HUD.prototype.constructor = Clock_HUD;
var _Scene_Map_update = Scene_Map.prototype.update;
Scene_Map.prototype.update = function() {
_Scene_Map_update.call(this);
this._myWindow.refresh();
};
Clock_HUD.prototype.initialize = function(x, y) {
Window_Base.prototype.initialize.call(this, 1500, 0, this.windowWidth(), this.windowHeight());
this.refresh();
};
Clock_HUD.prototype.windowWidth = function() {
return 350;
};
Clock_HUD.prototype.windowHeight = function() {
return 100
};
Clock_HUD.prototype.refresh = function() {
this.contents.clear();
if ($gameSwitches.value(155) == true){
Clock_HUD.prototype.initialize = function(x, y) {
Window_Base.prototype.initialize.call(this, 1500, -100, this.windowWidth(), this.windowHeight());
this.refresh();
};
} else {
Clock_HUD.prototype.initialize = function(x, y) {
Window_Base.prototype.initialize.call(this, 1500, 0, this.windowWidth(), this.windowHeight());
this.refresh();
};
if ($gameVariables.value(77) === 6){
if ($gameVariables.value(99) === 0){
if ($gameVariables.value(21) < 10){
this.drawText($gameVariables.value(22), 0, 0, this.windowWidth());
this.drawText(":0", 12, 0, this.windowWidth());
this.drawText($gameVariables.value(21), 22, 0, this.windowWidth());
this.drawText("AM", 55, 0, this.windowWidth());
this.drawText("Sunday", 90, 0, this.windowWidth());
} else {
this.drawText($gameVariables.value(22), 0, 0, this.windowWidth());
this.drawText(":", 12, 0, this.windowWidth());
this.drawText($gameVariables.value(21), 22, 0, this.windowWidth());
this.drawText("AM", 55, 0, this.windowWidth());
this.drawText("Sunday", 90, 0, this.windowWidth());
};
} else {
if ($gameVariables.value(21) < 10){
this.drawText($gameVariables.value(22), 0, 0, this.windowWidth());
this.drawText(":0", 12, 0, this.windowWidth());
this.drawText($gameVariables.value(21), 22, 0, this.windowWidth());
this.drawText("PM", 55, 0, this.windowWidth());
this.drawText("Sunday", 90, 0, this.windowWidth());
} else {
this.drawText($gameVariables.value(22), 0, 0, this.windowWidth());
this.drawText(":", 12, 0, this.windowWidth());
this.drawText($gameVariables.value(21), 22, 0, this.windowWidth());
this.drawText("PM", 55, 0, this.windowWidth());
this.drawText("Sunday", 90, 0, this.windowWidth());
};
};
};
if ($gameVariables.value(77) === 5){
if ($gameVariables.value(99) === 0){
if ($gameVariables.value(21) < 10){
this.drawText($gameVariables.value(22), 0, 0, this.windowWidth());
this.drawText(":0", 12, 0, this.windowWidth());
this.drawText($gameVariables.value(21), 22, 0, this.windowWidth());
this.drawText("AM", 55, 0, this.windowWidth());
this.drawText("Saturday", 90, 0, this.windowWidth());
} else {
this.drawText($gameVariables.value(22), 0, 0, this.windowWidth());
this.drawText(":", 12, 0, this.windowWidth());
this.drawText($gameVariables.value(21), 22, 0, this.windowWidth());
this.drawText("AM", 55, 0, this.windowWidth());
this.drawText("Saturday", 90, 0, this.windowWidth());
};
} else {
if ($gameVariables.value(21) < 10){
this.drawText($gameVariables.value(22), 0, 0, this.windowWidth());
this.drawText(":0", 12, 0, this.windowWidth());
this.drawText($gameVariables.value(21), 22, 0, this.windowWidth());
this.drawText("PM", 55, 0, this.windowWidth());
this.drawText("Saturday", 90, 0, this.windowWidth());
} else {
this.drawText($gameVariables.value(22), 0, 0, this.windowWidth());
this.drawText(":", 12, 0, this.windowWidth());
this.drawText($gameVariables.value(21), 22, 0, this.windowWidth());
this.drawText("PM", 55, 0, this.windowWidth());
this.drawText("Saturday", 90, 0, this.windowWidth());
};
};
};
};
};
})();