Update uievent onKeyDown
This commit is contained in:
parent
8f9d28aab9
commit
57ef15745c
@ -137,13 +137,7 @@ editor_ui_wrapper = function (editor) {
|
|||||||
|
|
||||||
// UI预览 & 地图选点
|
// UI预览 & 地图选点
|
||||||
if (editor.uievent && editor.uievent.isOpen) {
|
if (editor.uievent && editor.uievent.isOpen) {
|
||||||
e.preventDefault();
|
editor.uievent.onKeyDown(e);
|
||||||
if (e.keyCode == 27) editor.uievent.close();
|
|
||||||
else if (e.keyCode == 13) editor.uievent.confirm();
|
|
||||||
else if (e.keyCode == 87) editor.uievent.move(0, -1)
|
|
||||||
else if (e.keyCode == 65) editor.uievent.move(-1, 0)
|
|
||||||
else if (e.keyCode == 83) editor.uievent.move(0, 1);
|
|
||||||
else if (e.keyCode == 68) editor.uievent.move(1, 0);
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -572,6 +566,17 @@ editor_ui_wrapper = function (editor) {
|
|||||||
uievent.setPoint(core.floorIds[index]);
|
uievent.setPoint(core.floorIds[index]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
uievent.onKeyDown = function (e) {
|
||||||
|
if (e.keyCode == 27) editor.uievent.close();
|
||||||
|
else if (e.keyCode == 13) editor.uievent.confirm();
|
||||||
|
if (uievent.mode == 'selectPoint') {
|
||||||
|
if (e.keyCode == 87) editor.uievent.move(0, -1)
|
||||||
|
if (e.keyCode == 65) editor.uievent.move(-1, 0)
|
||||||
|
if (e.keyCode == 83) editor.uievent.move(0, 1);
|
||||||
|
if (e.keyCode == 68) editor.uievent.move(1, 0);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// ------ 搜索变量出现的位置,也放在uievent好了 ------ //
|
// ------ 搜索变量出现的位置,也放在uievent好了 ------ //
|
||||||
|
|
||||||
uievent.searchUsedFlags = function () {
|
uievent.searchUsedFlags = function () {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user