(renderArea: RenderArea, position: Pos)
| 56 | |
| 57 | // Public methods |
| 58 | public draw(renderArea: RenderArea, position: Pos): void{ |
| 59 | // Set the text |
| 60 | var text: string = this.buttonText; |
| 61 | |
| 62 | // Possibly modify the text depending on numberIdWichLimitsQuantity |
| 63 | if(this.numberIdWichLimitsQuantity != null){ |
| 64 | if(Saving.loadNumber(this.numberIdWichLimitsQuantity) <= 999) |
| 65 | text += " " + Saving.loadNumber(this.numberIdWichLimitsQuantity); |
| 66 | else |
| 67 | text += " 999+"; |
| 68 | } |
| 69 | |
| 70 | // Add the button |
| 71 | renderArea.addAsciiRealButton(text, position.x + this.buttonPosition.x, position.y + this.buttonPosition.y, this.buttonClassName + " keepBlackTextWhenInverted", "", false, this.underlinedLetter, this.buttonColor); |
| 72 | |
| 73 | // Add the link |
| 74 | renderArea.addLinkCall("." + this.buttonClassName, new CallbackCollection(this.cast.bind(this))); |
| 75 | } |
| 76 | |
| 77 | public getHotkey(): Hotkey{ |
| 78 | return new Hotkey(this.hotkeyLetter, new CallbackCollection(this.cast.bind(this))); |
nothing calls this directly
no test coverage detected