(x1: number, x2: number, y: number, id: string, callbackCollection: CallbackCollection, optionsArray: string[] = [])
| 154 | } |
| 155 | |
| 156 | public addList(x1: number, x2: number, y: number, id: string, callbackCollection: CallbackCollection, optionsArray: string[] = []): void{ |
| 157 | var options: string = ""; |
| 158 | |
| 159 | // Add all the options tag & text to the options string |
| 160 | for(var i = 0; i < optionsArray.length/2; i++){ |
| 161 | options += "<option id=\"" + optionsArray[i*2] + "\" class=\"asciiSelectOption\">" + optionsArray[i*2+1] + "</option>"; |
| 162 | } |
| 163 | |
| 164 | // Add the list itself as a tag |
| 165 | this.addTag(new RenderTag(x1, "<span class=\"aroundSelect\"><select id=\"" + id + "\" class=\"asciiSelect\" style=\"width:" + (x2 - x1).toString() + "ex\">" + options + "</select></span>"), y); |
| 166 | |
| 167 | // Add the render link used to control the list |
| 168 | this.addLinkChange("#" + id, callbackCollection); |
| 169 | } |
| 170 | |
| 171 | public addMultipleAsciiButtons(otherClass: string, ...coordinates: number[]): boolean{ |
| 172 | // If the length of the coordinates array isn't multiple of 3, we return false |
no test coverage detected