Imagebutton GUI Framework [GxImagebuttons]

A place for Ren'Py tutorials and reusable Ren'Py code.
Forum rules
Do not post questions here!

This forum is for example code you want to show other people. Ren'Py questions should be asked in the Ren'Py Questions and Announcements forum.
Message
Author
Zherot
Regular
Posts: 91
Joined: Tue Aug 08, 2017 9:10 pm
Contact:

Re: Imagebutton GUI Framework [GxImagebuttons]

#91 Post by Zherot » Fri Aug 11, 2017 6:15 pm

So... i saw the game and it is good but i still don't know what to do...

i put this in my code just to see if i could make a button:

screen home_menu1:
hbox:
style_group "quick"
xpos 650
ypos 410
textbutton _("Kitchen") action ShowMenu('save')

Nothing happens... what am i doing wrong?

User avatar
Donmai
Eileen-Class Veteran
Posts: 1864
Joined: Sun Jun 10, 2012 1:45 am
Completed: Toire No Hanako, Li'l Red [NaNoRenO 2013], The One in LOVE [NaNoRenO 2014], Running Blade [NaNoRenO 2016], The Other Question
Projects: Slumberland
Location: Brazil
Contact:

Re: Imagebutton GUI Framework [GxImagebuttons]

#92 Post by Donmai » Sat Aug 12, 2017 9:02 am

Question answered by carrot on another thread. viewtopic.php?p=462459#p462459
Image
No, sorry! You must be mistaking me for someone else.
TOIRE NO HANAKO (A Story About Fear)

redyolocup
Newbie
Posts: 1
Joined: Mon Aug 14, 2017 12:57 am
Contact:

Re: Imagebutton GUI Framework [GxImagebuttons]

#93 Post by redyolocup » Mon Aug 14, 2017 1:00 am

Hi,
I am unable to run this after I have downloaded, unzipped, and placed in directory. Here is the traceback, can someone help me?

I'm sorry, but an uncaught exception occurred.

While running game code:
File "game/example.rpy", line 113, in script
image example = __Example()
Exception: Not a displayable: <store._m1_example__Example object at 0x041A1530>

-- Full Traceback ------------------------------------------------------------

Full traceback:
File "C:\Users\Scott\Desktop\Game Creation\renpy\renpy-6.99.12.4-sdk\renpy\bootstrap.py", line 295, in bootstrap
renpy.main.main()
File "C:\Users\Scott\Desktop\Game Creation\renpy\renpy-6.99.12.4-sdk\renpy\main.py", line 419, in main
game.context().run(node)
File "game/example.rpy", line 113, in script
image example = __Example()
File "C:\Users\Scott\Desktop\Game Creation\renpy\renpy-6.99.12.4-sdk\renpy\ast.py", line 911, in execute
renpy.exports.image(self.imgname, img)
File "C:\Users\Scott\Desktop\Game Creation\renpy\renpy-6.99.12.4-sdk\renpy\exports.py", line 347, in image
d = renpy.easy.displayable(d)
File "C:\Users\Scott\Desktop\Game Creation\renpy\renpy-6.99.12.4-sdk\renpy\easy.py", line 108, in displayable
raise Exception("Not a displayable: %r" % (d,))
Exception: Not a displayable: <store._m1_example__Example object at 0x041A1530>

Windows-8-6.2.9200
Ren'Py 6.99.12.4.2187
Renpy Imagebuttons GUI Sample 1.0

User avatar
trooper6
Lemma-Class Veteran
Posts: 3645
Joined: Sat Jul 09, 2011 10:33 pm
Projects: A Close Shave
Location: Medford, MA
Contact:

Re: Imagebutton GUI Framework [GxImagebuttons]

#94 Post by trooper6 » Mon Aug 14, 2017 1:35 am

Have you downloaded from the updated file in this post?
viewtopic.php?f=51&t=22565&start=75#p455107
A Close Shave:
*Last Thing Done (Aug 17): Finished coding emotions and camera for 4/10 main labels.
*Currently Doing: Coding of emotions and camera for the labels--On 5/10
*First Next thing to do: Code in all CG and special animation stuff
*Next Next thing to do: Set up film animation
*Other Thing to Do: Do SFX and Score (maybe think about eye blinks?)
Check out My Clock Cookbook Recipe: http://lemmasoft.renai.us/forums/viewto ... 51&t=21978

zeroTheHero
Regular
Posts: 64
Joined: Mon May 07, 2018 10:49 am
Contact:

Re: Imagebutton GUI Framework [GxImagebuttons]

#95 Post by zeroTheHero » Thu Jan 31, 2019 11:55 am

Hey, so I downloaded the updated file but it still didn't work, then I tried Donmai's solution and it worked
viewtopic.php?f=51&t=22565&start=75#p439392

Basically, open 01examples.rpy from Tutorial project and copy everything, then open examples from Renpy Imagebutton... (this project), select all, paste and save. It should work now.

Edit: ok am I missing a 'example main.eff' image? I remember there being an image or something when Lucy says "Simple...to use ATL with imagebuttons, ...define the transformation like this", right now it's just blank. The next picture after this is also missing.

User avatar
Imperf3kt
Lemma-Class Veteran
Posts: 2806
Joined: Mon Dec 14, 2015 5:05 am
Location: Your monitor
Contact:

Re: Imagebutton GUI Framework [GxImagebuttons]

