How do I set menu to open based on where mouse pointer is?

0 favourites
  • 3 posts
From the Asset Store
10 Orchestral Soundtracks / ~2 mins each / 11 audio clips in total
  • Hey Construct wizards!

    Apologies for the "amazing" graphics but I'm more focused on proof of concept before I spend much time/resources on graphics.

    Referencing the graphic, when I click on one of the buttons (B1-B4), I would like the menu "A" to open below the button pressed. Not sure how to set the x,y for a sprite to open.

    Thank you in advance for any help you can offer up!

  • You can do something like this:

    Mouse on Button clicked
    Create Menu at (Button.x, Button.y+100)
    

    If your menu is complex and consists of multiple objects, it may be easier to compose it manually on the layout (somewhere off-screen), and define hierarchy connections between all objects of the menu. Then when a button is clicked, set menu position to (Button.x, Button.y+100) and it will move there with all its child objects.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • You can do something like this:

    > Mouse on Button clicked
    Create Menu at (Button.x, Button.y+100)
    

    If your menu is complex and consists of multiple objects, it may be easier to compose it manually on the layout (somewhere off-screen), and define hierarchy connections between all objects of the menu. Then when a button is clicked, set menu position to (Button.x, Button.y+100) and it will move there with all its child objects.

    Your suggestion looks perfect and I'm checking into it now. Many thanks! Updates forthcoming.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)