mirror of
https://github.com/openfrontio/OpenFrontIO.git
synced 2026-08-05 05:07:26 +00:00
underscore density when over max defense
This commit is contained in:
@@ -307,6 +307,13 @@ export class NameLayer implements Layer {
|
|||||||
shieldNumber.style.fontSize = `${render.fontSize * 0.6}px`;
|
shieldNumber.style.fontSize = `${render.fontSize * 0.6}px`;
|
||||||
shieldNumber.style.marginTop = `${-render.fontSize * 0.1}px`;
|
shieldNumber.style.marginTop = `${-render.fontSize * 0.1}px`;
|
||||||
shieldNumber.textContent = density;
|
shieldNumber.textContent = density;
|
||||||
|
if (parseFloat(density) > 90) {
|
||||||
|
shieldNumber.style.textDecoration = "underline";
|
||||||
|
shieldNumber.style.fontWeight = "bold";
|
||||||
|
} else {
|
||||||
|
shieldNumber.style.textDecoration = "none";
|
||||||
|
shieldNumber.style.fontWeight = "normal";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Handle icons
|
// Handle icons
|
||||||
|
|||||||
Reference in New Issue
Block a user