Customizing buttons

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
User avatar
isobellesophia
Miko-Class Veteran
Posts: 979
Joined: Mon Jan 07, 2019 2:55 am
Completed: None
Projects: Maddox and Friends! (AI Teacher friend), Friendly Universities! (Soon)
Organization: Friendly Teachers series
Deviantart: SophBelle
itch: Child Creation
Location: Philippines, Mindanao
Contact:

Customizing buttons

#1 Post by isobellesophia »

Hello again everyone.

I am working currently on my game GUI's, and i had an idea which is i don't know how to solve it..

So in the main menu, there are obviously buttons for what you wanted to press, what i want is.. there is an image icon next to the main menu button text.
sketch-1573464322967.png
Thanks for who could help.
I am a friendly user, please respect and have a good day.


Image

Image


User avatar
deltadidirac
Regular
Posts: 123
Joined: Fri Nov 30, 2018 5:00 am
Projects: Artworks and Comics
Tumblr: deltadidirac
Deviantart: Deltadidirac67
Location: Europe
Contact:

Re: Customizing buttons

#2 Post by deltadidirac »

isobellesophia wrote: Mon Nov 11, 2019 5:25 am Hello again everyone.

I am working currently on my game GUI's, and i had an idea which is i don't know how to solve it..

So in the main menu, there are obviously buttons for what you wanted to press, what i want is.. there is an image icon next to the main menu button text.

sketch-1573464322967.png

Thanks for who could help.
I think that the more simple thing you can do is to open your software editing for image (photoshop or another is the same...)
in the game/gui/button folder you will find the idle-hover "navigation button", open these two last image with your software and re-draw it as you want (in this case you can simply add your heart) and save all exactly with the same name and dimension reslution etc... Done!

after you will check and set correctly all the texts of the buttons to not over-write your "heart"
(these texts you would find or in the gui script, or in the screen script.)

bye

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

Re: Customizing buttons

#3 Post by Imperf3kt »

If you want to do this with textbuttons, just add the image tag within the button text.

Code: Select all

textbutton _("Some button {image='images/some_image.png'}") action NullAction()
Warning: May contain trace amounts of gratuitous plot.
pro·gram·mer (noun) An organism capable of converting caffeine into code.

Current project: GGD Mentor

Twitter

User avatar
isobellesophia
Miko-Class Veteran
Posts: 979
Joined: Mon Jan 07, 2019 2:55 am
Completed: None
Projects: Maddox and Friends! (AI Teacher friend), Friendly Universities! (Soon)
Organization: Friendly Teachers series
Deviantart: SophBelle
itch: Child Creation
Location: Philippines, Mindanao
Contact:

Re: Customizing buttons

#4 Post by isobellesophia »

Oops, didnt know that i found this one of the threads, thanks for the help!
I am a friendly user, please respect and have a good day.


Image

Image


Post Reply

Who is online

Users browsing this forum: Bing [Bot]