Game Development Community

Refresh GUI

by Anthony Merlo · in Torque 3D Professional · 05/11/2011 (2:33 pm) · 0 replies

Is there a way to refresh the GUI in the source code?

I'm trying to draw a box around text when you mouse over a URL in a guiMLTextCtrl. I've capture the mouse over within the code that changes the mouse pointer when you cursor over the URL text and I'm trying to use drawer to just draw a line, similar to how they underline URL text, to start with, but the GUI seems to never update. I tried mDirty = true; (just a guess) but that didn't seem to do anything. I'm pretty sure the code is correct.

Here's the code:

GFXDrawUtil *testdrawer = GFX->getDrawUtil();

Point2I testPoint;
Point2I testp2;
ColorI testcolor;

testPoint.x = 307;
testPoint.y = 148;

testp2.x = 468;
testp2.y = 148;
			
testcolor.red = 255;
testcolor.green = 255;
testcolor.blue = 255;

testdrawer->drawLine(testPoint, testp2, testcolor);
mDirty = true;

I though this would draw a white line from 307x148 to 468x148 but it doesn't.

Thanks