Show / Hide Table of Contents

Class TextScreenSystem

The TextScreenSystem draws text in the game world using 3x5 sprite states for each character.

Inheritance
System.Object
Robust.Shared.GameObjects.EntitySystem
Robust.Client.GameObjects.VisualizerSystem<TextScreenVisualsComponent>
TextScreenSystem
Implements
Robust.Shared.GameObjects.IEntitySystem
Robust.Shared.GameObjects.IEntityEventSubscriber
Robust.Shared.IoC.IPostInjectInit
Namespace: Content.Client.TextScreen
Assembly: Content.Client.dll
Syntax
public sealed class TextScreenSystem : VisualizerSystem<TextScreenVisualsComponent>, IEntitySystem, IEntityEventSubscriber, IPostInjectInit

Methods

| Improve this Doc View Source

GetStateFromChar(Nullable<Char>)

Returns the Effects/text.rsi state string based on character, or null if none available.

Declaration
public static string? GetStateFromChar(char? character)
Parameters
Type Name Description
System.Nullable<System.Char> character
Returns
Type Description
System.Nullable<System.String>
| Improve this Doc View Source

Initialize()

Declaration
public override void Initialize()
Overrides
Robust.Client.GameObjects.VisualizerSystem<Content.Client.TextScreen.TextScreenVisualsComponent>.Initialize()
| Improve this Doc View Source

OnAppearanceChange(EntityUid, TextScreenVisualsComponent, ref AppearanceChangeEvent)

Declaration
protected override void OnAppearanceChange(EntityUid uid, TextScreenVisualsComponent component, ref AppearanceChangeEvent args)
Parameters
Type Name Description
EntityUid uid
TextScreenVisualsComponent component
Robust.Client.GameObjects.AppearanceChangeEvent args
| Improve this Doc View Source

PrepareLayerStatesToDraw(EntityUid, TextScreenVisualsComponent, SpriteComponent)

Sets the states in the LayerStatesToDraw to match the component TextToDraw string.

Declaration
public void PrepareLayerStatesToDraw(EntityUid uid, TextScreenVisualsComponent component, SpriteComponent sprite = null)
Parameters
Type Name Description
EntityUid uid
TextScreenVisualsComponent component
Robust.Client.GameObjects.SpriteComponent sprite
Remarks

Remember to set TextToDraw to a string first.

| Improve this Doc View Source

ResetTextLength(EntityUid, TextScreenVisualsComponent, SpriteComponent)

Resets all TextScreenComponent sprite layers, through removing them and then creating new ones.

Declaration
public void ResetTextLength(EntityUid uid, TextScreenVisualsComponent component, SpriteComponent sprite = null)
Parameters
Type Name Description
EntityUid uid
TextScreenVisualsComponent component
Robust.Client.GameObjects.SpriteComponent sprite
| Improve this Doc View Source

SetTextLength(EntityUid, TextScreenVisualsComponent, Int32, SpriteComponent)

Sets TextLength, adding or removing sprite layers if necessary.

Declaration
public void SetTextLength(EntityUid uid, TextScreenVisualsComponent component, int newLength, SpriteComponent sprite = null)
Parameters
Type Name Description
EntityUid uid
TextScreenVisualsComponent component
System.Int32 newLength
Robust.Client.GameObjects.SpriteComponent sprite
| Improve this Doc View Source

TimeToString(TimeSpan, Boolean)

Returns the timeSpan converted to a string in either HH:MM, MM:SS or potentially SS:mm format.

Declaration
public static string TimeToString(TimeSpan timeSpan, bool getMilliseconds = true)
Parameters
Type Name Description
TimeSpan timeSpan

TimeSpan to convert into string.

System.Boolean getMilliseconds

Should the string be ss:ms if minutes are less than 1?

Returns
Type Description
System.String
| Improve this Doc View Source

Update(Single)

Declaration
public override void Update(float frameTime)
Parameters
Type Name Description
System.Single frameTime
Overrides
Robust.Shared.GameObjects.EntitySystem.Update(System.Single)
| Improve this Doc View Source

UpdateAppearance(EntityUid, TextScreenVisualsComponent, Nullable<AppearanceComponent>, SpriteComponent)

Declaration
public void UpdateAppearance(EntityUid uid, TextScreenVisualsComponent component, AppearanceComponent? appearance = null, SpriteComponent sprite = null)
Parameters
Type Name Description
EntityUid uid
TextScreenVisualsComponent component
System.Nullable<AppearanceComponent> appearance
Robust.Client.GameObjects.SpriteComponent sprite
| Improve this Doc View Source

UpdateLayersToDraw(EntityUid, TextScreenVisualsComponent, SpriteComponent)

Iterates through LayerStatesToDraw, setting sprite states to the appropriate layers.

Declaration
public void UpdateLayersToDraw(EntityUid uid, TextScreenVisualsComponent component, SpriteComponent sprite = null)
Parameters
Type Name Description
EntityUid uid
TextScreenVisualsComponent component
Robust.Client.GameObjects.SpriteComponent sprite
| Improve this Doc View Source

UpdateOffsets(EntityUid, TextScreenVisualsComponent, SpriteComponent)

Updates the layers offsets based on the text length, so it is drawn correctly.

Declaration
public void UpdateOffsets(EntityUid uid, TextScreenVisualsComponent component, SpriteComponent sprite = null)
Parameters
Type Name Description
EntityUid uid
TextScreenVisualsComponent component
Robust.Client.GameObjects.SpriteComponent sprite
| Improve this Doc View Source

UpdateText(TextScreenVisualsComponent)

If currently in Text mode:
Sets TextToDraw to the value of Text

Declaration
public static void UpdateText(TextScreenVisualsComponent component)
Parameters
Type Name Description
TextScreenVisualsComponent component
| Improve this Doc View Source

UpdateVisibility(EntityUid, TextScreenVisualsComponent, SpriteComponent)

Sets visibility of text to Activated.

Declaration
public void UpdateVisibility(EntityUid uid, TextScreenVisualsComponent component, SpriteComponent sprite = null)
Parameters
Type Name Description
EntityUid uid
TextScreenVisualsComponent component
Robust.Client.GameObjects.SpriteComponent sprite

Implements

Robust.Shared.GameObjects.IEntitySystem
Robust.Shared.GameObjects.IEntityEventSubscriber
Robust.Shared.IoC.IPostInjectInit
  • Improve this Doc
  • View Source
☀
☾
In This Article
Back to top
Generated by DocFX
☀
☾