Show / Hide Table of Contents

Class ScalingViewport

Viewport control that has a fixed viewport size and scales it appropriately.

Inheritance
System.Object
Robust.Client.UserInterface.Control
ScalingViewport
Implements
Robust.Client.UserInterface.CustomControls.IViewportControl
Namespace: Content.Client.Viewport
Assembly: Content.Client.dll
Syntax
public sealed class ScalingViewport : Control, IViewportControl

Constructors

| Improve this Doc View Source

ScalingViewport()

Declaration
public ScalingViewport()

Properties

| Improve this Doc View Source

CurrentRenderScale

Declaration
public int CurrentRenderScale { get; }
Property Value
Type Description
System.Int32
| Improve this Doc View Source

Eye

The eye to render.

Declaration
public IEye Eye { get; set; }
Property Value
Type Description
Robust.Shared.Graphics.IEye
| Improve this Doc View Source

FixedRenderScale

Declaration
public int FixedRenderScale { get; set; }
Property Value
Type Description
System.Int32
| Improve this Doc View Source

FixedStretchSize

Declaration
public Vector2i? FixedStretchSize { get; set; }
Property Value
Type Description
System.Nullable<Robust.Shared.Maths.Vector2i>
| Improve this Doc View Source

RenderScaleMode

Declaration
public ScalingViewportRenderScaleMode RenderScaleMode { get; set; }
Property Value
Type Description
ScalingViewportRenderScaleMode
| Improve this Doc View Source

StretchMode

Declaration
public ScalingViewportStretchMode StretchMode { get; set; }
Property Value
Type Description
ScalingViewportStretchMode
| Improve this Doc View Source

ViewportSize

The size, in unscaled pixels, of the internal viewport.

Declaration
public Vector2i ViewportSize { get; set; }
Property Value
Type Description
Robust.Shared.Maths.Vector2i
Remarks

The actual viewport may have render scaling applied based on parameters.

Methods

| Improve this Doc View Source

Draw(DrawingHandleScreen)

Declaration
protected override void Draw(DrawingHandleScreen handle)
Parameters
Type Name Description
Robust.Client.Graphics.DrawingHandleScreen handle
Overrides
Robust.Client.UserInterface.Control.Draw(Robust.Client.Graphics.DrawingHandleScreen)
| Improve this Doc View Source

GetLocalToScreenMatrix()

Declaration
public Matrix3 GetLocalToScreenMatrix()
Returns
Type Description
Robust.Shared.Maths.Matrix3
| Improve this Doc View Source

GetWorldToScreenMatrix()

Declaration
public Matrix3 GetWorldToScreenMatrix()
Returns
Type Description
Robust.Shared.Maths.Matrix3
| Improve this Doc View Source

KeyBindDown(GUIBoundKeyEventArgs)

Declaration
protected override void KeyBindDown(GUIBoundKeyEventArgs args)
Parameters
Type Name Description
Robust.Client.UserInterface.GUIBoundKeyEventArgs args
Overrides
Robust.Client.UserInterface.Control.KeyBindDown(Robust.Client.UserInterface.GUIBoundKeyEventArgs)
| Improve this Doc View Source

KeyBindUp(GUIBoundKeyEventArgs)

Declaration
protected override void KeyBindUp(GUIBoundKeyEventArgs args)
Parameters
Type Name Description
Robust.Client.UserInterface.GUIBoundKeyEventArgs args
Overrides
Robust.Client.UserInterface.Control.KeyBindUp(Robust.Client.UserInterface.GUIBoundKeyEventArgs)
| Improve this Doc View Source

PixelToMap(Vector2)

Declaration
public MapCoordinates PixelToMap(Vector2 coords)
Parameters
Type Name Description
Vector2 coords
Returns
Type Description
Robust.Shared.Map.MapCoordinates
| Improve this Doc View Source

Resized()

Declaration
protected override void Resized()
Overrides
Robust.Client.UserInterface.Control.Resized()
| Improve this Doc View Source

Screenshot(CopyPixelsDelegate<Rgba32>)

Declaration
public void Screenshot(CopyPixelsDelegate<Rgba32> callback)
Parameters
Type Name Description
Robust.Client.Graphics.CopyPixelsDelegate<Rgba32> callback
| Improve this Doc View Source

ScreenToMap(Vector2)

Declaration
public MapCoordinates ScreenToMap(Vector2 coords)
Parameters
Type Name Description
Vector2 coords
Returns
Type Description
Robust.Shared.Map.MapCoordinates
| Improve this Doc View Source

WorldToScreen(Vector2)

Declaration
public Vector2 WorldToScreen(Vector2 map)
Parameters
Type Name Description
Vector2 map
Returns
Type Description
Vector2

Implements

Robust.Client.UserInterface.CustomControls.IViewportControl

Extension Methods

ControlExtension.GetControlOfType<T>(Control)
ControlExtension.GetControlOfType<T>(Control, String)
ControlExtension.GetControlOfType<T>(Control, Boolean)
ControlExtension.GetControlOfType<T>(Control, String, Boolean)
ControlExtension.GetSearchableControls(Control, Boolean)
ControlExtension.ChildrenContainText(Control, String)
  • Improve this Doc
  • View Source
☀
☾
In This Article
Back to top
Generated by DocFX
☀
☾