MCPcopy Create free account
hub / github.com/candybox2/candybox2.github.io / drawArray

Method drawArray

code/main/RenderArea.ts:276–286  ·  view source on GitHub ↗
(array: string[], x: number = 0, y: number = 0, transparency: RenderTransparency = null, spanClass: string = null)

Source from the content-addressed store, hash-verified

274 }
275
276 public drawArray(array: string[], x: number = 0, y: number = 0, transparency: RenderTransparency = null, spanClass: string = null){
277 for(var i = 0; i < array.length; i++){
278 // Draw the string
279 this.drawString(array[i], x, y + i, false, transparency);
280
281 // Add the tags
282 if(spanClass != null){
283 this.addTwoTags(x, x + array[i].length, y + i, "<span class=\"" + spanClass + "\">", "</span>");
284 }
285 }
286 }
287
288 public drawHorizontalLine(str: string, x1: number, x2: number, y: number): boolean{
289 var strBuffer: string = "";

Callers 15

updateMethod · 0.80
updateMethod · 0.80
constructorMethod · 0.80
updateMethod · 0.80
constructorMethod · 0.80
constructorMethod · 0.80
drawMethod · 0.80
updateMethod · 0.80
constructorMethod · 0.80
drawBackgroundMethod · 0.80
drawBroomMethod · 0.80
drawCauldronMethod · 0.80

Calls 2

drawStringMethod · 0.95
addTwoTagsMethod · 0.95

Tested by

no test coverage detected