(renderArea: RenderArea, x: number, y: number, selected: boolean)
| 46 | } |
| 47 | |
| 48 | public render(renderArea: RenderArea, x: number, y: number, selected: boolean): void{ |
| 49 | // We draw the borders |
| 50 | renderArea.drawVerticalLine("|", x + this.xPos - 1, y, 3); |
| 51 | renderArea.drawVerticalLine("|", x + this.xPos + this.width, y, 3); |
| 52 | |
| 53 | // We draw the text |
| 54 | for(var i = 0; i < 3; i++){ |
| 55 | // We draw the string |
| 56 | renderArea.drawString(this.text[i], x + this.xPos + 1, y+i); |
| 57 | // If the tab is selected, we add a special color |
| 58 | if(selected) |
| 59 | renderArea.addBackgroundColor(x + this.xPos, x + this.xPos + this.width, y+i, new Color(ColorType.STATUS_BAR_SELECTED_TAB, true)); |
| 60 | } |
| 61 | |
| 62 | // If the tab isn't selected, we add a button to click it ! |
| 63 | if(selected == false){ |
| 64 | renderArea.addMultipleAsciiButtons("statusBarTabButton" + this.tabIndexWhenSelected, |
| 65 | x + this.xPos, x + this.xPos + this.width, y, |
| 66 | x + this.xPos, x + this.xPos + this.width, y+1, |
| 67 | x + this.xPos, x + this.xPos + this.width, y+2); |
| 68 | renderArea.addLinkCall(".statusBarTabButton" + this.tabIndexWhenSelected, new CallbackCollection(this.clicked.bind(this))); |
| 69 | } |
| 70 | } |
| 71 | |
| 72 | // Public getters |
| 73 | public getType(): StatusBarTabType{ |
no test coverage detected