清除最近使用图块

This commit is contained in:
ckcz123 2020-05-05 21:02:18 +08:00
parent 9c04714f9a
commit 0554ac2d71
6 changed files with 13 additions and 7 deletions

View File

@ -52,6 +52,7 @@ function editor() {
left1 : document.getElementById('left1'),
editModeSelect :document.getElementById('editModeSelect'),
mid2 : document.getElementById('mid2'),
clearLastUsedBtn: document.getElementById('clearLastUsedBtn'),
lastUsedDiv: document.getElementById('lastUsedDiv'),
lastUsed: document.getElementById('lastUsed'),
lastUsedCtx: document.getElementById('lastUsed').getContext('2d'),

View File

@ -35,6 +35,7 @@ editor_listen_wrapper = function (editor) {
editor.dom.clearLoc.onmousedown = editor.uifunctions.clearLoc_click
editor.dom.lastUsed.onmousedown = editor.uifunctions.lastUsed_click;
editor.dom.clearLastUsedBtn.onclick = editor.uifunctions.clearLastUsedBtn_click;
editor.dom.lockMode.onchange = editor.uifunctions.lockMode_onchange;
editor.dom.brushMod.onchange = editor.uifunctions.brushMod_onchange

View File

@ -742,7 +742,13 @@ editor_mappanel_wrapper = function (editor) {
return;
}
editor.uifunctions.clearLastUsedBtn_click = function () {
if (editor.isMobile) return;
editor.uivalues.lastUsed = [];
editor.config.set('lastUsed', []);
editor.updateLastUsedMap();
}
/////////////////////////////////////////////////////////////////////////////

View File

@ -315,7 +315,7 @@
</div>
<div id="mid2" style="display: none">
<p style="margin: 10px">最近使用的图块列表:</p>
<p style="margin: 10px">最近使用的图块列表: <button id='clearLastUsedBtn'>清除</button></p>
<div class="map" style="height: 160px; margin-top: 25px" id="lastUsedDiv">
<canvas class='gameCanvas' id='lastUsed' width='416' height='160'></canvas>
</div>

View File

@ -359,7 +359,7 @@
</div>
</div>
<div id="mid2">
<p style="margin: 10px">最近使用的图块列表</p>
<p style="margin: 10px">最近使用的图块列表Ctrl+滚轮放缩) <button id='clearLastUsedBtn'>清除</button></p>
<div class="map" id="lastUsedDiv">
<canvas id='lastUsed' width='416' height='416' style="overflow: hidden"></canvas>
</div>

View File

@ -13,7 +13,7 @@
12. “设置怪物属性”事件的下拉框目前只支持一部分另一部分只能通过手敲json再解析来得到希望提供完整支持
13. 建议给core.moveAction(callback)提供对应的事件,用于在事件中让勇士像事件外一样移动,从而正常触发跑毒和阻激夹域捕等
14. core.openShop()和对应的事件,建议在用于公共事件时简单地退化为“插入公共事件”而不要打断当前事件,把决定权交给作者
15. “等待用户操作”虽然提供了场合块但还不支持将多个按键的场合合并比如空格、回车和C键一般会被作者予以合并执行内容如果只是大致相同也值得合并在块内由作者根据flag再行分歧建议支持一下
(已完成!) 15. “等待用户操作”虽然提供了场合块但还不支持将多个按键的场合合并比如空格、回车和C键一般会被作者予以合并执行内容如果只是大致相同也值得合并在块内由作者根据flag再行分歧建议支持一下
16. “绘制描边文本”事件建议加一个“描边颜色”参数,目前只能描黑边
17. “设置画布属性”的基准线建议增加'hanging'和'ideographic'这两种模式
18. 建议修复“绘制多行文本”时行距比字号大不太多会导致各行下缘丢失的bug加大行距又会导致第一行的纵坐标难以估计此bug在道具商店和1.3倍行距英文看的很明显
@ -22,10 +22,8 @@
(已完成!) defaultGround全局可用
(已完成!) 对floorIds和图片进行检测
(已完成!) 删除绘图模式
(已完成!) 清除最近使用图块