HomeWildfire Games

Initial (incomplete) tooltip code

Description

Initial (incomplete) tooltip code

Details

Committed
philipDec 21 2004, 2:37 PM
Parents
rP1539: Eliminated grayscale images.
Branches
Unknown
Tags
Unknown

Event Timeline

elexis added a subscriber: elexis.Jul 29 2019, 1:55 PM
elexis added inline comments.
/ps/trunk/source/gui/CTooltip.cpp
15

This exposes a setting to JS but misses FromJSVal ToJSVal conversion.

/ps/trunk/source/gui/GUItypes.h
101

Depends on CPos ToJSVal FromJSVal conversion.

/ps/trunk/source/gui/scripting/JSInterface_IGUIObject.cpp
137

case GUIST_CPos:
...

314

case GUIST_CPos:
...

Can be tested by adding this in session.js init:

Engine.GetGUIObjectByName("placementTooltip").offset = new Vector2D(200, 0);

elexis added inline comments.Aug 27 2019, 12:44 AM
/ps/trunk/source/gui/GUITooltip.cpp
107

Since rP141, SetSetting sends the GUIM_SETTINGS_UPDATED, so this call is calling it a second time.

elexis added inline comments.
/ps/trunk/source/gui/GUITooltip.cpp
107

Finally I get why this is here.
CTooltip::SetupText() depends on _mousepos.
So an alternative would have been to have CTooltip::HandleMessage check for _mousepos updated.