Add: PlayAppButton
|
After Width: | Height: | Size: 3.4 KiB |
|
After Width: | Height: | Size: 5.2 KiB |
|
After Width: | Height: | Size: 3.1 KiB |
|
After Width: | Height: | Size: 2.1 KiB |
|
After Width: | Height: | Size: 8.5 KiB |
|
After Width: | Height: | Size: 2.0 KiB |
|
Before Width: | Height: | Size: 6.2 KiB After Width: | Height: | Size: 6.2 KiB |
@@ -45,6 +45,9 @@ function PlayAppButton(x, y) {
|
|||||||
// this.addIcon("tile_choco");
|
// this.addIcon("tile_choco");
|
||||||
// this.setIconSize(40);
|
// this.setIconSize(40);
|
||||||
// this.setShortcutText("[단축키]");
|
// this.setShortcutText("[단축키]");
|
||||||
|
|
||||||
|
this.addIcon("home");
|
||||||
|
this.setIconSize(80);
|
||||||
}
|
}
|
||||||
|
|
||||||
PlayAppButton.prototype.setInputEnabled = function(isEnabled) {
|
PlayAppButton.prototype.setInputEnabled = function(isEnabled) {
|
||||||
@@ -77,13 +80,43 @@ PlayAppButton.prototype.showEmptyDisabled = function() {
|
|||||||
this.strokeSprite.tint = MainColor.SADDLE_BROWN_HEX;
|
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) {
|
PlayAppButton.prototype.updateAppData = function(appData) {
|
||||||
this.appData = appData;
|
this.appData = appData;
|
||||||
|
|
||||||
// console.log(this.appData);
|
// console.log(this.appData);
|
||||||
|
this.iconSprite.loadTexture(this.getIconName(this.appData.appID));
|
||||||
|
this.setIconSize(80);
|
||||||
// this.addIcon(this.appData.appName);
|
// this.addIcon(this.appData.appName);
|
||||||
this.addIcon("keyboard");
|
|
||||||
this.setIconSize(100);
|
|
||||||
// this.setMainText(this.appData.koreanName);
|
// this.setMainText(this.appData.koreanName);
|
||||||
this.setShortcutText(this.appData.koreanName);
|
this.setShortcutText(this.appData.koreanName);
|
||||||
|
|
||||||
|
|||||||
@@ -14,6 +14,14 @@ MainMenu.prototype.preload = function() {
|
|||||||
Animal.loadResources();
|
Animal.loadResources();
|
||||||
TypingAppButton.loadResources();
|
TypingAppButton.loadResources();
|
||||||
|
|
||||||
|
game.load.image('alien', '../../../resources/image/icon/green_alien.png');
|
||||||
|
game.load.image('card', '../../../resources/image/icon/card.png');
|
||||||
|
game.load.image('grill', '../../../resources/image/icon/grill.png');
|
||||||
|
game.load.image('spaceship', '../../../resources/image/icon/spaceship.png');
|
||||||
|
game.load.image('chocoball', '../../../resources/image/icon/chocoball.png');
|
||||||
|
|
||||||
|
game.load.image('alienship', '../../../resources/image/icon/alienship.png');
|
||||||
|
|
||||||
game.load.script('webfont', '//ajax.googleapis.com/ajax/libs/webfont/1.4.7/webfont.js');
|
game.load.script('webfont', '//ajax.googleapis.com/ajax/libs/webfont/1.4.7/webfont.js');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||