PK
\]HK|)/ / meta.xmlaa.AP-Calculator-22.0.2pademinune's Armor Penetration Calculator 2pademinune's Armor Penetration Calculator 2
REQUIRES OpenWG Gameface (install it first) - without it the overlay will not appear.
Author: pademinune
PK jj] res/PK jj] res/gui/PK jj] res/gui/gameface/PK jj] res/gui/gameface/mods/PK jj] ! res/gui/gameface/mods/pademinune/PK j] . res/gui/gameface/mods/pademinune/APCalculator/PK
,]jo > res/gui/gameface/mods/pademinune/APCalculator/APBattleView.css
@font-face {
font-family: "PF DIN Max Compressed";
src: url("PFDINMax-CompressedBold.ttf") format("truetype");
font-weight: 700;
}
html, body {
margin: 0;
padding: 0;
width: 256px;
height: 256px;
background: transparent;
overflow: hidden;
pointer-events: none;
/* anchor point for the absolutely-positioned rows below */
position: relative;
/* background-color: lightcyan; */
/* background-image: url("wot-background.jpg");
background-size: 256px 256px;
background-repeat: no-repeat; */
}
/* all left and right offsets from now on are relative to an objects center */
.centered-label {
position: absolute;
left: 128px;
transform: translate(-50%, -50%);
font-family: "PF DIN Max Compressed", Arial, sans-serif;
font-size: 16px;
font-weight: 700;
text-shadow: 0 0 3px rgba(0, 0, 0, 0.9), 0 1px 2px rgba(0, 0, 0, 0.75);
white-space: nowrap;
z-index: 1;
}
#armor-label {
top: 155px; /* 35px center - 15px */
color: #6BF40D;
font-size: 22px;
}
#prob-label {
top: 180px; /* 35px center + 15px */
color: #6BF40D;
font-size: 18px;
}
#angle-label {
top: 165px; /* body's vertical center (70px / 2) -- same line as center */
left: 160px;
color: #ffffff;
font-size: 16px;
}
#label-bg {
position: absolute;
top: 167px; /* body's vertical center for a 256x256 box */
left: 128px; /* body's horizontal center */
transform: translate(-50%, -50%);
width: 110px; /* wider than the label block -- the fade needs room to taper off */
height: 70px;
/* backdrop-filter can't blur the 3D battle scene behind this transparent
overlay window (it only samples the browser's own DOM surface, and this
engine may not implement it at all) -- fake the "soft glow, not a box"
look with a plain radial tint that fades to transparent instead. */
background: radial-gradient(ellipse at center, rgba(0, 0, 0, 0.65) 0%, rgba(0, 0, 0, 0.35) 45%, rgba(0, 0, 0, 0) 75%);
z-index: 0;
}
#ap-root {
position: absolute;
left: 0;
top: 0;
z-index: 9000;
}
PK
]8( ? res/gui/gameface/mods/pademinune/APCalculator/APBattleView.html
SimpleLabelView
215
94%
33°
PK
])Qe = res/gui/gameface/mods/pademinune/APCalculator/APBattleView.js// APBattleView.js -- reads this view's own root ViewModel (APBattleVM: per-row
// armorText/armorVisible/armorColor, probText/probVisible/probColor,
// angleText/angleVisible/angleColor) and paints the three label rows already
// in the HTML, each shown/hidden independently. No feature name in
// ModelObserver(): this page IS the view's root model (a standalone registered
// window), not a submodel injected into someone else's document.
// Two folder segments under mods/ (pademinune/APCalculator/) -> two "../" to libs/model.js.
import { ModelObserver } from "../../libs/model.js";
const observer = ModelObserver();
const armorEl = document.getElementById("armor-label");
const probEl = document.getElementById("prob-label");
const angleEl = document.getElementById("angle-label");
const bgEl = document.getElementById("label-bg");
// display:"" defers to the CSS default (shown), "none" drops it from layout
// entirely -- same trick the old body-level toggle used, just per-element now.
function renderRow(el, text, visible, color) {
el.style.display = visible ? "" : "none";
if (!visible) {
return;
}
el.textContent = text || "";
el.style.color = color ? "#" + color : "";
}
function render(model) {
if (!model) {
bgEl.style.display = "none";
armorEl.style.display = "none";
probEl.style.display = "none";
angleEl.style.display = "none";
return;
}
const armorVisible = model.armorVisible;
const probVisible = model.probVisible;
const angleVisible = model.angleVisible;
renderRow(armorEl, model.armorText, armorVisible, model.armorColor);
renderRow(probEl, model.probText, probVisible, model.probColor);
renderRow(angleEl, model.angleText, angleVisible, model.angleColor);
// Background box tracks whichever row is visible; borrows armor's color
// (falling back through prob/angle) since it no longer has its own.
const anyVisible = armorVisible || probVisible || angleVisible;
bgEl.style.display = anyVisible ? "" : "none";
}
engine.whenReady.then(() => {
observer.onUpdate(render); // called every time Python pushes a change
observer.subscribe();
render(observer.model); // paint immediately with whatever's there now
});
PK
]CE! ! I res/gui/gameface/mods/pademinune/APCalculator/PFDINMax-CompressedBold.ttf `DSIG ! GDEF2 p