"net stat" output position

Discussions about UT99

"net stat" output position

Postby Barbie » Mon Jul 08, 2019 12:15 am

Is it possible to manipulate the "net stat" output position on the HUD?
"Multiple exclamation marks," he went on, shaking his head, "are a sure sign of a diseased mind." --Terry Pratchett
User avatar
Barbie
Godlike
 
Posts: 1671
Joined: Fri Sep 25, 2015 9:01 pm
Location: moved without proper hashing

Re: "net stat" output position

Postby The_Cowboy » Mon Jul 08, 2019 4:03 am

It is. You just have to challenge it!
The_Cowboy
Average
 
Posts: 67
Joined: Mon Jan 24, 2011 3:22 am
Personal rank: Codezilla

Re: "net stat" output position

Postby Barbie » Mon Jul 08, 2019 9:17 pm

I suspected it while I was writing that: A given answer would be "yes" or "no"... :omfg:
"Multiple exclamation marks," he went on, shaking his head, "are a sure sign of a diseased mind." --Terry Pratchett
User avatar
Barbie
Godlike
 
Posts: 1671
Joined: Fri Sep 25, 2015 9:01 pm
Location: moved without proper hashing

Re: "net stat" output position

Postby The_Cowboy » Mon Jul 08, 2019 11:09 pm

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.
The_Cowboy
Average
 
Posts: 67
Joined: Mon Jan 24, 2011 3:22 am
Personal rank: Codezilla

Re: "net stat" output position

Postby Higor » Tue Jul 09, 2019 7:10 am

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.
Higor
Godlike
 
Posts: 1746
Joined: Sun Mar 04, 2012 6:47 pm

Re: "net stat" output position

Postby The_Cowboy » Tue Jul 09, 2019 7:52 am

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).
The_Cowboy
Average
 
Posts: 67
Joined: Mon Jan 24, 2011 3:22 am
Personal rank: Codezilla


Return to General Discussions

Who is online

Users browsing this forum: No registered users and 5 guests