move, copy, cut and paste blocks
This commit is contained in:
parent
396b984ca5
commit
f2796b1bd0
@ -403,19 +403,19 @@ editor.constructor.prototype.listen=function () {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
// Ctrl+C, Ctrl+X, Ctrl+V
|
// Ctrl+C, Ctrl+X, Ctrl+V
|
||||||
if (e.ctrlKey && e.keyCode == 67) {
|
if (e.ctrlKey && e.keyCode == 67 && !selectBox.isSelected()) {
|
||||||
copyedInfo = editor.copyFromPos();
|
copyedInfo = editor.copyFromPos();
|
||||||
printf('该点事件已复制');
|
printf('该点事件已复制');
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (e.ctrlKey && e.keyCode == 88) {
|
if (e.ctrlKey && e.keyCode == 88 && !selectBox.isSelected()) {
|
||||||
copyedInfo = editor.copyFromPos();
|
copyedInfo = editor.copyFromPos();
|
||||||
editor.clearPos(true, null, function () {
|
editor.clearPos(true, null, function () {
|
||||||
printf('该点事件已剪切');
|
printf('该点事件已剪切');
|
||||||
})
|
})
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (e.keyCode == 86) {
|
if (e.ctrlKey && e.keyCode == 86 && !selectBox.isSelected()) {
|
||||||
if (!copyedInfo) {
|
if (!copyedInfo) {
|
||||||
printe("没有复制的事件");
|
printe("没有复制的事件");
|
||||||
return;
|
return;
|
||||||
@ -432,6 +432,12 @@ editor.constructor.prototype.listen=function () {
|
|||||||
});
|
});
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
// DELETE
|
||||||
|
if (e.keyCode == 46 && !selectBox.isSelected()) {
|
||||||
|
editor.clearPos(true);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
// ESC
|
||||||
if (e.keyCode == 27) {
|
if (e.keyCode == 27) {
|
||||||
if (selectBox.isSelected()) {
|
if (selectBox.isSelected()) {
|
||||||
editor_mode.onmode('');
|
editor_mode.onmode('');
|
||||||
|
|||||||
@ -215,7 +215,7 @@ tip.showHelp = function(value) {
|
|||||||
'ESC或点击空白处可以自动保存当前修改',
|
'ESC或点击空白处可以自动保存当前修改',
|
||||||
'H键可以打开操作帮助哦',
|
'H键可以打开操作帮助哦',
|
||||||
'tileset贴图模式下可以按选中tileset素材,并在地图上拖动来一次绘制一个区域',
|
'tileset贴图模式下可以按选中tileset素材,并在地图上拖动来一次绘制一个区域',
|
||||||
'可以拖动地图上的图块和事件,或按Ctrl+C, Ctrl+X和Ctrl+V进行复制,剪切和粘贴'
|
'可以拖动地图上的图块和事件,或按Ctrl+C, Ctrl+X和Ctrl+V进行复制,剪切和粘贴,Delete删除'
|
||||||
];
|
];
|
||||||
if (value == null) value = Math.floor(Math.random() * tips.length);
|
if (value == null) value = Math.floor(Math.random() * tips.length);
|
||||||
printf('tips: ' + tips[value])
|
printf('tips: ' + tips[value])
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user