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

Slighly better error with troubleshooting steps #135

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
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
6 changes: 5 additions & 1 deletion SS14.Launcher/Assets/Locale/en-US/text.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,11 @@ connecting-title-connecting = Connecting…
connecting-title-content-bundle = Loading…
connecting-cancel = Cancel
connecting-status-none = Starting connection…
connecting-status-update-error = There was an error while downloading server content. Please ask on Discord for support if the problem persists.
connecting-status-update-error =
There was an error while downloading server content. If this persists try some of the following:
- Try connecting to another game server to see if the problem persists.
- Try enabling a VPN, or disabling it if you already have one active.
- If all else fails, get support from the server you are attempting to join.
connecting-status-updating = Updating: { $status }
connecting-status-connecting = Fetching connection info from server…
connecting-status-connection-failed = Failed to connect to server!
Expand Down
18 changes: 18 additions & 0 deletions SS14.Launcher/Views/AngleBox.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ public static readonly StyledProperty<AngleBoxSideStyle> SideStyleProperty

static AngleBox()
{
AffectsMeasure<AngleBox>(CornerSizeProperty, SideStyleProperty);
AffectsGeometry<AngleBox>(BoundsProperty, CornerSizeProperty, SideStyleProperty);
}

Expand All @@ -30,6 +31,23 @@ public AngleBoxSideStyle SideStyle
get => GetValue(SideStyleProperty);
set => SetValue(SideStyleProperty, value);
}
protected override Size MeasureOverride(Size availableSize)
{
var style = SideStyle;
var c = CornerSize;

// tbh if this code is broken, I didn't test it.
// I did! It seems to work!
var size = new Size();

if ((style & AngleBoxSideStyle.OpenRight) == 0)
size += new Size(c, c);

if ((style & AngleBoxSideStyle.OpenLeft) == 0)
size += new Size(c, c);

return size;
}

protected override Geometry CreateDefiningGeometry()
{
Expand Down
Loading