"net stat" output position

Discussions about UT99
User avatar
Barbie
Godlike
Posts: 2528
Joined: Fri Sep 25, 2015 9:01 pm
Location: moved without proper hashing

"net stat" output position

Post by Barbie »

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

Re: "net stat" output position

Post by The_Cowboy »

It is. You just have to challenge it!
Feralidragon wrote:Trial and error is sometimes better than any tutorial, because we learn how it works for ourselfs, which kills any doubts about anything :tu:
User avatar
Barbie
Godlike
Posts: 2528
Joined: Fri Sep 25, 2015 9:01 pm
Location: moved without proper hashing

Re: "net stat" output position

Post by Barbie »

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

Re: "net stat" output position

Post 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.
Feralidragon wrote:Trial and error is sometimes better than any tutorial, because we learn how it works for ourselfs, which kills any doubts about anything :tu:
Higor
Godlike
Posts: 1847
Joined: Sun Mar 04, 2012 6:47 pm

Re: "net stat" output position

Post 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.
ImageImage
Image unreal://23.111.157.138:7777
Image unreal://46.228.199.205:7788
User avatar
The_Cowboy
Experienced
Posts: 141
Joined: Mon Jan 24, 2011 3:22 am
Personal rank: Codezilla

Re: "net stat" output position

Post 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).
Feralidragon wrote:Trial and error is sometimes better than any tutorial, because we learn how it works for ourselfs, which kills any doubts about anything :tu: