Image Selected Button

Discussion in 'How Can I...?' started by patostar, Apr 16, 2018.

  1. patostar

    patostar Avid Boxer

    Joined:
    Jan 27, 2018
    Messages:
    483
    Likes Received:
    86
    Hello, I have a button, in the world UI I uploaded the image and image selected to this button, but I want it when I click on the button to remain the image selected I don't want it to go back the Image! I hope you know what I mean, can I do it?
    For example if I have a red button and when I click on it it changes to blue, after releasing my finger I want it to stay blue.
     
  2. Coldwilson

    Coldwilson Avid Boxer

    Joined:
    Dec 18, 2017
    Messages:
    109
    Likes Received:
    45
    Hi patostar. It's an interesting one, I can see exactly why you'd want to do it. I've not tried myself but I'm thinking that perhaps you could add an animation (using the event on close so it only shows as you exit the UI) that introduces the pressed button image directly over the the button to create this effect.

    I think it might work. Let us know if it does.
     
  3. Coldwilson

    Coldwilson Avid Boxer

    Joined:
    Dec 18, 2017
    Messages:
    109
    Likes Received:
    45
    I just gave this a quick try and got something working.

    As a test I just added an image over my start button and on the event frame I set it to 'Open' pressed record and changed the image opacity to zero from the first frame. Then changed the Event to 'Close' pressed record and changed the image opacity to 1.

    Press play and the start button shows with no image, then press the start button and the image appears over the top of this button. So does seems to work.
     
    patostar likes this.
  4. patostar

    patostar Avid Boxer

    Joined:
    Jan 27, 2018
    Messages:
    483
    Likes Received:
    86
    Hi dear Coldwilson, thanks a lot for your help, I really appreciate it, but honestly I am trying to do what you said for many hours but I still can't do it :/ there is something wrong in what I am doing
    If you please can share the bbdoc file of the test that you did please? I really want to make it, it's necessary for my game
     
  5. Coldwilson

    Coldwilson Avid Boxer

    Joined:
    Dec 18, 2017
    Messages:
    109
    Likes Received:
    45
    Hi. Yeah no worries. I’ll knock up an example bbdoc using a demo game this evening when I get back from work.
     
    patostar likes this.
  6. Coldwilson

    Coldwilson Avid Boxer

    Joined:
    Dec 18, 2017
    Messages:
    109
    Likes Received:
    45
    Hi patostar,

    take a look at the attached bbdoc. All I've done is the following:
    1. create the button image I'd like to be displayed after start is pressed.
    2 In the main menu UI click Open on the event area, set frames to 1 and press record. Not sure if needed, but select frame 1. Then copy in the image you want to use and set opacity to 0.
    3. deselect record
    4. Click on Close on the event window and change the number of frames to give you a period of time to have this displayed. I've set to 30 for example.
    5. Press record again and select the first frame. For the same image change it's opacity to 1.

    That's all there is to my approach. Just press play to preview the game and you'll see the start button in grey. When you press it you'll see my red 'Loading' button.

    I'm still quite new so there may well be a better approach, so welcome thoughts from anyone else.
     

    Attached Files:

  7. patostar

    patostar Avid Boxer

    Joined:
    Jan 27, 2018
    Messages:
    483
    Likes Received:
    86
    Again man thanks a lot for your time and explanation, but too bad the file attached couldn't be opened, it says Unable to load data
    I have version 2.3.3
    What version do you have? there is something wrong I am not sure
     
  8. Coldwilson

    Coldwilson Avid Boxer

    Joined:
    Dec 18, 2017
    Messages:
    109
    Likes Received:
    45
    Oooh that's weird. I got the same thing after downloading. Infact I've found that if I change the file extension of a bbdoc file and then instantly change it back to .bbdoc, it gets the same error.

    However, the good news is that it seems that you can still open the file linked here (or if you did the rename I just tried) by starting BB and opening the file using the Open Project option. Give that a try.

    Failing that you've got my step by step guide, there's not many steps to follow.
     
  9. patostar

    patostar Avid Boxer

    Joined:
    Jan 27, 2018
    Messages:
    483
    Likes Received:
    86
    It's ok, I will follow your steps one more time lol, I hope it will work with me, yeah it happens with me a lot, corrupted files happen when I change bbdoc to zip and then extract them lol
    Thanks again for your time buddy
     

Share This Page