MCPcopy Create free account
hub / github.com/TheForceEngine/TheForceEngine / updateTooltips

Function updateTooltips

TheForceEngine/TFE_Editor/editor.cpp:1239–1254  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1237 }
1238
1239 void updateTooltips()
1240 {
1241 Vec2i mouse;
1242 TFE_Input::getMousePos(&mouse.x, &mouse.z);
1243 bool mouseStationary = mouse.x == s_prevMousePos.x && mouse.z == s_prevMousePos.z;
1244 s_canShowTooltips = mouseStationary && s_tooltipTime >= c_tooltipDelay;
1245 if (mouseStationary)
1246 {
1247 s_tooltipTime += TFE_System::getDeltaTime();
1248 }
1249 else
1250 {
1251 s_tooltipTime = 0.0;
1252 }
1253 s_prevMousePos = mouse;
1254 }
1255
1256 void setTooltip(const char* msg, ...)
1257 {

Callers 1

updateFunction · 0.85

Calls 2

getMousePosFunction · 0.85
getDeltaTimeFunction · 0.85

Tested by

no test coverage detected