I'm designing a GUI for inventory system in my game. Right now, I'm using listbox as the way to select the item, but I've seen a work on Irrlicht that create GUI that look like a table that you can select the item by clicking,so
How can I create a GUI for selecting item that look like a table with the pictures of items to select from?
Inventory GUI design
You could always do a 3D approach.
Get mouse position
irr::scene::ISceneCollisionManager::getRayFromScreenCoordinates
to get a ray
irr::scene::ISceneCollisionManager::getSceneNodeFromRayBB
to get the node with which the ray collides (and hence the mouse is hovering over.)
And I guess you could put that on a 3D table with all the items on the table, or in a bag, or floating in space, or in a boat, or in a tree, or with green eggs and ham.
Get mouse position
irr::scene::ISceneCollisionManager::getRayFromScreenCoordinates
to get a ray
irr::scene::ISceneCollisionManager::getSceneNodeFromRayBB
to get the node with which the ray collides (and hence the mouse is hovering over.)
And I guess you could put that on a 3D table with all the items on the table, or in a bag, or floating in space, or in a boat, or in a tree, or with green eggs and ham.
-
- Posts: 602
- Joined: Sat Aug 23, 2003 2:03 am
- Location: Pottstown, PA
- Contact:
So I can just use "driver->draw2DRectangle(..)" to draw grids and then arrange the image file into each rectangle right. Then:
1> How can I select those images and let the game know that I'm selecting it?
2> I don't know why but my game crash it I load the same texture twice?
(getTexture then drop it, and later get it again)
1> How can I select those images and let the game know that I'm selecting it?
2> I don't know why but my game crash it I load the same texture twice?
(getTexture then drop it, and later get it again)