Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix docking control size #9833

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions Content.Client/Shuttles/UI/DockingControl.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,15 @@ public class DockingControl : Control
private readonly IEntityManager _entManager;
private readonly IMapManager _mapManager;

private const int MinimapRadius = 384;
private const int MinimapMargin = 4;

private float _range = 8f;
private float _rangeSquared = 0f;
private const float GridLinesDistance = 32f;

private int MidPoint => SizeFull / 2;
private int SizeFull => (int) ((MinimapRadius + MinimapMargin) * 2 * UIScale);
private int ScaledMinimapRadius => (int) (MinimapRadius * UIScale);
private int SizeFull => (int) ((RadarControl.MinimapRadius + MinimapMargin) * 2 * UIScale);
private int ScaledMinimapRadius => (int) (RadarControl.MinimapRadius * UIScale);
private float MinimapScale => _range != 0 ? ScaledMinimapRadius / _range : 0f;

public EntityUid? ViewedDock;
Expand Down
2 changes: 1 addition & 1 deletion Content.Client/Shuttles/UI/RadarControl.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ public sealed class RadarControl : Control

private const float ScrollSensitivity = 8f;

private const int MinimapRadius = 320;
public const int MinimapRadius = 320;
private const int MinimapMargin = 4;
private const float GridLinesDistance = 32f;

Expand Down