I want the description of a item to show up immediately after the item is being clicked or dragged.
To achieve that, I made another screen for the description but it would not show up unless I tried to close the window. The "Are you sure you want to quit" box popped up and the description would show up in the background.
I'm new to programming and not sure how to achieve my desired effect. Any help would be appreciated.
Code: Select all
init python:
def drag_activated(activated_item):
store.current = activated_item[0].drag_name
renpy.hide_screen("item_description")
renpy.show_screen("item_description")
screen item_description():
modal False
for item in Inventory.items:
frame:
background None
xpos 1000
ypos 500
xsize 500
ysize 400
if item.name == current:
text "[item.description]":
size 40
if current == "None":
text "Combine items to create something new.":
size 40
screen inventory():
modal True
add "background_inventory”
on "show" action Show("item_description")
draggroup:
for item in Inventory.items:
drag:
drag_name item.name
child "icon_%s"%(item.name)
xpos item.x_pos
ypos item.y_pos
drag_raise True
droppable False
dragged drag_inventory
activated drag_activated
screen room():
modal True
add "background_room"
imagebutton auto "inventory_icon_%s":
focus_mask True
action Show("inventory")
label part2:
call screen room