Calling APP from PutToolTip_Item

08/07/2015 18:44 raventh1984#1
Hi Elitepvpers,

I am trying to show an applet when I hover my mouse over an equipped item.
So instead of showing the normal stuff I want that its going to show an applet instead.

But atm I am an bit lost on how to do it.

What I tried is this

Inside WndManager.cpp
void CWndMgr::PutToolTip_Item( CItemBase* pItemBase, CPoint point, CRect* pRect, int flag )
Code:
CWndItemViewer * pWndItemViewer = (CWndItemViewer *)g_WndMng.GetWndBase(APP_ITEM_VIEWER);
But when I hover my mouse over it. Its not showing the applet.
Do I need to check it somewhere else?

Any tips will be helpful

With kind regards
08/07/2015 21:08 Mognakor#2
You are just retrieving a pointer to the object, there is no sign that you actually tell the applet to show itself.
08/07/2015 21:34 raventh1984#3
Thnx yeah I noticed that it only was retrieving a pointer to the object.

so my next question is how to initialize the applet so its showing itself.

EDIT:

Found it Wndfield.cpp
void CWndInventory::OnMouseWndSurface( CPoint point )

Changed this
Code:
g_WndMng.PutToolTip_Item( pItemBase, point2, &DrawRect, APP_INVENTORY );
to this
Code:
g_WndMng.ObjectExecutor(SHORTCUT_APPLET, APP_SELECT_CHAR);
Its now showing the Select char applet when I hover over the item.
However if I change it to APP_ITEM_VIEWER then its not showing the Applet.

I am still learning on how to create an Applet I have taken an look at the tutorial on here.
But I think I need to add some code to the OnDraw function correct? atm its empty would that be the reason its not showing?

Update.

I have it so that its now showing the applet when you hover over an Item in your inventory. However when I move the mouse out of the inventory the applet is still showing. I have taken an look at the PutToolTip_Item function and the MakeToolTipText function if there is something about the OnMouseMove or something like that. But there isn't.

So that brings me to the following where does it say that when the mouse is not inside APP_INVENTORY that it should not show the APP