// Window_NameInput.LATIN1 =
// [ 'A','B','C','D','E', 'a','b','c','d','e',
// 'F','G','H','I','J', 'f','g','h','i','j',
// 'K','L','M','N','O', 'k','l','m','n','o',
// 'P','Q','R','S','T', 'p','q','r','s','t',
// 'U','V','W','X','Y', 'u','v','w','x','y',
// 'Z','[',']','^','_', 'z','{','}','|','~',
// '0','1','2','3','4', '!','#','$','%','&',
// '5','6','7','8','9', '(',')','*','+','-',
// '/','=','@','<','>', ':',';',' ','Page','OK' ];
//Removed the lowercase, but you may want to reposition some of the symbols
Window_NameInput.LATIN1 =
[ 'A','B','C','D','E', 'F','G','H','I','J',
'K','L','M','N','O', 'P','Q','R','S','T',
'U','V','W','X','Y', 'Z',' ', ' ', ' ', ' ',
'0','1','2','3','4', '5','6','7','8','9',
'[',']','^', '{','}', '|','~', '!','#','$',
'%','&', '(',')','*', '+','-', '/','=','@',
'<','>', ':',';',' ', '_','OK'
];
//Reduces letter window height
Window_NameInput.prototype.windowHeight = function() {
return this.fittingHeight(7);
};
//Window_NameInput.prototype.maxCols = function() {
// return 10;
//};
//Resizes max selectable items since we removed lowercase alphabet.
Window_NameInput.prototype.maxItems = function() {
return 67;
};
//index of 1000 completely removes the option to change pages, since the max is 67.
Window_NameInput.prototype.isPageChange = function() {
return this._index === 1000;
};
//If the _index is less than 66 (aka "ok"), then insert the character. If it is not, then it is the OK button
Window_NameInput.prototype.character = function() {
return this._index < 66 ? this.table()[this._page][this._index] : '';
};
//re-assign to new positon of OK
Window_NameInput.prototype.isOk = function() {
return this._index === 66;
};
//Jump to the OK button's new position
Window_NameInput.prototype.processJump = function() {
if (this._index !== 66) {
this._index = 66;
SoundManager.playCursor();
}
};
//Removed the center space that divided the upper and lowercase letters
Window_NameInput.prototype.itemRect = function(index) {
return {
x: index % 10 * 42 + Math.floor(index % 10 / 5),
y: Math.floor(index / 10) * this.lineHeight(),
width: 42,
height: this.lineHeight()
};
};
//removes some margin offset on the right.
Window_NameInput.prototype.refresh = function() {
var table = this.table();
this.contents.clear();
this.resetTextColor();
for (var i = 0; i < 90; i++) {
var rect = this.itemRect(i);
rect.x += 3;
rect.width -= 2; //original value was 6
this.drawText(table[this._page][i], rect.x, rect.y, rect.width, 'center');
}
};