(renderArea: RenderArea, callbackCollection: CallbackCollection, text: string, translated: string, otherClass: string, y: number = 0, x: number = -1)
| 8 | |
| 9 | // Public methods |
| 10 | public addBackToButton(renderArea: RenderArea, callbackCollection: CallbackCollection, text: string, translated: string, otherClass: string, y: number = 0, x: number = -1): void{ |
| 11 | // If the x position is under zero, we set it so that the button will be centered |
| 12 | if(x < 0){ |
| 13 | x = renderArea.getWidth()/2 - text.length/2; |
| 14 | } |
| 15 | |
| 16 | renderArea.addAsciiRealButton(text, x, y, otherClass, translated, true); |
| 17 | renderArea.addLinkCall("." + otherClass, callbackCollection); |
| 18 | } |
| 19 | |
| 20 | public addBackToMainMapButton(renderArea: RenderArea, otherClass: string, textName: string = "buttonBackToTheMap"): void{ |
| 21 | this.addBackToButton(renderArea, |
no test coverage detected