Make A Lightbox Or Pop-up For A Button

Discussion in 'How Can I...?' started by Christoph, Sep 26, 2016.

  1. Christoph

    Christoph Miniboss Boxer

    Joined:
    Oct 4, 2015
    Messages:
    2,807
    Likes Received:
    2,309
    Is it possible to make a lightbox or pop-up for a button?

    For example if I have a skip level button, I want a pop-up appear when the user taps on it that says: skip level for 1000 coins. Are you sure? And in this pop-up I have another two buttons that say: Yes or No!

    I have something similar set up right now with a second UI but the problem is when the original UI has animations in it, they all get interrupted and start all over if I include them in the second UI again to simulate the user never left the menu.

    Curious if someone has found a solution that works 100%.
     
  2. wesam_badr

    wesam_badr Miniboss Boxer

    Joined:
    Oct 10, 2015
    Messages:
    1,065
    Likes Received:
    479
    iam not sure what the problem is however you can separate the two ui with a world ui if it make a sense.
     
    Christoph likes this.
  3. Christoph

    Christoph Miniboss Boxer

    Joined:
    Oct 4, 2015
    Messages:
    2,807
    Likes Received:
    2,309
    Thanks for joining in wesam. The problem is the animation. Let's say I have a character that moves around. Some asteroids falling. Text and buttons scaling up and down or fading in and out. When I tap on the button all this animation immediately stop and the new UI is loaded. This looks like... Well... Exactly like that: a new UI is loading. But what I want is that it looks like a pop-up is opened over the existing UI. The first UI still should appear under the pop-up and its animation should continue without starting all over again. Does that explain it better?
     
  4. trudnai

    trudnai Miniboss Boxer

    Joined:
    Sep 25, 2015
    Messages:
    1,235
    Likes Received:
    701
    Two things popped into my mind as a possible solution:
    1. You can double a UI and on the second and new elements that looks like a pop-up window. So you do load a new UI but all in all it looks like just a new pop-up came up
    2. You use a URL button and write a custom code in Xcode to pop-up a real pop-up screen... Not sure how to communicate back to BuildBox though
     
    Christoph likes this.
  5. Christoph

    Christoph Miniboss Boxer

    Joined:
    Oct 4, 2015
    Messages:
    2,807
    Likes Received:
    2,309
    The first one is what I have right now but as I said, all animations stop when changing from one to another and that looks bad. About the second one no ideas lol.
     

Share This Page