MCPcopy Create free account
hub / github.com/crossuo/crossuo / Select

Method Select

src/TextEngine/TextRenderer.cpp:260–299  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

258}
259
260void CTextRenderer::Select(CGump *gump)
261{
262 if (gump != nullptr)
263 {
264 CalculatePositions(true);
265 }
266 else
267 {
268 CalculateWorldPositions(true);
269 }
270
271 int renderIndex = g_GameScreen.RenderIndex - 1;
272 if (renderIndex < 1)
273 {
274 renderIndex = 99;
275 }
276
277 for (CRenderTextObject *item = m_DrawPointer; item != nullptr; item = item->m_PrevDraw)
278 {
279 if (!item->IsText())
280 {
281 continue;
282 }
283
284 CTextData &text = *(CTextData *)item;
285 if (text.Timer >= g_Ticks)
286 {
287 if (gump == nullptr &&
288 (text.Owner == nullptr || text.Owner->UseInRender != renderIndex))
289 {
290 continue;
291 }
292
293 if (text.m_TextSprite.Select(text.RealDrawX, text.RealDrawY))
294 {
295 g_SelectedObject.Init(item, gump);
296 }
297 }
298 }
299}
300
301bool CTextRenderer::CalculateWorldPositions(bool noCalculate)
302{

Callers

nothing calls this directly

Calls 2

IsTextMethod · 0.45
InitMethod · 0.45

Tested by

no test coverage detected