#96 Post by Imperf3kt » Thu Jan 31, 2019 2:20 pm

zeroTheHero wrote:
Thu Jan 31, 2019 11:55 am
Hey, so I downloaded the updated file but it still didn't work, then I tried Donmai's solution and it worked
viewtopic.php?f=51&t=22565&start=75#p439392

Basically, open 01examples.rpy from Tutorial project and copy everything, then open examples from Renpy Imagebutton... (this project), select all, paste and save. It should work now.

Edit: ok am I missing a 'example main.eff' image? I remember there being an image or something when Lucy says "Simple...to use ATL with imagebuttons, ...define the transformation like this", right now it's just blank. The next picture after this is also missing.
Odd, I just downloaded this (again) last night from the file trooper6 linked and didn't notice that.
Warning: May contain trace amounts of gratuitous plot.
pro·gram·mer (noun) An organism capable of converting caffeine into code.

Twitter

User avatar
trooper6
Lemma-Class Veteran
Posts: 3645
Joined: Sat Jul 09, 2011 10:33 pm
Projects: A Close Shave
Location: Medford, MA
Contact:

Re: Imagebutton GUI Framework [GxImagebuttons]

#97 Post by trooper6 » Thu Jan 31, 2019 10:31 pm

My post is just an implementation of Donmai's fix so that people don't have to do it themselves. So that is odd!
A Close Shave:
*Last Thing Done (Aug 17): Finished coding emotions and camera for 4/10 main labels.
*Currently Doing: Coding of emotions and camera for the labels--On 5/10
*First Next thing to do: Code in all CG and special animation stuff
*Next Next thing to do: Set up film animation
*Other Thing to Do: Do SFX and Score (maybe think about eye blinks?)
Check out My Clock Cookbook Recipe: http://lemmasoft.renai.us/forums/viewto ... 51&t=21978

zeroTheHero
Regular
Posts: 64
Joined: Mon May 07, 2018 10:49 am
Contact:

Re: Imagebutton GUI Framework [GxImagebuttons]

#98 Post by zeroTheHero » Thu Jan 31, 2019 10:46 pm

I thought so too, The only thing that has changed is that I updated my Ren'py to 7.00, It worked like usual before it

User avatar
Imperf3kt
Lemma-Class Veteran
Posts: 2806
Joined: Mon Dec 14, 2015 5:05 am
Location: Your monitor
Contact:

Re: Imagebutton GUI Framework [GxImagebuttons]

#99 Post by Imperf3kt » Thu Jan 31, 2019 11:51 pm

Hmm. Maybe it's renpy 7.0.0?
I'm using the latest which I think is 7.1.3 or something.

Though I've never encountered such an issue previously on any other renpy version and cannot think why it would do so.

Is your file corrupting upon download? I'll check the crc value of the known good downloaded file after lunch and post it here, you can check it with something like RapidCRC - if the numbers differ, it didn't download properly.

That's all I can think of.

The crc value checks out to be 40FC023B
Warning: May contain trace amounts of gratuitous plot.
pro·gram·mer (noun) An organism capable of converting caffeine into code.

Twitter

zeroTheHero
Regular
Posts: 64
Joined: Mon May 07, 2018 10:49 am
Contact:

Re: Imagebutton GUI Framework [GxImagebuttons]

#100 Post by zeroTheHero » Fri Feb 01, 2019 11:13 am

Imperf3kt wrote:
Thu Jan 31, 2019 11:51 pm
Hmm. Maybe it's renpy 7.0.0?
I'm using the latest which I think is 7.1.3 or something.

Though I've never encountered such an issue previously on any other renpy version and cannot think why it would do so.

Is your file corrupting upon download? I'll check the crc value of the known good downloaded file after lunch and post it here, you can check it with something like RapidCRC - if the numbers differ, it didn't download properly.

That's all I can think of.

The crc value checks out to be 40FC023B
Sorry for the late reply, was away from the computer.
I updated my ren'py to the latest version and it seems to have fixed the issue. I can get all the text on screen and it works without any problems, so maybe it was an update thing.

User avatar
Alexis_Royce
Newbie
Posts: 20
Joined: Tue Apr 10, 2012 2:34 pm
Projects: May I Take Your Order
Organization: imagiBROS
Tumblr: alexis_royce
Deviantart: alexisroyce
itch: alexisroyce
Contact:

Re: Imagebutton GUI Framework [GxImagebuttons]

#101 Post by Alexis_Royce » Tue Feb 11, 2020 2:23 pm

I know that this may go entirely against the general idea of image buttons, but is there any way to make them more accessible for people with visual impairments? I'd like to add a tag or something so that a screen reader or the self-voicing mode will still be able to identify those buttons.
Image

User avatar
Imperf3kt
Lemma-Class Veteran
Posts: 2806
Joined: Mon Dec 14, 2015 5:05 am
Location: Your monitor
Contact:

Re: Imagebutton GUI Framework [GxImagebuttons]

#102 Post by Imperf3kt » Tue Feb 11, 2020 3:18 pm

add an "alt" to them
for example:

Code: Select all

imagebutton:
    idle "idle. png" 
    hover "hover. png"
    action do_something
    alt "This text will be read by self-voicing"
Warning: May contain trace amounts of gratuitous plot.
pro·gram·mer (noun) An organism capable of converting caffeine into code.

Twitter

Post Reply

Who is online

Users browsing this forum: No registered users