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

Method addCheckbox

code/main/RenderArea.ts:65–69  ·  view source on GitHub ↗
(x: number, y: number, callbackCollectionWhenChecked: CallbackCollection, callbackCollectionWhenUnchecked, otherClass: string, checkedByDefault: boolean = false)

Source from the content-addressed store, hash-verified

63 }
64
65 public addCheckbox(x: number, y: number, callbackCollectionWhenChecked: CallbackCollection, callbackCollectionWhenUnchecked, otherClass: string, checkedByDefault: boolean = false): void{
66 this.addTag(new RenderTag(x, "<span class=\"aroundCheckbox\"><input type=\"checkbox\" class=\"asciiCheckbox " + otherClass + "\""+ (checkedByDefault? "checked":"") +"></span>"), y);
67
68 this.addLinkCheckbox("." + otherClass, callbackCollectionWhenChecked, callbackCollectionWhenUnchecked);
69 }
70
71 public addColor(x1: number, x2: number, y: number, color: Color): boolean{
72 return this.addTwoTags(x1, x2, y, "<span style=\"color:" + color.getColorString() + "\">", "</span>");

Callers 2

drawPondStuffMethod · 0.80
drawCfgInvertColorsMethod · 0.80

Calls 2

addTagMethod · 0.95
addLinkCheckboxMethod · 0.95

Tested by

no test coverage detected