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.
screen inventory():
tag menu
use game_menu(_("Inventory"),scroll="viewport"):
style_prefix "about"
vbox:
text "Some descriptive text here for item 1."
image "inv_item_1.png"
text "Some descriptive text here for item 2."
image "inv_item_2.png"
text "Some descriptive text here for item 3."
image "inv_item_3.png"
text "Some descriptive text here for item 4."
image "inv_item_4.png"
How do I convert this so that instead of a viewable and scrollable list of text and static images it is a viewable and scrollable list of text and selectable images?
The main purpose behind this is so that when the image is selected/clicked it merely displays an enlarged version of selected image.
Last edited by AJFLink on Thu May 21, 2020 10:18 am, edited 1 time in total.
AJFLink wrote: ↑Wed May 20, 2020 11:57 am
...How do I convert this so that instead of a viewable and scrollable list of text and static images it is a viewable and scrollable list of text and selectable images? ...
Just replace text and image with the imagebutton.
Since you making an inventory, I suppose you have a list of items, so you could iterate through it to create buttons.
So, it might looks like
AJFLink wrote: ↑Wed May 20, 2020 11:57 am
...How do I convert this so that instead of a viewable and scrollable list of text and static images it is a viewable and scrollable list of text and selectable images? ...
Just replace text and image with the imagebutton.
Since you making an inventory, I suppose you have a list of items, so you could iterate through it to create buttons.
So, it might looks like