- Sep 6, 2021
- 740
- 1,677
I'm just starting to learn Ren'py and I was wondering if someone could help me with something that should be simple, but seems overly complicated?
What i am trying to do is replace the "Return" text button from the game menu, with a custom image (basically the back arrow you see in many games) I've found some good tutorials on using the imagebutton function but they all assume you are using it on a custom screen - while the basic Ren'Py tutorial scripts use some sort of Style formatting, which is making me scratch my head.
So, instead of the the normal game menus (Load, Save, Preferences, About Help..) showing the "Return" at the bottom in the normal game overlay text box, I instead want to put an arrow graphic over in the right-lower corner of the screen (exact position to be determined later but around xpos 1700 and ypos 900) The images are called "gui/gm_return_idle.png" and "gui/gm_return_hover.png"
The renpy tutorial screens.rpy file references "return_button" four times...
line 388
line 476
line 496
... and line 532
Can anyone give me basic directions on how to replace the stock return text button with my image and put it in that lower-right position?
Thanks
What i am trying to do is replace the "Return" text button from the game menu, with a custom image (basically the back arrow you see in many games) I've found some good tutorials on using the imagebutton function but they all assume you are using it on a custom screen - while the basic Ren'Py tutorial scripts use some sort of Style formatting, which is making me scratch my head.
So, instead of the the normal game menus (Load, Save, Preferences, About Help..) showing the "Return" at the bottom in the normal game overlay text box, I instead want to put an arrow graphic over in the right-lower corner of the screen (exact position to be determined later but around xpos 1700 and ypos 900) The images are called "gui/gm_return_idle.png" and "gui/gm_return_hover.png"
The renpy tutorial screens.rpy file references "return_button" four times...
line 388
Code:
#style return_button
# is gui_button
style navigation_button_text is gui_button_text
Code:
textbutton _("Return"):
style "return_button"
action Return()
Code:
style return_button is navigation_button
style return_button_text is navigation_button_text
Code:
style return_button:
xpos gui.navigation_xpos
yalign 1.0
yoffset -45
Thanks