Hey again,
I am busy working on my game's inventory system and have encountered a small (yet significant) roadblock.
I would assume that most people are familiar with standard RPG inventory system functionality. Our version is based on square item icons (32x32) and a one-item-per-inv-slot scheme. As usual, when you click on an item in your inventory, you "pick it up" and the mouse cursor image changes to reflect the in-hand item.
The problem arises when I swap the mouse cursor to the item icon. I want to use the centre of the item icon as the mouse cursor point (instead of the usual top-left corner). Upon some investigation, I noticed that the "target" mouse cursor in the TaharezLook imageset has XOffset and YOffset values to address this idea. I also know that the XOffset and YOffset are properties of an Image object (and are applied every time that particular Image is rendered) -- and this is precisely why the same solution has not worked for me.
Since I am using these item icons as more than a mouse cursor (i.e. the same image needs to rest in a backpack slot, etc.), I need to set the XOffset/YOffset when the item is picked up and re-set it when the item is put back down... but there are no such set methods!
What should I do? Any ideas?
Thanks in advance.
Ryan
Setting XOffset/YOffset at runtime... how?
Moderators: CEGUI MVP, CEGUI Team
Return to “Modifications / Integrations / Customisations”
Who is online
Users browsing this forum: No registered users and 4 guests