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
User avatar
leon
Miko-Class Veteran
Posts: 554
Joined: Sun Oct 09, 2011 11:15 pm
Completed: Visual Novel Tycoon, Night at the Hospital, Time Labyrinth, The Buried Moon, Left of Center, Super Otome Quest
Projects: Lemon Project, Porcelain Heart, Dream's Dénouement
Organization: Team ANARKY
Contact:

Re: Imagebutton GUI Framework [GxImagebuttons]

#61 Post by leon » Wed Oct 14, 2015 2:11 am

1. It's an audio channel. Check out documentation on audio actions and Ren'Py audio.
2. It's an ATL effect. You can find a definitions for these elsewhere in the code.

User avatar
bloodyhair
Regular
Posts: 61
Joined: Tue Aug 11, 2015 7:20 am
Deviantart: Takada-Wang
Contact:

Re: Imagebutton GUI Framework [GxImagebuttons]

#62 Post by bloodyhair » Thu Oct 15, 2015 7:49 am

I finally figure out the sound channel. Thank you very much :D

User avatar
natsumachi
Regular
Posts: 32
Joined: Sat Oct 29, 2011 8:52 pm
Completed: Re∞Birth [BL]
Projects: Ferfecir [BL]
Organization: Milky Cherry
Location: NZ
Contact:

Re: Imagebutton GUI Framework [GxImagebuttons]

#63 Post by natsumachi » Fri Apr 01, 2016 9:16 pm

Thank you so much for this tutorial code! I never really understood imagemaps either, and this is so easy to use. My main menu is exactly how I want it now with only a few lines of code. ;w;

User avatar
LimeLord
Newbie
Posts: 3
Joined: Sun Jun 05, 2016 3:50 pm
Tumblr: limelord
Contact:

Re: Imagebutton GUI Framework [GxImagebuttons]

#64 Post by LimeLord » Wed Jun 08, 2016 4:38 am

Ahhh Thanks a ton! Now I can reconfigure things to work the way I want them to.
I was wondering if there was an easier work around for the character's icon in in the text box.
Now I know! HA!

osnofla
Newbie
Posts: 4
Joined: Sat Jun 11, 2016 12:12 pm
Contact:

Re: Imagebutton GUI Framework [GxImagebuttons]

#65 Post by osnofla » Sat Jun 11, 2016 12:26 pm

Thank you very much for your GUI, reading the comments I'm sure it must be the solution to my problems.
However, I've got some trouble opening the file.
Specifically, I get the following error message:

Code: Select all

I'm sorry, but an uncaught exception occurred.

While running game code:
  File "game/Image buttons GUI sample/example.rpy", line 24, in script
    init python:
  File "game/Image buttons GUI sample/example.rpy", line 27, in <module>
    import keywords
ImportError: No module named keywords

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

Full traceback:
  File "game/Image buttons GUI sample/example.rpy", line 24, in script
    init python:
  File "Z:\FLA884\Renpy\renpy-6.18.1-sdk\renpy\ast.py", line 806, in execute
    renpy.python.py_exec_bytecode(self.code.bytecode, self.hide, store=self.store)
  File "Z:\FLA884\Renpy\renpy-6.18.1-sdk\renpy\python.py", line 1577, in py_exec_bytecode
    exec bytecode in globals, locals
  File "game/Image buttons GUI sample/example.rpy", line 27, in <module>
    import keywords
ImportError: No module named keywords

Windows-XP-5.1.2600-SP3
Ren'Py 6.99.10.1227
Renpy Imagebuttons GUI Sample 1.0

Could you (or anybody else) help me with this?
Maybe my Renpy copy missed some file? Am I doing anything wrong (a mistake with the placement of the files)?
Any help would be appreciated, thanks in advance.




EDIT (June 16 2016) - OK, I get it fixed

User avatar
Bryy
Veteran
Posts: 339
Joined: Thu Dec 20, 2012 10:12 pm
Completed: Army of Tentacles 1 & 2, Paper Shakespeare: To Date or Not To Date?
Projects: Furries & Scalies & Bears OH MY!, The Ghost of Joe Papp 2: The Dragons of Joe Papp
Organization: Stegalosaurus Game Development
Location: Bay Area, CA
Contact:

Re: Imagebutton GUI Framework [GxImagebuttons]

#66 Post by Bryy » Sun Jul 31, 2016 5:07 am

Two things:

1) I randomly get a "no click.wav" error
2) I can't properly get imagebuttons on the Nav screen to move past certain xpos and ypos points.

