Space Engineers
Classes | Public Member Functions | Static Public Member Functions | Properties | List of all members
Sandbox.Game.Gui.MyHudCrosshair Class Reference

Public Member Functions

 MyHudCrosshair ()
 
void ResetToDefault (bool clear=true)
 
void HideDefaultSprite ()
 
void Recenter ()
 
void ChangePosition (Vector2 newPosition)
 
void ChangeDefaultSprite (MyHudTexturesEnum newSprite, float size=0.0f)
 
void AddTemporarySprite (MyHudTexturesEnum spriteEnum, MyStringId spriteId, int timeout=2000, int fadeTime=1000, Color?color=null, float size=0.02f)
 Adds a temporary sprite to the list of sprites that make up the crosshair More...
 
void Update ()
 
void Draw (string atlas, MyAtlasTextureCoordinate[] atlasCoords)
 

Static Public Member Functions

static bool GetTarget (Vector3D from, Vector3D to, ref Vector3D target)
 
static bool GetProjectedTarget (Vector3D from, Vector3D to, ref Vector2 target)
 
static bool GetProjectedVector (Vector3D worldPosition, ref Vector2 target)
 

Properties

Vector2 Position [get]
 
static Vector2 ScreenCenter [get]
 
bool Visible [get]
 

Detailed Description

Definition at line 23 of file MyHudCrosshair.cs.

Constructor & Destructor Documentation

Sandbox.Game.Gui.MyHudCrosshair.MyHudCrosshair ( )
inline

Definition at line 63 of file MyHudCrosshair.cs.

Member Function Documentation

void Sandbox.Game.Gui.MyHudCrosshair.AddTemporarySprite ( MyHudTexturesEnum  spriteEnum,
MyStringId  spriteId,
int  timeout = 2000,
int  fadeTime = 1000,
Color color = null,
float  size = 0.02f 
)
inline

Adds a temporary sprite to the list of sprites that make up the crosshair

Parameters
spriteEnumTexture of the sprite to use
spriteIdAn id that will be checked to prevent adding the same sprite twice
timeoutTime the sprite will be visible (includes fadeout time)
fadeTimeFor how long should the sprite fade out when it disappears

Definition at line 127 of file MyHudCrosshair.cs.

void Sandbox.Game.Gui.MyHudCrosshair.ChangeDefaultSprite ( MyHudTexturesEnum  newSprite,
float  size = 0.0f 
)
inline

Definition at line 100 of file MyHudCrosshair.cs.

void Sandbox.Game.Gui.MyHudCrosshair.ChangePosition ( Vector2  newPosition)
inline

Definition at line 95 of file MyHudCrosshair.cs.

void Sandbox.Game.Gui.MyHudCrosshair.Draw ( string  atlas,
MyAtlasTextureCoordinate[]  atlasCoords 
)
inline

Definition at line 262 of file MyHudCrosshair.cs.

static bool Sandbox.Game.Gui.MyHudCrosshair.GetProjectedTarget ( Vector3D  from,
Vector3D  to,
ref Vector2  target 
)
inlinestatic

Definition at line 216 of file MyHudCrosshair.cs.

static bool Sandbox.Game.Gui.MyHudCrosshair.GetProjectedVector ( Vector3D  worldPosition,
ref Vector2  target 
)
inlinestatic

Definition at line 304 of file MyHudCrosshair.cs.

static bool Sandbox.Game.Gui.MyHudCrosshair.GetTarget ( Vector3D  from,
Vector3D  to,
ref Vector3D  target 
)
inlinestatic

Definition at line 189 of file MyHudCrosshair.cs.

void Sandbox.Game.Gui.MyHudCrosshair.HideDefaultSprite ( )
inline

Definition at line 75 of file MyHudCrosshair.cs.

void Sandbox.Game.Gui.MyHudCrosshair.Recenter ( )
inline

Definition at line 90 of file MyHudCrosshair.cs.

void Sandbox.Game.Gui.MyHudCrosshair.ResetToDefault ( bool  clear = true)
inline

Definition at line 70 of file MyHudCrosshair.cs.

void Sandbox.Game.Gui.MyHudCrosshair.Update ( )
inline

Definition at line 228 of file MyHudCrosshair.cs.

Property Documentation

Vector2 Sandbox.Game.Gui.MyHudCrosshair.Position
get

Definition at line 44 of file MyHudCrosshair.cs.

Vector2 Sandbox.Game.Gui.MyHudCrosshair.ScreenCenter
staticget

Definition at line 52 of file MyHudCrosshair.cs.

bool Sandbox.Game.Gui.MyHudCrosshair.Visible
get

Definition at line 56 of file MyHudCrosshair.cs.


The documentation for this class was generated from the following file: