AHUD::DrawText have (0, 0) coordinates in center of the screen

AHUD::DrawText have (0, 0) coordinates in center of the screen. But AHUD::DrawTexture have (0, 0) coordinates in left top corner.

Hi -

I am looking through the code base and running a test and it appears that both are drawing text for me based on the screen upper left hand corner as 0,0. Can you confirm for me what branch and version of the engine you are using?

Thank You

Eric Ketchum

No, Sorry. I’m use 4.7.2

Hey-

After looking over the code it appears that there are actually two versions of AHUD::DrawText. One of them draws based on the center while the other draws based on the top-left corner.

This version (which is the only version available to Blueprints) will draw from the top-left:
void DrawText(const FString& Text, FLinearColor TextColor, float ScreenX, float ScreenY, UFont* Font=NULL, float Scale=1.f, bool bScalePosition=false);

This version will draw from the centre:
void DrawText(const FString& Text, FVector2D Position, UFont* TextFont, FVector2D FontScale, FColor TextColor);

I am still investigating what the different uses of these functions are, however you should be able to use the one that best suits your needs.

Cheers