Properties Panel Overhaul

Marking player location on galaxy map
Fixed non-input field focus disabling global key map
Player start ship is now always the same
Loadout generator now demands exact match for item dimensions
Thermal damage now triggers ItemDamaged event = player can die from cockpit wear!
Properties panel now has a much more attractive UI
Implemented curve control for properties UI
Centralized number formatting in player settings
Moved significant digits to player settings
Added temperature unit option in player settings
This commit is contained in:
Reinier Vens 2021-04-13 01:50:42 +01:00
commit 54f7e3a66f
152 changed files with 8691 additions and 179 deletions

View file

@ -1,6 +1,7 @@
using System;
using System.Collections;
using System.Collections.Generic;
using System.Globalization;
using System.Linq;
using System.Numerics;
using System.Reflection;
@ -116,17 +117,6 @@ public static class Extensions
throw new ArgumentOutOfRangeException(nameof(rotation), rotation, null);
}
}
public static string SignificantDigits(this float d, int digits=10)
{
int magnitude = d == 0.0f ? 0 : (int)Math.Floor(Math.Log10(Math.Abs(d))) + 1;
digits -= magnitude;
if (digits < 0)
digits = 0;
string fmt = "f" + digits;
string strdec = d.ToString(fmt);
return strdec.Contains(".") ? strdec.TrimEnd('0').TrimEnd('.') : strdec;
}
private static Random? _random;
//private static Random Random => (Random) (_random ??= new Random((uint) (DateTime.Now.Ticks%uint.MaxValue)));