Skip to content

MouseRenderer.cs

Charles Humphrey edited this page Nov 16, 2017 · 2 revisions

RandomchaosMGBase.InputManagers.MouseRenderer

This class drives from DrawableGameComponent and simply draws a mouse icon to the screen based on the current location of the mouse as implemented by the MouseStateManager class.

Public Properties

Transform Transform

This is the Transform used to place the cursor.

Public Fields

Color Color

This is the color the cursor will be rendered with.

Point Size

This will be the initial size of the cursor.

Public Methods

MouseRenderer(Game game, string iconAsset)

This is the constructor for the the class, it initializes the transform and sets the icon asset internal string.

void LoadContent()

This loads the internal spritebatch and icon texture.

void Update(GameTime gameTime)

This updates the transform position from the MouseStateManagerand then updates the Transform.

void Draw(GameTime gameTime)

Draws the icon using the Transform.

Clone this wiki locally