(x: number, y: number)
| 140 | } |
| 141 | |
| 142 | private drawLocalLoad(x: number, y: number): number{ |
| 143 | // The y we will return (will remain 0 if there's no translation to show) |
| 144 | var yAdd: number = 0; |
| 145 | |
| 146 | // Var we will use for link generation |
| 147 | var link: string; |
| 148 | |
| 149 | // Title |
| 150 | this.drawTitle("saveLocalLoadTitle", y+yAdd); |
| 151 | |
| 152 | // If we support local saving |
| 153 | if(LocalSaving.supportsLocalSaving()){ |
| 154 | // "You can load.." |
| 155 | this.drawPoint("saveLocalLoadYouCan", x, y+yAdd+2); |
| 156 | if(Database.isTranslated()) yAdd += 1; |
| 157 | |
| 158 | // The links |
| 159 | for(var i = 1; i <= 5; i++){ |
| 160 | link = "http://candybox2.github.io/?slot=" + i.toString(); |
| 161 | this.renderArea.addHtmlLink(x+2, y+yAdd+3+i, link, link); |
| 162 | this.renderArea.drawString("(slot " + i.toString() + ")", x + link.length + 4, y+yAdd+3+i); |
| 163 | } |
| 164 | |
| 165 | // "Thanks to.." |
| 166 | this.drawPoint("saveLocalLoadThanksTo", x, y+yAdd+10); |
| 167 | if(Database.isTranslated()) yAdd += 1; |
| 168 | } |
| 169 | else{ |
| 170 | // Warning messages |
| 171 | this.drawWarning(Database.getText("saveLocalSaveWarning0") + " (local storage and application cache)", x, y+yAdd+2); |
| 172 | this.drawWarning(Database.getText("saveLocalSaveWarning1"), x, y+yAdd+3); |
| 173 | |
| 174 | this.drawWarning(Database.getTranslatedText("saveLocalSaveWarning0"), x, y+yAdd+5, true); |
| 175 | this.drawWarning(Database.getTranslatedText("saveLocalSaveWarning1"), x, y+yAdd+6, true); |
| 176 | } |
| 177 | |
| 178 | // Return yAdd |
| 179 | return yAdd; |
| 180 | } |
| 181 | |
| 182 | private drawLocalSave(x: number, y: number): number{ |
| 183 | // The y we will return (will remain 0 if there's no translation to show) |
no test coverage detected