ui/gameui.razor.scss
@import "_theme.scss";
// Shared by every panel under Code/UI - GameUi and all its children reference this one file,
// since only the root picks up a same-named stylesheet automatically. One file is also what
// keeps every screen speaking the same rhythm: same radius, same spacing unit, same curve.
.game-ui {
position: absolute;
width: 100%;
height: 100%;
@include face;
pointer-events: none;
.warning {
position: absolute;
top: 40px;
left: 40px;
padding-top: 12px;
padding-bottom: 12px;
padding-left: 20px;
padding-right: 20px;
border-radius: $radius;
background-color: $apple;
color: $text;
font-size: 20px;
}
}
// ------------------------------------------------------------ live readout
// Sits above the tray, never over it. The camera's padding is what leaves room for this, and
// the strip it leaves is shallow - so the readout is a *row* rather than a stack. Stacked, the
// best line fell onto the sand, and cream text on the brightest surface in the game is the one
// combination that cannot be read at all.
.readout {
position: absolute;
top: 10px;
left: 0;
width: 100%;
flex-direction: row;
align-items: center;
justify-content: center;
gap: 18px;
pointer-events: none;
.score {
@include numeral;
font-size: 56px;
line-height: 1;
color: $text;
// Eases back to rest, so the pop below only has to set the peak.
transition: transform 0.18s $ease, color 0.18s $ease;
transform: scale(1);
}
// The score swells while it is counting. It is the third channel confirming an apple -
// after the sound and the burst - and the only one that lands where the player's eye
// goes *after* the event rather than where it was during it.
.popped {
transform: scale(1.16);
color: $leaf;
}
.best {
flex-direction: row;
align-items: center;
gap: 8px;
.best-label {
@include label;
font-size: 12px;
}
.best-value {
@include numeral;
font-size: 20px;
color: $text-soft;
}
}
}
// ------------------------------------------------------------ settings
.settings-card {
min-width: 520px;
// Matches the settings list, so the two buttons below it line up with the rows above and
// "Restore Defaults" has room to sit on one line.
.menu-row { width: 440px; }
}
.settings-list {
flex-direction: column;
align-items: stretch;
// Wide enough that the label column, the meter and the stepper all sit on one line at the
// longest label the screen has.
width: 440px;
margin-top: 32px;
}