MCPcopy Create free account
hub / github.com/DruidMech/MultiplayerCourseBlasterGame / DrawCrosshair

Method DrawCrosshair

Source/Blaster/HUD/BlasterHUD.cpp:131–152  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

129}
130
131void ABlasterHUD::DrawCrosshair(UTexture2D* Texture, FVector2D ViewportCenter, FVector2D Spread, FLinearColor CrosshairColor)
132{
133 const float TextureWidth = Texture->GetSizeX();
134 const float TextureHeight = Texture->GetSizeY();
135 const FVector2D TextureDrawPoint(
136 ViewportCenter.X - (TextureWidth / 2.f) + Spread.X,
137 ViewportCenter.Y - (TextureHeight / 2.f) + Spread.Y
138 );
139
140 DrawTexture(
141 Texture,
142 TextureDrawPoint.X,
143 TextureDrawPoint.Y,
144 TextureWidth,
145 TextureHeight,
146 0.f,
147 0.f,
148 1.f,
149 1.f,
150 CrosshairColor
151 );
152}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected