Here are the steps involved.
1. The player brings up the evidence menu. The thumbnail (Top) and description (Bottom) boxes are empty.
2. Click on a piece of evidence on the list. (Currently only luggage and autopsy.)
3. That brings up an image of the selected evidence and a description describing it.
I've gotten through steps 1 and 2, but the third step is what I'm stuck on.
I'm not sure how to tell the buttons to place an image and description in the boxes.
Here's a screenshot. And here's my current working code.
Code: Select all
screen inventory():
tag menu
use game_menu(_("Inventory")):
vpgrid:
default selected_item = None
cols 1
spacing 5
draggable True
mousewheel True
scrollbars "vertical"
side_xalign 0.0
for i in range(1, 2):
frame:
if evidence >= 1:
textbutton "Luggage" xysize (300, 25)
else:
textbutton "" xysize (300, 25)
frame:
if evidence >= 2:
textbutton "Autopsy" xysize (300, 25)
else:
textbutton "" xysize (300, 25)
#Thumbnail
frame:
xalign 1.0
yalign 0.0
xysize (250, 250)
vbox:
null #The game crashes unless there is something here.
#Description
frame:
xalign 1.0
yalign 1.0
xysize (600, 300)
vbox:
null
I want the boxes to be null until one of the items on the list is selected. I'm imagining something like: if luggage is selected, show luggage_pic and luggage_desc. else null
I think I would store the evidence images and descriptions somewhere. So for luggage I'll have:
Code: Select all
luggage_pic = "luggage.png" size (250, 250)
luggage_desc = text "It's a bag..."
I prefer instructions over a link to a similar thread. Unless the thread is EXACTLY like what I'm trying to do.
Anyway, I'm done rambling. I appreciate the help.