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
Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.
Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.2 KiB

After

Width:  |  Height:  |  Size: 6.2 KiB

+35 -2
View File
@@ -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);
+8
View File
@@ -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');
} }