User avatar
Colby Alighieri
Regular
Posts: 74
Joined: Thu Apr 07, 2011 10:39 am
Completed: [KN]Hope In The Morning(Willow's Dream Diary)
Projects: The Last Order: Black Wings
Organization: InsertNameHere Productions
Location: Quezon City, Philippines
Contact:

Re: Imagebutton GUI Framework [GxImagebuttons]

#67 Post by Colby Alighieri » Wed Nov 02, 2016 12:26 am

Hello! I don't want to necropost but I get this error when I attempt to Launch the Project. Would love to brush up on Imagebuttons again with the latest Ren'Py.

Code: Select all

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 0x03D6EE30>

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

Full traceback:
  File "game/example.rpy", line 113, in script
    image example = __Example()
  File "C:\Users\Hp\Desktop\renpy-6.99.11-sdk\renpy-6.99.11-sdk\renpy\ast.py", line 900, in execute
    renpy.exports.image(self.imgname, img)
  File "C:\Users\Hp\Desktop\renpy-6.99.11-sdk\renpy-6.99.11-sdk\renpy\exports.py", line 342, in image
    d = renpy.easy.displayable(d)
  File "C:\Users\Hp\Desktop\renpy-6.99.11-sdk\renpy-6.99.11-sdk\renpy\easy.py", line 105, in displayable
    raise Exception("Not a displayable: %r" % (d,))
Exception: Not a displayable: <store._m1_example__Example object at 0x03D6EE30>

Windows-7-6.1.7601-SP1
Ren'Py 6.99.11.1749
Renpy Imagebuttons GUI Sample 1.0
Stagnant? Me too!
Send me a note to my dA Account and I'll see what I can do~!

DaKriKi
Newbie
Posts: 3
Joined: Wed Nov 02, 2016 9:52 pm
Contact:

Re: Imagebutton GUI Framework [GxImagebuttons]

#68 Post by DaKriKi » Wed Nov 02, 2016 10:20 pm

Colby Alighieri wrote:Hello! I don't want to necropost but I get this error when I attempt to Launch the Project. Would love to brush up on Imagebuttons again with the latest Ren'Py.

Code: Select all

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 0x03D6EE30>

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

Full traceback:
  File "game/example.rpy", line 113, in script
    image example = __Example()
  File "C:\Users\Hp\Desktop\renpy-6.99.11-sdk\renpy-6.99.11-sdk\renpy\ast.py", line 900, in execute
    renpy.exports.image(self.imgname, img)
  File "C:\Users\Hp\Desktop\renpy-6.99.11-sdk\renpy-6.99.11-sdk\renpy\exports.py", line 342, in image
    d = renpy.easy.displayable(d)
  File "C:\Users\Hp\Desktop\renpy-6.99.11-sdk\renpy-6.99.11-sdk\renpy\easy.py", line 105, in displayable
    raise Exception("Not a displayable: %r" % (d,))
Exception: Not a displayable: <store._m1_example__Example object at 0x03D6EE30>

Windows-7-6.1.7601-SP1
Ren'Py 6.99.11.1749
Renpy Imagebuttons GUI Sample 1.0

What this guy said

LivePlayLove
Newbie
Posts: 2
Joined: Sun Nov 08, 2015 8:42 am
Contact:

Re: Imagebutton GUI Framework [GxImagebuttons]

#69 Post by LivePlayLove » Fri Nov 11, 2016 9:20 pm

I tried opening it with Renpy 6.99 but it crashes... :(

TheOtherNewGuy
Regular
Posts: 26
Joined: Wed Nov 16, 2016 2:53 am
Contact:

Re: Imagebutton GUI Framework [GxImagebuttons]

#70 Post by TheOtherNewGuy » Sun Nov 20, 2016 5:05 am

crashes for me too.

agl
Regular
Posts: 50
Joined: Tue Jul 19, 2016 5:09 am
Contact:

Re: Imagebutton GUI Framework [GxImagebuttons]

#71 Post by agl » Mon Dec 05, 2016 2:11 am

some error

Shirral
Newbie
Posts: 1
Joined: Tue Dec 27, 2016 3:14 pm
Contact:

Re: Imagebutton GUI Framework [GxImagebuttons]

#72 Post by Shirral » Tue Dec 27, 2016 3:23 pm

Yeah, same issue here. It seems the two latest releases of Ren'Py have some problem with it; try downloading 6.99.10 - it's still working with this version.

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

Re: Imagebutton GUI Framework [GxImagebuttons]

#73 Post by Imperf3kt » Wed Dec 28, 2016 1:36 am

It's probably the new (very confusing) GUI is not compatible.
For this exact reason, I refuse to use the new GUI as pretty much everything I've spent a year learning, is now moot.
Warning: May contain trace amounts of gratuitous plot.
pro·gram·mer (noun) An organism capable of converting caffeine into code.

Todo list:
Actually finish a project

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

Re: Imagebutton GUI Framework [GxImagebuttons]

#74 Post by trooper6 » Wed Dec 28, 2016 10:00 am

Imperf3kt wrote:It's probably the new (very confusing) GUI is not compatible.
For this exact reason, I refuse to use the new GUI as pretty much everything I've spent a year learning, is now moot.
It isn't the new GUI. The problem with the framework comes down to how it chooses to show bits of example code. When I get some free time I'll look into a fixing it.
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

User avatar
Donmai
Eileen-Class Veteran
Posts: 1823
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]

#75 Post by Donmai » Wed Dec 28, 2016 1:04 pm

trooper6 is right. This project uses an outdated code from the Ren'Py tutorial game to show the code examples on screen. In fact, if you replace the 'example.rpy' script here with a copy of 'examples.rpy' from the tutorial game folder, the project will run. There will still be some problems, due to the different game resolution and text size, but that's a start. You will still have to tweek the transform values, so the sample code appears on the proper place (maybe trying to copy the values from the current script to the new one will do). I'm lacking the time to do it now... :)

Edit (some time later): Yep, I made it work by replacing the old 'example.rpy' with a copy of 'examples.rpy' from a new version of the Ren'Py tutorial game. I just changed lines 12-23 to:

Code: Select all

transform example_transform:
    ypos 140 yanchor 1.0 xpos 0 xanchor 0

    on replace:
        crop (0, 0, 1900, 300)
        linear .5 crop (0, 0, 1900, 120)
    on show:
        crop (0, 0, 1900, 300)
        linear .5 crop (0, 0, 1900, 120)
 
    on hide:
        linear .5 crop (0, 0, 1900, 0)
and lines 102 and 103 to:

Code: Select all

            ct = Text(code, size=12, color="#000")
            vp = Viewport(ct, child_size=(2000, 2000), ymaximum=120, draggable=True, mousewheel=True)
Image
No, sorry! You must be mistaking me for someone else.
TOIRE NO HANAKO (A Story About Fear)

Post Reply

Who is online

Users browsing this forum: No registered users