context menu done

This commit is contained in:
Yoshman29
2022-12-23 15:32:18 +01:00
parent 9ffea799c7
commit 2dbefc46d5
7 changed files with 99 additions and 8 deletions
@@ -54,6 +54,18 @@ class WindowDragHitbox extends FlxObject {
var screenPos = FlxG.mouse.getScreenPosition(FlxG.camera);
offset = FlxPoint.get(parent.content.winX - screenPos.x, parent.content.winY - screenPos.y);
dragging = true;
} else if (DesktopMain.mouseInput.justPressedRight) {
var input = DesktopMain.mouseInput;
new ContextMenu(input.screenPos.x, input.screenPos.y, [
{
name: "Close",
callback: function() {
parent.close();
}
}
], function(i) {
trace(i);
});
}
DesktopMain.mouseInput.cancel();
}