|
-
Apr 14th, 2002, 10:37 PM
#1
Working with list boxes...
I'm still working on my RPG...now, in the inventory menu, I'm going to have a list of the party's item in a list box to display them. Now, is it possible to have the user click on an item, and, for instance if it was a potion of healing, have it heal the person, and minus on eto inventory? If so, how do I figure out which item it is they click on? And then make it do something? Thanks
-
Apr 15th, 2002, 03:40 AM
#2
Addicted Member
the click event of a listbox will do, you can then refer to list.selected to get the selected item, then just -1 from your inv variable, update the listbox, add health to your health variable etc
Some Days, i just get this feeling that i'm helping to write dozens of Viruses...
-
Apr 15th, 2002, 06:20 AM
#3
Originally posted by Cypher02030
If so, how do I figure out which item it is they click on?
VB Code:
Msgbox List1.List(List1.ListIndex)
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|