SUGGESTION: Advanced placement of Cursor Hotspot

Started by Alynn, Thu 14/06/2007 22:52:41

Previous topic - Next topic

Alynn

I was playing with the custom cursor hotspot (both the cross hair and use sprite number) and I noticed that if the hotspot (both custom and engine generated crosshair) is outside the origional inventory item sprite area, it is removed, or rather, not drawn.

What my suggestion is, is to allow either:

1) The ability to place the cursor hotspot for inventory items outside the inventory item sprite.

Example: I have 16x16 pixel inventory items, However many of them are large enough to take up most of that area. I'd like to place the hotspot at (upper left of the sprite being 0,0) at -2,18. Using magenta for the Inventory Item, and Cyan for the pointer, black being where no sprite is would look something like this.



2) Keep the cursor hotspot choice within the origional sprite, however allow the game created crosshairs, or user created hotspot sprites to be drawn even if they are not within the borders of the origional inventory sprite.

Example: The engine created crosshairs if placed in the upper right hand corner will only draw the center pixel, the left, and the bottom pixels of the crosshair, the top, and right part of the cross hair is not drawn. The same happens if you have a custom hotspot designator that would spill outside the inventory item sprite borders.

Well, that's it. I hope I explained it well enough.

Thanks

Gilbert

#1
I'm not quite sure if this is correct, but I think AGS just uses some generic functions (hardware? or system softwares?) for this part, that in most systems, if you use a sprite as the pointer, only a pixel within the dimension of the sprite can be assigned as the hotspot. If the engine is able to set the hotspot outside of the sprite, that may mean extra codes are needed to make the sprite bigger at runtime (may not be very good for animated cursors). This may not be undoable though, as adding the crosshair currently might mean the engine using a certain way of manipulating the sprite already.

In the mean time just crop the inventory sprites with larger size (it may mess things up if you need to fix this size to a certain limit for say displaying in the GUI though).

Alynn

Well to be honest that's why I thought of this.

My inventory needs to be 16X16 to get the effect I want in the GUI, but when they are used as cursors I need the extra space...

Hrm... I wonder... if I make a floating GUI and use just the arrow as the cursor for using inventory items, and just placing the true inventory item pic on a button on the floating gui, I'd get the same effect... Which shouldn't be too far out of the way since I have to make a custom inventory handler anyway...

Hrm.....

SMF spam blocked by CleanTalk