Author Topic: TextRect  (Read 2236 times)

TextRect
« on: December 11, 2014, 09:45:05 pm »
Hello, I have question about drawing text over head.
Where in this code can I add TextRect so it will move fluidly?

Code: [Select]
    if(layer == 2 && !__GmapActive)
    {
        if(InterfaceShown)
            DrawIndicators();
        RenderThrowing();
        TryDrawSmartCursor();
CritterCl@ chosen = GetChosen();
if(valid(chosen) && chosen.Perk[PE_AWARENESS] != 0)
{
CritterCl@[] critters;
int i=0;
GetCritters(0,FIND_LIFE_AND_KO,critters);
for(i=0;i<=critters.length();i++)
{
int X;
int Y;
GetHexPos(critters[i].HexX,critters[i].HexY,X,Y);
if(valid(critters[i]) && critters[i].IsLife())
{
X -=20;
Y -=80;
DrawText (critters[i].Stat[ST_CURRENT_HP]+"/"+critters[i].Stat[ST_MAX_LIFE], X, Y, 500, 100, 0x0, FONT_FALLOUT, FT_BORDERED);
}
}
}
    }

Thank you for your time

Re: TextRect
« Reply #1 on: December 15, 2014, 02:11:05 am »
bump rly need help

JovankaB

  • Guest
Re: TextRect
« Reply #2 on: December 15, 2014, 10:30:24 am »
Try right after TryDrawSmartCursor();

Re: TextRect
« Reply #3 on: December 15, 2014, 07:08:39 pm »
hmmm, when i compile, it says TextRect not declared. I have the updated fonline.h though
i tried putting TextRect; and TextRect();, the one with () says no matching signatures to TextRect