Viewport improvements (#3765)
This commit is contained in:
committed by
GitHub
parent
8e2fc49357
commit
147a54c642
15
Content.Client/UserInterface/ViewportExt.cs
Normal file
15
Content.Client/UserInterface/ViewportExt.cs
Normal file
@@ -0,0 +1,15 @@
|
||||
using Robust.Client.UserInterface.CustomControls;
|
||||
|
||||
namespace Content.Client.UserInterface
|
||||
{
|
||||
public static class ViewportExt
|
||||
{
|
||||
public static int GetRenderScale(this IViewportControl viewport)
|
||||
{
|
||||
if (viewport is ScalingViewport svp)
|
||||
return svp.CurrentRenderScale;
|
||||
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user