Properly handle spacing
This commit is contained in:
parent
c94edcb777
commit
582a5fabac
1 changed files with 13 additions and 8 deletions
|
@ -17,13 +17,6 @@ namespace DiamondTimeViewer.Patches
|
|||
// Get diamond time (since it is not passed in as a parameter)
|
||||
float diamond = LevelSelect.instance.level.DiamondTime;
|
||||
|
||||
bool hasEgg = eggUnlock != null && eggUnlock.Count > 0;
|
||||
bool gotEgg = hasEgg && UnlockManager.Get().IsUnlocked(eggUnlock[0]) && !CosmeticValues.WasPurchased(eggUnlock[0]);
|
||||
|
||||
string eggText = "";
|
||||
if (hasEgg)
|
||||
eggText = (gotEgg ? "<space=0.5em> <sprite=9>" : "<space=0.5em> <sprite=8>");
|
||||
|
||||
bool showDiamondTime = false;
|
||||
switch (Config.Mode)
|
||||
{
|
||||
|
@ -41,14 +34,26 @@ namespace DiamondTimeViewer.Patches
|
|||
break;
|
||||
}
|
||||
|
||||
string spacingText = "<space=0.5em> ";
|
||||
string diamondText = "";
|
||||
if (showDiamondTime)
|
||||
diamondText = "<sprite=3> " + SegmentedTime.SPTimeText(diamond);
|
||||
{
|
||||
spacingText = "<space=0.25em> ";
|
||||
diamondText = spacingText + "<sprite=3> " + SegmentedTime.SPTimeText(diamond);
|
||||
}
|
||||
|
||||
bool hasEgg = eggUnlock != null && eggUnlock.Count > 0;
|
||||
bool gotEgg = hasEgg && UnlockManager.Get().IsUnlocked(eggUnlock[0]) && !CosmeticValues.WasPurchased(eggUnlock[0]);
|
||||
|
||||
string eggText = "";
|
||||
if (hasEgg)
|
||||
eggText = spacingText + (gotEgg ? "<sprite=9>" : "<sprite=8>");
|
||||
|
||||
__instance.MedalTimes.text = string.Concat(new string[]
|
||||
{
|
||||
"<sprite=1> ",
|
||||
SegmentedTime.SPTimeText(silver),
|
||||
spacingText,
|
||||
"<sprite=2> ",
|
||||
SegmentedTime.SPTimeText(gold),
|
||||
diamondText,
|
||||
|
|
Loading…
Add table
Reference in a new issue