Picking an item from inventory

Started by beenf, Wed 06/04/2011 19:02:23

Previous topic - Next topic

beenf

Hi, it's me again.  :-[

My problem now is with ingame inventory.
http://i36.photobucket.com/albums/e10/beenf/wut.jpg
Why doesn't the item let me choose it if I press the green area and only lets me choose the item if i click the red area?
Like with every item I have to click on top left corner to pick it. Is it because my inventory items are too big or what? I hope anyone has an idea how to fix this, so I could click on anywhere on the item to choose it

Wyz

Classic problem :D
The hotspot of your cursor isn't defined properly.
The hotspot is the pixel of your mouse curses that actually does the clicking, it should be at the tip of the arrowhead. Check all icons and see if the hotspot (the little cross) is set currently and you should be good. :)
Life is like an adventure without the pixel hunts.

TomatoesInTheHead

No, I don't think the problem is the hotspot, as beenf seems to use the default cursor, which is properly defined already ;)

The inventory items are indeed too big, or rather the other way around, the inventory window has too small items.
In the "GUIs" pane in the Editor, there should be one GUI called "gInventory" (if you're using the default template for your game, which I believe you do). If you open this, you can click on the white frame in the GUI editor to select the inventory container.
In the property editor, there should be properties "ItemWidth" and "ItemHeight", initially set to 22 and 40 pixels. Change these to the width and height of your inventory items (or the biggest inventory item, though you should try to make them approximately the same size), and it should work.


SMF spam blocked by CleanTalk