Add: PlayAppButton

This commit is contained in:
2019-08-13 20:58:03 +09:00
parent a97e09c8ec
commit 038511cba6
10 changed files with 43 additions and 2 deletions
+35 -2
View File
@@ -45,6 +45,9 @@ function PlayAppButton(x, y) {
// this.addIcon("tile_choco");
// this.setIconSize(40);
// this.setShortcutText("[단축키]");
this.addIcon("home");
this.setIconSize(80);
}
PlayAppButton.prototype.setInputEnabled = function(isEnabled) {
@@ -77,13 +80,43 @@ PlayAppButton.prototype.showEmptyDisabled = function() {
this.strokeSprite.tint = MainColor.SADDLE_BROWN_HEX;
}
PlayAppButton.prototype.getIconName = function(appID) {
switch(appID) {
case 50:
case 51:
return "keyboard"; // mole
case 52:
case 53:
return "alienship";
case 101:
return "alien";
case 102:
return "card";
case 103:
return "grill";
case 104:
return "spaceship";
case 105:
return "chocoball";
default:
return "keyboard";
}
}
PlayAppButton.prototype.updateAppData = function(appData) {
this.appData = appData;
// console.log(this.appData);
this.iconSprite.loadTexture(this.getIconName(this.appData.appID));
this.setIconSize(80);
// this.addIcon(this.appData.appName);
this.addIcon("keyboard");
this.setIconSize(100);
// this.setMainText(this.appData.koreanName);
this.setShortcutText(this.appData.koreanName);