Add: keyboard icon
This commit is contained in:
Binary file not shown.
|
After Width: | Height: | Size: 660 B |
Binary file not shown.
@@ -105,7 +105,9 @@ BasicTab.prototype.addIcon = function(spriteName) {
|
|||||||
this.iconSprite.x = this.buttonSprite.width / 2;
|
this.iconSprite.x = this.buttonSprite.width / 2;
|
||||||
this.iconSprite.y = this.buttonSprite.height / 2;
|
this.iconSprite.y = this.buttonSprite.height / 2;
|
||||||
this.iconSprite.anchor.setTo(0.5, 0.5);
|
this.iconSprite.anchor.setTo(0.5, 0.5);
|
||||||
this.setIconSize(40);
|
// this.setIconSize(40);
|
||||||
|
this.setIconWidth(42);
|
||||||
|
this.setIconHeight(25);
|
||||||
this.buttonSprite.addChild(this.iconSprite);
|
this.buttonSprite.addChild(this.iconSprite);
|
||||||
|
|
||||||
this.mainText.text = "";
|
this.mainText.text = "";
|
||||||
|
|||||||
@@ -7,6 +7,8 @@ function MainMenu() {
|
|||||||
MainMenu.prototype.preload = function() {
|
MainMenu.prototype.preload = function() {
|
||||||
game.load.image('tile_choco', '../../../resources/image/background/tile_choco.png');
|
game.load.image('tile_choco', '../../../resources/image/background/tile_choco.png');
|
||||||
game.load.image('home', '../../../resources/image/icon/home.png');
|
game.load.image('home', '../../../resources/image/icon/home.png');
|
||||||
|
|
||||||
|
game.load.image('keyboard', '../../../resources/image/icon/keyboard.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');
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -188,6 +190,34 @@ MainMenu.prototype.makeAppGroupButtons = function() {
|
|||||||
|
|
||||||
|
|
||||||
this.appGroupTabLayout = new TabLayout(80, 0, 864, 70);
|
this.appGroupTabLayout = new TabLayout(80, 0, 864, 70);
|
||||||
|
|
||||||
|
var typingFingerGroupTab = new AppGroupTab( (function() { console.log("typing finger position"); }).bind(this) );
|
||||||
|
typingFingerGroupTab.reserveIcon("keyboard");
|
||||||
|
typingFingerGroupTab.reserveShortcutText("손가락 위치");
|
||||||
|
this.appGroupTabLayout.add(typingFingerGroupTab);
|
||||||
|
|
||||||
|
var typingPracticeGroupTab = new AppGroupTab( (function() { console.log("typing practice"); }).bind(this) );
|
||||||
|
typingPracticeGroupTab.reserveIcon("keyboard");
|
||||||
|
typingPracticeGroupTab.reserveShortcutText("연습");
|
||||||
|
this.appGroupTabLayout.add(typingPracticeGroupTab);
|
||||||
|
|
||||||
|
var typingTestGroupTab = new AppGroupTab( (function() { console.log("typing exam"); }).bind(this) );
|
||||||
|
typingTestGroupTab.reserveIcon("keyboard");
|
||||||
|
typingTestGroupTab.reserveShortcutText("시험");
|
||||||
|
this.appGroupTabLayout.add(typingTestGroupTab);
|
||||||
|
|
||||||
|
var typingPlayGroupTab = new AppGroupTab( (function() { console.log("typing exam"); }).bind(this) );
|
||||||
|
typingPlayGroupTab.reserveIcon("keyboard");
|
||||||
|
typingPlayGroupTab.reserveShortcutText("놀이");
|
||||||
|
this.appGroupTabLayout.add(typingPlayGroupTab);
|
||||||
|
|
||||||
|
var mousePlayGroupTab = new AppGroupTab( (function() { console.log("mouse exam"); }).bind(this) );
|
||||||
|
mousePlayGroupTab.reserveIcon("home");
|
||||||
|
mousePlayGroupTab.reserveShortcutText("놀이");
|
||||||
|
this.appGroupTabLayout.add(mousePlayGroupTab);
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
// typing practice
|
// typing practice
|
||||||
var typingPracticeKoreanAppGroupTab = new AppGroupTab(
|
var typingPracticeKoreanAppGroupTab = new AppGroupTab(
|
||||||
(function() { console.log("typing practice"); }).bind(this)
|
(function() { console.log("typing practice"); }).bind(this)
|
||||||
@@ -259,6 +289,7 @@ MainMenu.prototype.makeAppGroupButtons = function() {
|
|||||||
mousePlayAppGroupTab.reserveMainText("Mouse game");
|
mousePlayAppGroupTab.reserveMainText("Mouse game");
|
||||||
mousePlayAppGroupTab.reserveShortcutText("마우스놀이");
|
mousePlayAppGroupTab.reserveShortcutText("마우스놀이");
|
||||||
this.appGroupTabLayout.add(mousePlayAppGroupTab);
|
this.appGroupTabLayout.add(mousePlayAppGroupTab);
|
||||||
|
*/
|
||||||
|
|
||||||
this.appGroupTabLayout.createTabs();
|
this.appGroupTabLayout.createTabs();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user