MCPcopy Create free account
hub / github.com/OpenApoc/OpenApoc / toolTipStartTimer

Method toolTipStartTimer

framework/framework.cpp:1071–1090  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1069void Framework::textStopInput() { SDL_StopTextInput(); }
1070
1071void Framework::toolTipStartTimer(up<Event> e)
1072{
1073 int delay = config().getInt("Options.Misc.ToolTipDelay");
1074 if (delay <= 0)
1075 {
1076 return;
1077 }
1078 // remove any pending timers
1079 toolTipStopTimer();
1080 p->toolTipTimerEvent = std::move(e);
1081 p->toolTipTimerId = SDL_AddTimer(
1082 delay,
1083 [](unsigned int interval, void *data) -> unsigned int
1084 {
1085 fw().toolTipTimerCallback(interval, data);
1086 // remove this sdl timer
1087 return 0;
1088 },
1089 nullptr);
1090}
1091void Framework::toolTipStopTimer()
1092{
1093 if (p->toolTipTimerId)

Callers 1

eventOccuredMethod · 0.80

Calls 2

getIntMethod · 0.80
toolTipTimerCallbackMethod · 0.80

Tested by

no test coverage detected