Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: Lazarus on Thu 23/02/2006 08:07:22

Title: Highlight buttons function (Solved)
Post by: Lazarus on Thu 23/02/2006 08:07:22
Hi I have this function which is pretty basic where when the mouse passes over objects,hotspots and characters it highlights the buttons (changes the Look at & Talk to sprites), which works okay. But now I also want it to also highlight the buttons when the mouse is over inventory items.

heres what I have so far:
function HighlightButtons() {

if (GetLocationType(mouse.x,mouse.y) == eLocationCharacter)
Ã,  gMainTalkto.NormalGraphic = 89;// Highlight Talk To

else if (GetLocationType(mouse.x,mouse.y) == eLocationHotspot)
Ã,  gMainLook.NormalGraphic = 84;// Highlight Look At

else if (GetLocationType(mouse.x,mouse.y) == eLocationObject)
Ã,  gMainLook.NormalGraphic = 84;// Highlight Look At

else if (GetLocationType(mouse.x, mouse.y) == eLocationNothing)
Ã,  gMainLook.NormalGraphic = 73;// Look At Normal
Ã,  gMainTalkto.NormalGraphic = 78;// Talk To Normal
}


Any help would be grateful
Title: Re: Highlight buttons function
Post by: Khris on Thu 23/02/2006 09:57:32
Use this:

http://www.adventuregamestudio.co.uk/manual/InventoryItem.GetAtScreenXY.htm
Title: Re: Highlight buttons function
Post by: Lazarus on Thu 23/02/2006 12:11:47
Thanks khrismuc
Thats what I was looking for