Thanks @snowguy for understanding and allowing me to post here. Here is a mild update, which I started working upon on the sides
![](https://eatsleeput.com/assets/files/2023-10-09/1696821848-896562-shot00102.png)
These hacker guys make (or rather, used to make) quite intuitive ui's. I got so interested that I brushed up the code with version 469's dynamic fonts.
So now one can smoothly interpolate between variety of sizes for better clarity. I am working on automatic font selection based on scaling.
P.S. I also brushed up the 2D radar code to play nicely with the scaling. Was quite nice to revisit the high-school (+) mathematics (and physics). Here is the code for reference and appreciation
void inline cRadar::DrawPlayer2DRadar (UCanvas* Canvas, APawn* Target, float PosX_, float PosY_, float Width, float Height)
{
static float borderGap = 8.0f;
if (!b2DRadar)
{
return;
}
FVector X,Y,Z,D;
FRotator R = MyCameraRotation + FRotator(0, 16384, 0);
R.Roll = 0;
R.Pitch = 0;
GetAxes(R, X, Y, Z);
D = (Target->Location - MyCameraLocation);
D.Z = 0;
static float largestTargetD = 0.0f;
if (D.Size2D() > largestTargetD)
{
largestTargetD = D.Size2D();
}
// Embrace for some High-School mathematics, eh!!
float origPosX = PosX_ + Width / 2.0f; // center x
float origPosY = PosY_ + Height / 2.0f; // center y
float xRadarLength = (Width - 2.0f * borderGap) / 2 * (D.Size2D() / largestTargetD);
float yRadarLength = (Height - 2.0f * borderGap) / 2 * (D.Size2D() / largestTargetD);
float PosX = origPosX + Dot(D, X) / (D.Size2D()) * xRadarLength;
float PosY = origPosY + Dot(D, Y) / (D.Size2D()) * yRadarLength;
Canvas->Color = GetTeamColor(Target);
DrawRec(Canvas, PosX, PosY, 4 * Scale, 4 * Scale, WhiteTexture, FColor(0,0,0));
DrawRec(Canvas, PosX + 1, PosY + 1, 2 * Scale, 2 * Scale, WhiteTexture, Canvas->Color);
}