View Full Version : custom qmenu

08-24-2006, 11:03 PM
Okay, I'm creating a custom qmenu and I need to know how to display all of the players weapons and stuff. without doing it individually. I made sure ever weapon img is 32 by 32 so if that helps any. :/ Any thought?

08-24-2006, 11:56 PM
I've been thinking about doing this as well. You could have possitions saved with an index number, and a for loop that goes through all weapons, and puts them in their place acording to the index. Although this could be a bit sloppy, and there would have to be a limit on the number of items the player can have. I'm sure there has to a better way though.

08-25-2006, 12:07 AM
for (temp.weapon: player.weapons)
// Code

temp.weapon.name will get the weapon name, and I think either temp.weapon.icon or temp.weapon.image or so will get the image (someone correct me if I am wrong).

I guess to draw all icons onto one panel, you could use a GuiDrawingPanel. Similarly you could spawn other GUI controls such as GuiBitmapButtonCtrls for each weapon.