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

Method drawFileLoad

code/main/Save.ts:239–259  ·  view source on GitHub ↗
(x: number, y: number)

Source from the content-addressed store, hash-verified

237 }
238
239 private drawFileLoad(x: number, y: number): number{
240 // The y we will return (will remain 0 if there's no translation to show)
241 var yAdd: number = 0;
242
243 // Title
244 this.drawTitle("saveFileLoadTitle", y+yAdd);
245
246 // Instructions
247 this.renderArea.drawString(Database.getText("saveFileLoadPaste"), x, y+yAdd+2);
248 this.renderArea.drawString(Database.getTranslatedText("saveFileLoadPaste"), x, y+yAdd+3, true);
249
250 // Add the text area
251 this.renderArea.addTextarea(x + 2, y+yAdd+5, 96, 6, "saveFileLoadTextarea");
252
253 // Add the load button
254 this.renderArea.addAsciiRealButton(Database.getText("saveFileLoadButton"), 48, y+yAdd+13, "saveFileLoadButton", Database.getTranslatedText("saveFileLoadButton"), true);
255 this.renderArea.addLinkCall(".saveFileLoadButton", new CallbackCollection(this.clickedFileLoad.bind(this)));
256
257 // Return yAdd
258 return yAdd;
259 }
260
261 private drawFileSave(x: number, y: number): number{
262 // The y we will return (will remain 0 if there's no translation to show)

Callers 1

updateMethod · 0.95

Calls 7

drawTitleMethod · 0.95
drawStringMethod · 0.80
addTextareaMethod · 0.80
addAsciiRealButtonMethod · 0.80
addLinkCallMethod · 0.80
bindMethod · 0.80
getTextMethod · 0.45

Tested by

no test coverage detected