Lighting button when mouse is over in the menu doesn't work

TigroTigro Member Posts: 32
edited June 2015 in Working with GS (PC)

I have a 1920x1080px menu and a 1920x1080px overlays (also .pngs) for each button which I want to display over the menu when mouse is over the corresponding button. I created a helper actor which I cover the area of the button with and set it to change the alpha of the overlay to 1 when mouse is over or 0 if it isn't. Nothing happens regardless of where the cursor is, though. Could you please help me pinpoint the problem?

Here's the link to the project, it's in the main scene (called Scene 1): https://drive.google.com/file/d/0B8BGNr4MuvgoLVlaNDJTMU5UUmM/view?usp=sharing

Comments

  • SocksSocks London, UK.Member Posts: 12,822
    edited June 2015

    @Tigro said:
    I have a 1920x1080px menu and a 1920x1080px overlays (also .pngs) for each button which I want to display over the menu when mouse is over the corresponding button. I created a helper actor which I cover the area of the button with and set it to change the alpha of the overlay to 1 when mouse is over or 0 if it isn't. Nothing happens regardless of where the cursor is, though. Could you please help me pinpoint the problem?

    It works fine for me, when I mouse over 'start' it glows.

    The way you have your button glows set up is incredibly inefficient, you have an entire 1920 x 1080p image for just one tiny button !?

    You could get rid of the 1920 x 1080p image, and get rid of the button help actor and simply make the glow actor the right size - and move the 'if mouse over then change alpha to 1' rule into this new smaller actor.

  • TigroTigro Member Posts: 32

    Well, no idea why it doesn't not for me then :( I know it's inefficient but then I'd have to know the exact coordinates of the button's center to place it in the right spot and I don't really know how to derive it.

  • owen_dennisowen_dennis Just a guy, you know. Member, PRO Posts: 236
    edited June 2015

    @Tigro said:
    Well, no idea why it doesn't not for me then :( I know it's inefficient but then I'd have to know the exact coordinates of the button's center to place it in the right spot and I don't really know how to derive it.

    Take those buttons elements off the background image and instead make them into separate button actors. Then place those button actors on top of the background where you have them now. That'd be easier on you in the long run not only for situations like this, but also later when you have a moment of inspiration and think "oh it would be great if this button shot up from off screen at the beginning of this scene instead of just sitting there statically" etc.

    The advantage to it that Socks is talking about would be you could just have one glow actor that you can use on each button without having to make a new image for each one. Just put it below the buttons with a 0 alpha, then have it interpolate to 1 or something when the mouse is hovering over the button.

Sign In or Register to comment.