Files
REM-Mod/EXE/remui/navbar.rml
T

51 lines
2.6 KiB
Plaintext

<rml>
<head>
<title>Nav bar</title>
<link type="text/rcss" href="rem.rcss"/>
<style>
/* only as big as the bar, centred at the top: the mouse beside it goes to the game */
body.navstrip
{
position: absolute;
left: 50%;
top: 4dp;
width: auto;
transform: translateX(-50%);
display: flex;
flex-direction: column;
align-items: center;
background-color: transparent;
}
/* in the flight HUD's design, as its maneuver bar (hud.rml .mans): one frame with cut corners
(rem.rcss, hudframes), icon over its name, a thin line between, the active one amber */
.navbar { display: flex; flex-direction: row; align-items: center; height: 76dp; box-sizing: border-box; padding: 0 18dp; decorator: ninepatch(fb, fb-i); }
.nb { display: flex; flex-direction: column; align-items: center; justify-content: center; min-width: 84dp; height: 62dp; padding: 0 10dp; border-left: 1dp #2b6f9e; }
.nb:first-child, .nb.active { border-left-width: 0; }
.nb:hover { background-color: #f2b13c14; }
.nb.active { background-color: #f2b13c1f; }
.nb.disabled { opacity: 0.35; }
.nb.disabled:hover { background-color: transparent; }
.nb img { width: 34dp; height: 34dp; }
.nb:hover img, .nb.active img { image-color: #f2b13c; }
.nb span { margin-top: 2dp; font-family: "Saira SemiCondensed"; font-weight: 600; font-size: 12dp; letter-spacing: 1dp; text-transform: uppercase; white-space: nowrap; color: #b9d4ea; }
.nb.active span { color: #f2b13c; }
/* the room's services (repair, launch, the dealer's desk, ...) in a smaller second row under it */
.navbar.tabs { height: 56dp; margin-top: 4dp; padding: 0 14dp; }
.tabs .nb { min-width: 72dp; height: 46dp; }
.tabs .nb img { width: 26dp; height: 26dp; }
</style>
</head>
<body class="navstrip" data-model="navbar">
<div class="navbar" data-if="shown">
<div class="nb" data-for="b : rooms" data-class-active="b.active" data-class-disabled="b.disabled" data-action="click" data-attr-data-arg="b.key">
<img data-if="b.icon != ''" data-attr-src="b.icon"/><span>{{ b.label }}</span>
</div>
</div>
<div class="navbar tabs" data-if="shown && tabs.size &gt; 0">
<div class="nb" data-for="b : tabs" data-class-active="b.active" data-class-disabled="b.disabled" data-action="click" data-attr-data-arg="b.key">
<img data-if="b.icon != ''" data-attr-src="b.icon"/><span>{{ b.label }}</span>
</div>
</div>
</body>
</rml>