t2-mapper/src/components/PlayerHUD.module.css

298 lines
4.6 KiB
CSS
Raw Normal View History

2026-02-28 17:58:09 -08:00
.PlayerHUD {
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
z-index: 1;
pointer-events: none;
}
2026-03-04 12:15:24 -08:00
/* ── Top-right cluster: compass + bars ── */
2026-02-28 17:58:09 -08:00
2026-03-04 12:15:24 -08:00
.TopRight {
2026-02-28 17:58:09 -08:00
position: absolute;
2026-03-04 12:15:24 -08:00
top: 56px;
right: 8px;
display: flex;
align-items: flex-start;
gap: 6px;
2026-02-28 17:58:09 -08:00
}
2026-03-04 12:15:24 -08:00
.Compass {
position: relative;
width: 64px;
height: 64px;
flex-shrink: 0;
2026-02-28 17:58:09 -08:00
}
2026-03-04 12:15:24 -08:00
.CompassRing {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
image-rendering: auto;
2026-02-28 17:58:09 -08:00
}
2026-03-04 12:15:24 -08:00
.CompassNSEW {
2026-02-28 17:58:09 -08:00
position: absolute;
top: 0;
left: 0;
2026-03-04 12:15:24 -08:00
width: 100%;
2026-02-28 17:58:09 -08:00
height: 100%;
2026-03-04 12:15:24 -08:00
image-rendering: pixelated;
2026-02-28 17:58:09 -08:00
}
2026-03-04 12:15:24 -08:00
.Bars {
display: flex;
flex-direction: column;
gap: 3px;
padding-top: 10px;
}
.BarTrack {
width: 120px;
height: 10px;
background: rgba(0, 0, 0, 0.5);
border: 1px solid rgba(255, 255, 255, 0.15);
overflow: hidden;
}
.BarFillHealth {
height: 100%;
2026-02-28 17:58:09 -08:00
background: #2ecc40;
2026-03-04 12:15:24 -08:00
transition: width 0.15s ease-out;
2026-02-28 17:58:09 -08:00
}
2026-03-04 12:15:24 -08:00
.BarFillEnergy {
height: 100%;
2026-02-28 17:58:09 -08:00
background: #0af;
2026-03-04 12:15:24 -08:00
transition: width 0.15s ease-out;
}
/* ── Weapon HUD (right side vertical list) ── */
.WeaponHUD {
position: absolute;
right: 8px;
top: 50%;
transform: translateY(-50%);
display: flex;
flex-direction: column;
gap: 2px;
}
.WeaponSeparator {
height: 6px;
}
/* ── Chat Window (top-left) ── */
2026-03-09 23:19:14 -07:00
.ChatContainer {
2026-03-04 12:15:24 -08:00
position: absolute;
top: 56px;
left: 0;
max-width: 420px;
2026-03-09 23:19:14 -07:00
display: flex;
flex-direction: column;
pointer-events: auto;
border: 1px solid rgba(44, 172, 181, 0.4);
}
.ChatWindow {
max-width: 450px;
max-height: 12.5em;
overflow-y: auto;
2026-03-04 12:15:24 -08:00
background: rgba(0, 50, 60, 0.65);
2026-03-09 23:19:14 -07:00
padding: 6px 8px;
user-select: text;
2026-03-04 12:15:24 -08:00
font-size: 12px;
2026-03-09 23:19:14 -07:00
line-height: 1.333333;
/* Thin scrollbar that doesn't take much space. */
scrollbar-width: thin;
scrollbar-color: rgba(44, 172, 181, 0.4) transparent;
2026-03-04 12:15:24 -08:00
}
.ChatMessage {
padding: 1px 0;
/* Default to \c0 (GuiChatHudProfile fontColor) for untagged messages. */
color: rgb(44, 172, 181);
}
2026-03-09 23:19:14 -07:00
.ChatInputForm {
display: flex;
}
.ChatInput {
width: 100%;
background: rgba(0, 50, 60, 0.8);
border: 0;
border-top: 1px solid rgba(78, 179, 167, 0.2);
border-radius: 0;
color: rgb(40, 231, 240);
font-family: inherit;
font-size: 12px;
margin: 0;
padding: 6px 8px;
outline: none;
}
.ChatInput::placeholder {
color: rgba(44, 172, 181, 0.5);
}
.ChatInput:focus {
background: rgba(0, 50, 60, 0.9);
}
2026-03-04 12:15:24 -08:00
/* T2 GuiChatHudProfile fontColors palette (\c0\c9). */
2026-03-09 23:19:14 -07:00
.ChatColor0 {
color: rgb(44, 172, 181);
}
.ChatColor1 {
color: rgb(4, 235, 105);
}
.ChatColor2 {
color: rgb(219, 200, 128);
}
.ChatColor3 {
color: rgb(77, 253, 95);
}
.ChatColor4 {
color: rgb(40, 231, 240);
}
.ChatColor5 {
color: rgb(200, 200, 50);
}
.ChatColor6 {
color: rgb(200, 200, 200);
}
.ChatColor7 {
color: rgb(220, 220, 20);
}
.ChatColor8 {
color: rgb(150, 150, 250);
}
.ChatColor9 {
color: rgb(60, 220, 150);
}
2026-03-04 12:15:24 -08:00
/* ── Team Scores (bottom-left) ── */
.TeamScores {
position: absolute;
bottom: 130px;
left: 0;
font-family: monospace;
font-size: 12px;
}
.TeamRow {
display: flex;
gap: 6px;
padding: 2px 8px;
background: rgba(0, 50, 60, 0.65);
}
.TeamRow + .TeamRow {
border-top: 1px solid rgba(128, 255, 200, 0.15);
}
.TeamNameFriendly {
color: #2ecc40;
min-width: 60px;
}
.TeamNameEnemy {
color: #e44;
min-width: 60px;
}
.TeamScore {
color: #fff;
min-width: 24px;
text-align: right;
font-weight: bold;
}
.TeamCount {
color: #9ba;
min-width: 24px;
text-align: right;
}
/* ── Pack + Inventory HUD (bottom-right) ── */
.PackInventoryHUD {
position: absolute;
bottom: 100px;
right: 8px;
display: flex;
align-items: center;
gap: 4px;
}
.PackInvItem {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
background: rgba(0, 50, 60, 0.65);
border: 1px solid rgba(128, 255, 200, 0.15);
padding: 4px;
gap: 1px;
}
.PackInvItemActive {
border-color: rgba(128, 255, 200, 0.5);
box-shadow: 0 0 6px rgba(128, 255, 200, 0.3);
}
.PackInvItemDim {
opacity: 0.5;
}
.PackInvIcon {
display: block;
image-rendering: pixelated;
}
.PackInvCount {
font-family: monospace;
font-size: 11px;
color: #bfe;
min-width: 12px;
text-align: center;
}
.PackInvInfinity {
display: block;
image-rendering: pixelated;
opacity: 0.8;
}
/* ── Reticle (center) ── */
.Reticle {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
}
.ReticleImage {
width: 64px;
height: 64px;
opacity: 0.85;
image-rendering: pixelated;
}
.ReticleDot {
width: 4px;
height: 4px;
border-radius: 50%;
background: rgba(46, 204, 64, 0.7);
box-shadow: 0 0 4px rgba(46, 204, 64, 0.5);
2026-02-28 17:58:09 -08:00
}