diff --git a/editor-mobile.html b/editor-mobile.html index 3a05e8e2..e4116e16 100644 --- a/editor-mobile.html +++ b/editor-mobile.html @@ -442,6 +442,7 @@ + @@ -452,6 +453,7 @@ +

diff --git a/editor.html b/editor.html index b841eaaa..e67d5fe3 100644 --- a/editor.html +++ b/editor.html @@ -425,6 +425,7 @@ + @@ -435,6 +436,7 @@ +

diff --git a/index.html b/index.html index 98997cb2..8dde6626 100644 --- a/index.html +++ b/index.html @@ -119,6 +119,7 @@ + @@ -129,6 +130,7 @@ +

diff --git a/libs/actions.js b/libs/actions.js index cd1d3d3c..a1011943 100644 --- a/libs/actions.js +++ b/libs/actions.js @@ -2746,6 +2746,7 @@ actions.prototype.exitPaint = function () { core.deleteCanvas('paint'); core.ui.closePanel(); core.statusBar.image.keyboard.style.opacity = 1; + core.statusBar.image.shop.style.opacity = 1; core.updateStatusBar(); core.drawTip("退出绘图模式"); } diff --git a/libs/control.js b/libs/control.js index 0d567692..b0c76fd2 100644 --- a/libs/control.js +++ b/libs/control.js @@ -2056,16 +2056,9 @@ control.prototype.openQuickShop = function (need) { control.prototype.openKeyBoard = function (need) { if (core.isReplaying()) return; - if (core.platform.extendKeyboard) { - if (!core.checkStatus('keyBoard', need)) - return; - core.ui.drawKeyBoard(); - } - else { - if (!core.checkStatus('selectShop', need)) - return; - core.ui.drawQuickShop(); - } + if (!core.checkStatus('keyBoard', need)) + return; + core.ui.drawKeyBoard(); } ////// 点击保存按钮时的打开操作 ////// @@ -2729,6 +2722,7 @@ control.prototype.updateStatusBar = function () { core.statusBar.image.toolbox.src = core.statusBar.icons.rewind.src; core.statusBar.image.keyboard.src = core.statusBar.icons.book.src; + core.statusBar.image.shop.style.opacity = 0; core.statusBar.image.save.src = core.statusBar.icons.speedDown.src; @@ -2752,8 +2746,8 @@ control.prototype.updateStatusBar = function () { core.statusBar.image.toolbox.src = core.statusBar.icons.toolbox.src; - core.statusBar.image.keyboard.src = - core.platform.extendKeyboard ? core.statusBar.icons.keyboard.src : core.statusBar.icons.shop.src; + core.statusBar.image.keyboard.src = core.statusBar.icons.keyboard.src; + core.statusBar.image.shop.style.opacity = 1; core.statusBar.image.save.src = core.statusBar.icons.save.src; @@ -2890,21 +2884,23 @@ control.prototype.setToolbarButton = function (useButton) { core.domStyle.toolbarBtn = useButton; if (useButton) { - ["book","fly","toolbox","keyboard","save","load","settings"].forEach(function (t) { + ["book","fly","toolbox","keyboard","shop","save","load","settings"].forEach(function (t) { core.statusBar.image[t].style.display = 'none'; }); - ["btn1","btn2","btn3","btn4","btn5","btn6","btn7"].forEach(function (t) { + ["btn1","btn2","btn3","btn4","btn5","btn6","btn7","btn8"].forEach(function (t) { core.statusBar.image[t].style.display = 'block'; }) } else { - ["btn1","btn2","btn3","btn4","btn5","btn6","btn7"].forEach(function (t) { + ["btn1","btn2","btn3","btn4","btn5","btn6","btn7","btn8"].forEach(function (t) { core.statusBar.image[t].style.display = 'none'; }); - ["book","fly","toolbox","keyboard","save","load","settings"].forEach(function (t) { + ["book","fly","toolbox","save","load","settings"].forEach(function (t) { core.statusBar.image[t].style.display = 'block'; }); - core.statusBar.image.keyboard.style.display = core.domStyle.isVertical ? "block":"none"; + core.statusBar.image.keyboard.style.display + = core.statusBar.image.shop.style.display + = core.domStyle.isVertical ? "block":"none"; } } @@ -3033,13 +3029,13 @@ control.prototype.resize = function(clientWidth, clientHeight) { toolBarTop = statusBarHeight + canvasWidth; toolBarBorder = '3px '+borderColor+' solid'; - toolsHeight = scale * BASE_LINEHEIGHT; + toolsHeight = scale * BASE_LINEHEIGHT * 0.95; toolsPMaxwidth = scale * DEFAULT_BAR_WIDTH * .4; toolsBackground = (core.status.globalAttribute||core.initStatus.globalAttribute).toolsBackground; borderRight = '3px '+borderColor+' solid'; margin = scale * SPACE * 2; - toolsMargin = scale * SPACE * 4; + toolsMargin = scale * SPACE * 3; fontSize = DEFAULT_FONT_SIZE * scale; toolbarFontSize = DEFAULT_FONT_SIZE * scale; musicBtnRight = 3; diff --git a/libs/ui.js b/libs/ui.js index dca509c2..09eac7cc 100644 --- a/libs/ui.js +++ b/libs/ui.js @@ -2836,6 +2836,7 @@ ui.prototype.drawPaint = function () { core.setStrokeStyle('paint', '#FF0000'); core.statusBar.image.keyboard.style.opacity = 0; + core.statusBar.image.shop.style.opacity = 0; core.statusBar.image.book.src = core.statusBar.icons.paint.src; core.statusBar.image.fly.src = core.statusBar.icons.erase.src; diff --git a/main.js b/main.js index 1765b335..0f6da394 100644 --- a/main.js +++ b/main.js @@ -100,6 +100,7 @@ function main() { 'fly': document.getElementById("img-fly"), 'toolbox': document.getElementById("img-toolbox"), 'keyboard': document.getElementById("img-keyboard"), + 'shop': document.getElementById('img-shop'), 'save': document.getElementById("img-save"), 'load': document.getElementById("img-load"), 'settings': document.getElementById("img-settings"), @@ -109,7 +110,8 @@ function main() { 'btn4': document.getElementById("img-btn4"), 'btn5': document.getElementById("img-btn5"), 'btn6': document.getElementById("img-btn6"), - 'btn7': document.getElementById("img-btn7") + 'btn7': document.getElementById("img-btn7"), + 'btn8': document.getElementById("img-btn8"), }, 'icons': { 'floor': 0, @@ -127,30 +129,31 @@ function main() { 'fly': 11, 'toolbox': 12, 'keyboard': 13, - 'save': 14, - 'load': 15, - 'settings': 16, - 'play': 17, - 'pause': 18, - 'stop': 19, - 'speedDown': 20, - 'speedUp': 21, - 'rewind': 22, - 'equipbox': 23, - 'mana': 24, - 'skill': 25, - 'paint': 26, - 'erase': 27, - 'empty': 28, - 'exit': 29, - 'btn1': 30, - 'btn2': 31, - 'btn3': 32, - 'btn4': 33, - 'btn5': 34, - 'btn6': 35, - 'btn7': 36, - 'shop': 37 + 'shop': 14, + 'save': 15, + 'load': 16, + 'settings': 17, + 'play': 18, + 'pause': 19, + 'stop': 20, + 'speedDown': 21, + 'speedUp': 22, + 'rewind': 23, + 'equipbox': 24, + 'mana': 25, + 'skill': 26, + 'paint': 27, + 'erase': 28, + 'empty': 29, + 'exit': 30, + 'btn1': 31, + 'btn2': 32, + 'btn3': 33, + 'btn4': 34, + 'btn5': 35, + 'btn6': 36, + 'btn7': 37, + 'btn8': 38 }, 'floor': document.getElementById('floor'), 'name': document.getElementById('name'), @@ -509,6 +512,14 @@ main.statusBar.image.keyboard.onclick = function (e) { main.core.openKeyBoard(true); } +////// 点击状态栏中的快捷商店键盘时 ////// +main.statusBar.image.shop.onclick = function (e) { + e.stopPropagation(); + + if (main.core.isPlaying()) + main.core.openQuickShop(true); +} + ////// 点击状态栏中的存档按钮时 ////// main.statusBar.image.save.onclick = function (e) { e.stopPropagation(); @@ -606,6 +617,11 @@ main.statusBar.image.btn7.onclick = function (e) { main.core.onkeyUp({"keyCode": 55}); }; +main.statusBar.image.btn8.onclick = function (e) { + e.stopPropagation(); + main.core.onkeyUp({"keyCode": 56}); +}; + ////// 点击“开始游戏”时 ////// main.dom.playGame.onclick = function () { main.dom.startButtons.style.display='none'; diff --git a/project/images/icons.png b/project/images/icons.png index 44ae162f..557b4808 100644 Binary files a/project/images/icons.png and b/project/images/icons.png differ