Page 1 of 1
"net stat" output position
Posted: Mon Jul 08, 2019 12:15 am
by Barbie
Is it possible to manipulate the "net stat" output position on the HUD?
Re: "net stat" output position
Posted: Mon Jul 08, 2019 4:03 am
by The_Cowboy
It is. You just have to challenge it!
Re: "net stat" output position
Posted: Mon Jul 08, 2019 9:17 pm
by Barbie
I suspected it while I was writing that: A given answer would be "yes" or "no"...
Re: "net stat" output position
Posted: Mon Jul 08, 2019 11:09 pm
by The_Cowboy
Hehe, you may find a lazy example at
https://github.com/ravimohan1991/SmartD ... verInfo.uc. It is simple (nothing complex at all) to inherit the class and start writing on the Canvas.
Re: "net stat" output position
Posted: Tue Jul 09, 2019 7:10 am
by Higor
Except NET STAT display originates from the 'Render' class and is 100% native code.
All stats lines are drawn using the same function:
Code: Select all
void URender::ShowStat( FSceneNode* Frame, const TCHAR* Fmt, ... )
{
TCHAR TempStr[4096];
GET_VARARGS( TempStr, ARRAY_COUNT(TempStr), Fmt );
guard(URender::ShowStat);
Frame->Viewport->Canvas->WrappedPrintf( Frame->Viewport->Canvas->SmallFont, 0, TEXT(" %s\n"), TempStr );
unguard;
}
And before drawing begins, this happens:
Code: Select all
Frame->Viewport->Canvas->CurX=0;
Frame->Viewport->Canvas->CurY=16;
So unless you know your way in C++, it's not possible.
Re: "net stat" output position
Posted: Tue Jul 09, 2019 7:52 am
by The_Cowboy
In that case, my knowledge is incomplete when I obviously "assumed" it to be a simple canvas rendering procedure.
Anyways, adding a uscript support for the native function is piece of cake (maybe not with old engine).