MCPcopy Create free account
hub / github.com/BohemiaInteractive/CWR / ShowText

Method ShowText

engine/Poseidon/Graphics/Core/EngineDrawing.cpp:267–283  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

265}
266
267int Engine::ShowText(DWORD timeToLive, int x, int y, const char* text)
268{
269#ifndef ACCESS_ONLY
270 if (!_showTextFont)
271 {
272 _showTextFont = LoadFont(GetFontID("tahomaB36"));
273 _showTextSize = 0.021;
274 }
275 // x,y given for 800x600 screen
276 int handle = _textHandle++;
277 _texts.Add(TextInfo(handle, this, Poseidon::Foundation::GlobalTickCount() + timeToLive, _showTextFont,
278 _showTextColor, _showTextSize, x * (1.0 / 800), y * (1.0 / 600), text));
279 return handle;
280#else
281 return 0;
282#endif
283}
284
285int CCALL Engine::ShowTextF(DWORD timeToLive, int x, int y, const char* format, ...)
286{

Callers

nothing calls this directly

Calls 4

GetFontIDFunction · 0.85
TextInfoClass · 0.85
GlobalTickCountFunction · 0.85
AddMethod · 0.45

Tested by

no test coverage detected