Page 1 of 1

[SOLVED] Imagebutton "flashing" on hover...

Posted: Sun Jul 17, 2016 1:14 pm
by UselessCoder
Hi,

I've tried two different approaches with imagebuttons.

in the first one I've created a "fixed position" imagebutton (both idle and hover), meaning that I've just created full screen .PNGs to avoid positioning them:

"idle" is a landmark;
"hover" is the landmark + the location name;
They perfectly work.

Then I've tried a different approach for the sake of avoiding to create those images for every single location and to gain more flexibility.

This time I've just created the landmark and the location name separately and then I've declared them like this:

Code: Select all

image shop_idle =  "images/button_idle.png"
image shop_hover = LiveComposite((0, 0),(0, 0), "images/button_hover.png", (-10, 50), "images/shop.png")
and this...partially works, meaning that when I roll over the button, sometimes it's like "flashing" and sometimes it doesn't even switch to its hover status.

What can be the reason for this?

PS
already checked the FocusMask True/None, it doesn't seem to affect it in anyway...

Thanks...

Re: Imagebutton "flashing" on hover...

Posted: Mon Jul 18, 2016 4:25 am
by 78909087
Hello! Amateur here, so sorry in advance if I'm wrong, but is it possible that there are vectors inside your picture button?

As in... There are segments that are 'see-through' or 'invisible'?

I've had problems with that in the past, so I was just wondering.
(I have too much difficulty with imagebuttons, despite how simple they're meant to be...)

Re: Imagebutton "flashing" on hover...

Posted: Mon Jul 18, 2016 4:43 am
by UselessCoder
78909087 wrote:Hello! Amateur here, so sorry in advance if I'm wrong, but is it possible that there are vectors inside your picture button?

As in... There are segments that are 'see-through' or 'invisible'?

I've had problems with that in the past, so I was just wondering.
(I have too much difficulty with imagebuttons, despite how simple they're meant to be...)
Tell me about it...Most of the times they're a PITA (which means a "pain coming from the back" rather than some greek delicacy, in this case lol).

Anyway, thanks for replying...Then no, there should be no vectors inside them as they're in full plain color. Even tho being PNGs they're transparent by definition, so I might try by turning them into JPGs and see what happens...I'll let everyone know. ^^

Re: Imagebutton "flashing" on hover...

Posted: Mon Jul 18, 2016 6:04 pm
by gas
Doesn't the first touple need to be the total size of the composed "widget"?
You're stating (0,0), maybe this create some issue for an hovering displayable.
Try check it!

Re: Imagebutton "flashing" on hover...

Posted: Wed Jul 20, 2016 3:17 am
by UselessCoder
gas wrote:Doesn't the first touple need to be the total size of the composed "widget"?
You're stating (0,0), maybe this create some issue for an hovering displayable.
Try check it!
You sir, are a genius...euphemism for "it perfectly worked"!

Thanks! :D