Getting a handle to a currently highlighted item

Place for sharing your game modifications for Life is Feudal: Your Own
User avatar
Tashka
 
Posts: 227
Joined: 02 Dec 2017, 17:00

Getting a handle to a currently highlighted item

Post by Tashka » 15 Jan 2018, 09:36

Hey. I'm trying to make a small immersion mod that would add "books" to the game - let's you rename, say, a bag to something like D76GwtRA, then hover over the said bag with a mouse, press some key and an in-game browser opens at http://pastebin.com/raw/D76GwtRA or something.

I'm completely new to torque scripting, so i want to ask is there a way to get a handle to the currently highlighted item? Right now that's the only problem. Anyone?
Shadow queen, tyrant, crooked whore, bloody goddess, Princess of Verna, self-proclaimed Queen in Kingdom of the North (Epleland)

Books for the people! - a client mod to let you write books and messages

User avatar
Tashka
 
Posts: 227
Joined: 02 Dec 2017, 17:00

Re: Getting a handle to a currently highlighted item

Post by Tashka » 16 Jan 2018, 09:40

nvm think i've found a way:

function GuiInventoryItem::onMouseEnter(%this)
{
Parent.onMouseEnter(%this);
echo("ENTERED!");
echo(%this.getId());
}

I just hope it's correct.
Shadow queen, tyrant, crooked whore, bloody goddess, Princess of Verna, self-proclaimed Queen in Kingdom of the North (Epleland)

Books for the people! - a client mod to let you write books and messages

Return to Game mods