Skip to content

Commit

Permalink
[hide] added new context menu to scene right click
Browse files Browse the repository at this point in the history
  • Loading branch information
EspeuteClement committed Nov 7, 2024
1 parent f50b289 commit 8359734
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions hide/comp/SceneEditor.hx
Original file line number Diff line number Diff line change
Expand Up @@ -1566,7 +1566,7 @@ class SceneEditor {
cameraController.onClick = function(e) {
switch( e.button ) {
case K.MOUSE_RIGHT:
selectNewObject();
selectNewObject(e);
case K.MOUSE_LEFT:
selectElements([]);
}
Expand Down Expand Up @@ -2198,7 +2198,7 @@ class SceneEditor {
if(e.button == K.MOUSE_RIGHT) {
var dist = hxd.Math.distance(scene.s2d.mouseX - lastPush[0], scene.s2d.mouseY - lastPush[1]);
if( dist > 5 ) return;
selectNewObject();
selectNewObject(e);
e.propagate = false;
return;
}
Expand Down Expand Up @@ -2273,7 +2273,7 @@ class SceneEditor {
interactives.set(elt,cast int);
}

function selectNewObject() {
function selectNewObject(e:hxd.Event) {
if( !objectAreSelectable )
return;
var parentEl = sceneData;
Expand Down Expand Up @@ -2329,7 +2329,7 @@ class SceneEditor {
keys : view.config.get("key.sceneeditor.gatherToMouse"),
},
];
new hide.comp.ContextMenu(menuItems);
hide.comp.ContextMenu2.createFromPoint(ide.mouseX, ide.mouseY, menuItems);
}

public function refreshInteractive(elt : PrefabElement) {
Expand Down

0 comments on commit 8359734

Please sign in to comment.