Best way to make a right click menu

I was wondering what would be the best to make a right click menu.
I was thinking about making a dialog, but can I place easily wherever I want on the screen . Or maybe there are other ways to do it ?

Hey,

Whats the issue with using a Menu? Is something not working? Which backend is this?

Cheers,
Ian

I meant like in your browser, when you do a right click , a menu appears at the place you clicked. You could do this with menu, make them appear where you click ?
In fact, I noticed I had no idea how to make a component show to a x,y position. But now that I’ve looked around , I see there is “left” and “top”. :slight_smile: so hopefully it should be quite easy .

Thanks ! :slight_smile:

So i had a very quick play, and something like this kinda works:

            var menu:Menu = ComponentMacros.buildComponent("assets/menu.xml");
            Screen.instance.registerEvent(MouseEvent.RIGHT_CLICK, function(e:MouseEvent) {
                menu.left = e.screenX;
                menu.top = e.screenY;
                Screen.instance.addComponent(menu);
            });

However, ive noticed some inconsistencies and bugs to be honest, which ill fix shortly / tomorrow. Ive defo used context menus myself in various apps, so i just need to double check how i did things there and maybe make some updates to core.

menus2

Thanks. Awesome ! It works sufficiently to make some tests and to work on the design :slight_smile:

OK, if you pull latest git versions of everything (haxeui-core mainly but you might need latest backed too) then things should work alot better now:

Cheers,
Ian

Hi ! thanks, it indeed seems to work perfectly now :smiley: