I’m writing a Client for an online game in C#.The client(Game) has inventory:
alt text http://img232.imageshack.us/img232/5606/inventoryplain.jpg
The 42 blocks in left and the 12 blocks in right must contain images of the “virtual items” that the “virtual character” contains.
I added 54 panels(42 left+12 right) on top of every single block with the idea to use the BackGroundImage property to add the image at a specific block.
Most things in that game are server sided so I receive the item position and the item via TCP Client.
The problem is that if I receive position “13” and assign that value to a integer variable named “position”, I can’t call
“panel+ position + .BackGroundImage = image
I either have to find a way to do this or remove all panels and use one component,but I would still have that problem.
Any help on this issue will be appreciated!
Thanks in Advance.
Add all the panels to an array.
Eg: