mirror of
https://github.com/cliffe/BreakEscape.git
synced 2026-02-20 13:50:46 +00:00
- Deleted unused character images: woman_in_science_lab_coat.png and woman_with_black_long_hair_bow_in_hair_long_sleeve_(1).png. - Added new padlock icon asset for UI. - Introduced player_preferences.css for styling the player preferences configuration screen. - Updated game.js to load new character atlases with simplified filenames. - Enhanced player.js to create custom idle animations for characters. - Implemented sprite-grid.js for sprite selection UI, including a preview feature. - Updated database schema to include break_escape_player_preferences table for storing player settings. - Modified convert_pixellab_to_spritesheet.py to map character names to simplified filenames and extract headshots from character images.
343 lines
5.4 KiB
CSS
343 lines
5.4 KiB
CSS
/* Player Preferences Configuration Screen */
|
|
|
|
body {
|
|
font-family: 'Pixelify Sans', Arial, sans-serif;
|
|
background: #1a1a1a;
|
|
color: #fff;
|
|
margin: 0;
|
|
padding: 20px;
|
|
}
|
|
|
|
.configuration-container {
|
|
max-width: 1200px;
|
|
margin: 0 auto;
|
|
padding: 20px;
|
|
background: #2a2a2a;
|
|
border: 2px solid #00ff00;
|
|
}
|
|
|
|
h1 {
|
|
text-align: center;
|
|
color: #00ff00;
|
|
font-size: 32px;
|
|
margin-bottom: 20px;
|
|
text-transform: uppercase;
|
|
}
|
|
|
|
.config-prompt {
|
|
padding: 12px;
|
|
background: #fff3cd;
|
|
border: 2px solid #ffc107;
|
|
margin-bottom: 20px;
|
|
font-weight: bold;
|
|
color: #000;
|
|
text-align: center;
|
|
}
|
|
|
|
.selection-required {
|
|
color: #ff4444;
|
|
font-weight: bold;
|
|
margin: 8px 0;
|
|
text-align: center;
|
|
}
|
|
|
|
/* Form Groups */
|
|
|
|
.form-group {
|
|
margin-bottom: 24px;
|
|
}
|
|
|
|
.form-group label {
|
|
display: block;
|
|
color: #00ff00;
|
|
font-weight: bold;
|
|
margin-bottom: 8px;
|
|
font-size: 18px;
|
|
}
|
|
|
|
.form-control {
|
|
width: 100%;
|
|
max-width: 400px;
|
|
padding: 10px;
|
|
font-size: 16px;
|
|
border: 2px solid #00ff00;
|
|
background: #1a1a1a;
|
|
color: #00ff00;
|
|
font-family: 'Pixelify Sans', monospace;
|
|
}
|
|
|
|
.form-control:focus {
|
|
outline: none;
|
|
border-color: #00ff00;
|
|
box-shadow: 0 0 10px rgba(0, 255, 0, 0.3);
|
|
}
|
|
|
|
.form-group small {
|
|
display: block;
|
|
color: #888;
|
|
margin-top: 4px;
|
|
font-size: 14px;
|
|
}
|
|
|
|
/* Sprite selection layout: preview (160x160) + grid of headshots */
|
|
|
|
.sprite-selection-layout {
|
|
display: flex;
|
|
flex-wrap: wrap;
|
|
gap: 24px;
|
|
align-items: flex-start;
|
|
}
|
|
|
|
/* 160x160 animated preview */
|
|
|
|
.sprite-preview-large {
|
|
flex-shrink: 0;
|
|
width: 160px;
|
|
text-align: center;
|
|
}
|
|
|
|
#sprite-preview-canvas-container {
|
|
width: 160px;
|
|
height: 160px;
|
|
margin: 0 auto;
|
|
border: 2px solid #00ff00;
|
|
background: #1a1a1a;
|
|
box-sizing: border-box;
|
|
}
|
|
|
|
#sprite-preview-canvas-container canvas {
|
|
display: block;
|
|
image-rendering: pixelated;
|
|
image-rendering: -moz-crisp-edges;
|
|
image-rendering: crisp-edges;
|
|
}
|
|
|
|
.preview-label {
|
|
margin-top: 8px;
|
|
font-size: 14px;
|
|
color: #00ff00;
|
|
font-weight: bold;
|
|
}
|
|
|
|
/* Grid of static headshots */
|
|
|
|
.sprite-grid {
|
|
display: grid;
|
|
grid-template-columns: repeat(4, 1fr);
|
|
gap: 12px;
|
|
flex: 1;
|
|
min-width: 280px;
|
|
}
|
|
|
|
.sprite-card {
|
|
border: 2px solid #333;
|
|
padding: 8px;
|
|
text-align: center;
|
|
cursor: pointer;
|
|
background: #1a1a1a;
|
|
transition: border-color 0.2s, background-color 0.2s;
|
|
display: block;
|
|
position: relative;
|
|
}
|
|
|
|
.sprite-card:hover:not(.invalid) {
|
|
border-color: #00ff00;
|
|
background: #2a2a2a;
|
|
}
|
|
|
|
.sprite-card.selected {
|
|
border-color: #00ff00;
|
|
background: #003300;
|
|
box-shadow: 0 0 20px rgba(0, 255, 0, 0.5);
|
|
}
|
|
|
|
.sprite-card.invalid {
|
|
opacity: 0.5;
|
|
cursor: not-allowed;
|
|
background: #1a1a1a;
|
|
}
|
|
|
|
.sprite-card.invalid:hover {
|
|
border-color: #333;
|
|
background: #1a1a1a;
|
|
}
|
|
|
|
/* Headshot image - pixel-art compatible */
|
|
|
|
.sprite-headshot-container {
|
|
position: relative;
|
|
width: 64px;
|
|
height: 64px;
|
|
margin: 0 auto;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
overflow: hidden;
|
|
}
|
|
|
|
.sprite-headshot {
|
|
width: 64px;
|
|
height: 64px;
|
|
object-fit: contain;
|
|
display: block;
|
|
/* Pixel-art: no smoothing */
|
|
image-rendering: pixelated;
|
|
image-rendering: -moz-crisp-edges;
|
|
image-rendering: crisp-edges;
|
|
-ms-interpolation-mode: nearest-neighbor;
|
|
}
|
|
|
|
.headshot-fallback {
|
|
font-size: 10px;
|
|
color: #888;
|
|
text-align: center;
|
|
padding: 4px;
|
|
}
|
|
|
|
.headshot-fallback-hidden {
|
|
display: none;
|
|
}
|
|
|
|
.sprite-lock-overlay {
|
|
position: absolute;
|
|
top: 0;
|
|
left: 0;
|
|
width: 100%;
|
|
height: 100%;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
background: rgba(0, 0, 0, 0.6);
|
|
pointer-events: none;
|
|
}
|
|
|
|
.lock-icon {
|
|
width: 24px;
|
|
height: 24px;
|
|
image-rendering: pixelated;
|
|
image-rendering: -moz-crisp-edges;
|
|
image-rendering: crisp-edges;
|
|
}
|
|
|
|
.sprite-radio {
|
|
display: none;
|
|
}
|
|
|
|
.sprite-info {
|
|
margin-top: 6px;
|
|
}
|
|
|
|
.sprite-label {
|
|
display: block;
|
|
font-size: 11px;
|
|
font-weight: bold;
|
|
color: #00ff00;
|
|
text-transform: capitalize;
|
|
word-wrap: break-word;
|
|
}
|
|
|
|
/* Form Actions */
|
|
|
|
.form-actions {
|
|
margin-top: 24px;
|
|
display: flex;
|
|
gap: 12px;
|
|
justify-content: center;
|
|
}
|
|
|
|
.btn {
|
|
border: 2px solid #00ff00;
|
|
padding: 12px 24px;
|
|
cursor: pointer;
|
|
background: #1a1a1a;
|
|
font-weight: bold;
|
|
font-size: 16px;
|
|
text-decoration: none;
|
|
display: inline-block;
|
|
transition: background-color 0.2s, color 0.2s;
|
|
font-family: 'Pixelify Sans', Arial, sans-serif;
|
|
text-transform: uppercase;
|
|
}
|
|
|
|
.btn:hover {
|
|
background: #00ff00;
|
|
color: #000;
|
|
}
|
|
|
|
.btn-primary {
|
|
background: #00ff00;
|
|
color: #000;
|
|
}
|
|
|
|
.btn-primary:hover {
|
|
background: #00cc00;
|
|
border-color: #00cc00;
|
|
}
|
|
|
|
.btn-secondary {
|
|
background: #555;
|
|
border-color: #777;
|
|
color: #fff;
|
|
}
|
|
|
|
.btn-secondary:hover {
|
|
background: #777;
|
|
border-color: #999;
|
|
}
|
|
|
|
/* Responsive Design */
|
|
|
|
@media (max-width: 768px) {
|
|
.sprite-selection-layout {
|
|
flex-direction: column;
|
|
align-items: center;
|
|
}
|
|
|
|
.sprite-grid {
|
|
grid-template-columns: repeat(4, 1fr);
|
|
gap: 10px;
|
|
width: 100%;
|
|
}
|
|
|
|
h1 {
|
|
font-size: 24px;
|
|
}
|
|
|
|
.form-control {
|
|
font-size: 14px;
|
|
}
|
|
}
|
|
|
|
@media (max-width: 480px) {
|
|
.sprite-grid {
|
|
grid-template-columns: repeat(3, 1fr);
|
|
gap: 8px;
|
|
}
|
|
|
|
.sprite-headshot-container {
|
|
width: 56px;
|
|
height: 56px;
|
|
}
|
|
|
|
.sprite-headshot {
|
|
width: 56px;
|
|
height: 56px;
|
|
}
|
|
|
|
.configuration-container {
|
|
padding: 10px;
|
|
}
|
|
|
|
h1 {
|
|
font-size: 20px;
|
|
}
|
|
|
|
.sprite-card {
|
|
padding: 6px;
|
|
}
|
|
|
|
.sprite-label {
|
|
font-size: 10px;
|
|
}
|
|
}
|