Fix upgr bar legend, wrink butt tooltip #700, #695

This commit is contained in:
Daniël van Noord
2021-03-19 17:38:45 +01:00
parent 641471b5bc
commit 51c89bdc88
6 changed files with 406 additions and 1344 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

1713
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@@ -38,22 +38,24 @@ function CreateUpgradeBarLegend() {
return div; return div;
}; };
legend.appendChild(legendLine(ColorBlue, 'Better than best PP building'));
legend.appendChild(legendLine(ColorGreen, 'Same as best PP building'));
legend.appendChild( legend.appendChild(
legendLine( legendLine(ColorBlue, 'Better than the best PP of a building option'),
ColorYellow,
'Between best and worst PP buildings closer to best',
),
); );
legend.appendChild( legend.appendChild(
legendLine( legendLine(ColorGreen, 'Same as the best PP building option'),
ColorOrange, );
'Between best and worst PP buildings closer to worst', legend.appendChild(
), legendLine(ColorYellow, 'Within the top 10 of PP for buildings'),
);
legend.appendChild(
legendLine(ColorOrange, 'Within the top 20 of PP for buildings'),
);
legend.appendChild(
legendLine(ColorRed, 'Within the top 30 of PP for buildings'),
);
legend.appendChild(
legendLine(ColorPurple, 'Outside of the top 30 of PP for buildings'),
); );
legend.appendChild(legendLine(ColorRed, 'Same as worst PP building'));
legend.appendChild(legendLine(ColorPurple, 'Worse than worst PP building'));
legend.appendChild(legendLine(ColorGray, 'Negative or infinity PP')); legend.appendChild(legendLine(ColorGray, 'Negative or infinity PP'));
return legend; return legend;
} }

View File

@@ -2,6 +2,7 @@ import {
CacheWrinklersFattest, CacheWrinklersFattest,
CacheWrinklersTotal, CacheWrinklersTotal,
} from '../../../Cache/VariablesAndData'; } from '../../../Cache/VariablesAndData';
import { Beautify } from '../../BeautifyAndFormatting/BeautifyFormatting';
import { TooltipName } from '../../VariablesAndData'; import { TooltipName } from '../../VariablesAndData';
import * as Create from '../CreateTooltip'; import * as Create from '../CreateTooltip';
@@ -16,9 +17,9 @@ export default function WrinklerButton() {
const WrinklerReward = document.createElement('div'); const WrinklerReward = document.createElement('div');
WrinklerReward.id = 'CMWrinklerReward'; WrinklerReward.id = 'CMWrinklerReward';
if (TooltipName === 'PopAll') { if (TooltipName === 'PopAll') {
WrinklerReward.textContent = CacheWrinklersTotal; WrinklerReward.textContent = Beautify(CacheWrinklersTotal);
} else if (TooltipName === 'PopFattest') { } else if (TooltipName === 'PopFattest') {
WrinklerReward.textContent = CacheWrinklersFattest[0]; WrinklerReward.textContent = Beautify(CacheWrinklersFattest[0]);
} }
l('tooltip').appendChild(WrinklerReward); l('tooltip').appendChild(WrinklerReward);