Add: PlayAppButton
This commit is contained in:
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user