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

Discuss how to use the Ren'Py engine to create visual novels and story-based games. New releases are announced in this section.
Forum rules
This is the right place for Ren'Py help. Please ask one question per thread, use a descriptive subject like 'NotFound error in option.rpy' , and include all the relevant information - especially any relevant code and traceback messages. Use the code tag to format scripts.
Post Reply
Message
Author
UselessCoder
Regular
Posts: 96
Joined: Sun Jan 24, 2016 6:51 am
Projects: undisclosed...
Contact:

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

#1 Post by UselessCoder » Sun Jul 17, 2016 1:14 pm

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...
Last edited by UselessCoder on Wed Jul 20, 2016 3:17 am, edited 1 time in total.

User avatar
78909087
Veteran
Posts: 277
Joined: Sat Aug 16, 2014 2:33 pm
Completed: Dungeons and Don't Do It, Wake Up
Projects: Lethe
IRC Nick: Pacermist
Contact:

Re: Imagebutton "flashing" on hover...

#2 Post by 78909087 » Mon Jul 18, 2016 4:25 am

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...)
I am not friends with the sun.
Image

UselessCoder
Regular
Posts: 96
Joined: Sun Jan 24, 2016 6:51 am
Projects: undisclosed...
Contact:

Re: Imagebutton "flashing" on hover...

#3 Post by UselessCoder » Mon Jul 18, 2016 4:43 am

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. ^^

User avatar
gas
Miko-Class Veteran
Posts: 838
Joined: Mon Jan 26, 2009 7:21 pm
Contact:

Re: Imagebutton "flashing" on hover...

#4 Post by gas » Mon Jul 18, 2016 6:04 pm

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!
If you want to debate on a reply I gave to your posts, please QUOTE ME or i'll not be notified about. << now red so probably you'll see it.

10 ? "RENPY"
20 GOTO 10

RUN

UselessCoder
Regular
Posts: 96
Joined: Sun Jan 24, 2016 6:51 am
Projects: undisclosed...
Contact:

Re: Imagebutton "flashing" on hover...

#5 Post by UselessCoder » Wed Jul 20, 2016 3:17 am

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

Post Reply

Who is online

Users browsing this forum: Google [Bot], hell_oh_world