fodev.net

FOnline Development => Questions and Answers => Topic started by: Ethanhoff on December 11, 2014, 09:45:05 pm

Title: TextRect
Post by: Ethanhoff 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
Title: Re: TextRect
Post by: Ethanhoff on December 15, 2014, 02:11:05 am
bump rly need help
Title: Re: TextRect
Post by: JovankaB on December 15, 2014, 10:30:24 am
Try right after TryDrawSmartCursor();
Title: Re: TextRect
Post by: Ethanhoff 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