(x: number, y: number)
| 259 | } |
| 260 | |
| 261 | private drawFileSave(x: number, y: number): number{ |
| 262 | // The y we will return (will remain 0 if there's no translation to show) |
| 263 | var yAdd: number = 0; |
| 264 | |
| 265 | // The title |
| 266 | this.drawTitle("saveFileSaveTitle", y+yAdd); |
| 267 | |
| 268 | // The "why" |
| 269 | this.renderArea.drawString(Database.getText("saveFileSaveWhy0"), x, y+yAdd+2); |
| 270 | this.renderArea.drawString(" - " + Database.getText("saveFileSaveWhy1"), x, y+yAdd+3); |
| 271 | this.renderArea.drawString(" - " + Database.getText("saveFileSaveWhy2"), x, y+yAdd+4); |
| 272 | this.renderArea.drawString(" - " + Database.getText("saveFileSaveWhy3"), x, y+yAdd+5); |
| 273 | this.renderArea.drawString(" " + Database.getText("saveFileSaveWhy4"), x, y+yAdd+6); |
| 274 | |
| 275 | // The translated "why" (only if there's a translation) |
| 276 | if(Database.isTranslated()){ |
| 277 | this.renderArea.drawString(Database.getTranslatedText("saveFileSaveWhy0"), x, y+yAdd+8, true); |
| 278 | this.renderArea.drawString(" - " + Database.getTranslatedText("saveFileSaveWhy1"), x, y+yAdd+9, true); |
| 279 | this.renderArea.drawString(" - " + Database.getTranslatedText("saveFileSaveWhy2"), x, y+yAdd+10, true); |
| 280 | this.renderArea.drawString(" - " + Database.getTranslatedText("saveFileSaveWhy3"), x, y+yAdd+11, true); |
| 281 | this.renderArea.drawString(" " + Database.getTranslatedText("saveFileSaveWhy4"), x, y+yAdd+12, true); |
| 282 | yAdd += 6; // We increase yAdd by 6 because the translations took 6 lines |
| 283 | } |
| 284 | |
| 285 | // Add the button |
| 286 | this.renderArea.addAsciiRealButton(Database.getText("saveFileSaveButton"), 35, y+yAdd+8, "saveFileSaveButton", Database.getTranslatedText("saveFileSaveButton"), true); |
| 287 | this.renderArea.addLinkCall(".saveFileSaveButton", new CallbackCollection(this.clickedFileSave.bind(this))); |
| 288 | |
| 289 | // Add the text area |
| 290 | this.renderArea.addTextarea(x + 2, y+yAdd+11, 96, 6, "saveFileSaveTextarea", (this.fileSaveTextareaContent != null? this.fileSaveTextareaContent : "")); |
| 291 | |
| 292 | // Should we show the warning? |
| 293 | if(this.showFileSaveWarning){ |
| 294 | this.drawWarning(Database.getText("saveFileSaveWarning"), x+2, y+yAdd+12); |
| 295 | this.drawWarning(Database.getTranslatedText("saveFileSaveWarning"), x+2, y+yAdd+13, true); |
| 296 | } |
| 297 | |
| 298 | // We return yAdd |
| 299 | return yAdd; |
| 300 | } |
| 301 | |
| 302 | private drawPoint(textName: string, x: number, y: number): void{ |
| 303 | this.renderArea.drawString(Database.getText(textName), x, y); |
no test coverage detected