Fix: Floorplan & Button

This commit is contained in:
duckietm 2024-05-02 11:05:50 +02:00
parent 6426a7ad1e
commit 765aa38c3e
3 changed files with 32 additions and 20 deletions

View File

@ -29,7 +29,7 @@ input[type=number] {
} }
.btn-primary { .btn-primary {
color: #fff; color: #fff;
background-color: #7fb1c5; background-color: #3c6d82;
border: 2px solid #1a617f; border: 2px solid #1a617f;
padding: 0.25rem 0.5rem; padding: 0.25rem 0.5rem;
font-size: .7875rem; font-size: .7875rem;
@ -37,27 +37,12 @@ input[type=number] {
box-shadow: none!important; box-shadow: none!important;
} }
.btn-primary:hover { .btn-primary:hover {
background-color: #185b77;
border-color: #175670;
box-shadow: none!important;
}
.btn-secondary{
color: #fff;
background-color: #7fb1c5;
border: 2px solid #1a617f; border: 2px solid #1a617f;
padding: 0.25rem 0.5rem;
font-size: .7875rem;
border-radius: 0.5rem;
box-shadow: none!important;
}
.btn-secondary:hover{
background-color: #185b77;
border-color: #175670;
box-shadow: none!important; box-shadow: none!important;
} }
.btn-success{ .btn-success{
color: #fff; color: #fff;
background-color: #00800b; background-color: #3c8243;
border: 2px solid #006d09; border: 2px solid #006d09;
padding: 0.25rem 0.5rem; padding: 0.25rem 0.5rem;
font-size: .7875rem; font-size: .7875rem;

View File

@ -198,6 +198,12 @@ export class FloorplanEditor
const asset = spritesheet.frames[assetName]; const asset = spritesheet.frames[assetName];
if (asset === undefined)
{
console.warn(`Asset "${ assetName }" not found in spritesheet.`);
continue;
}
this.renderer.drawImage(this._image, asset.frame.x, asset.frame.y, asset.frame.w, asset.frame.h, positionX, positionY, asset.frame.w, asset.frame.h); this.renderer.drawImage(this._image, asset.frame.x, asset.frame.y, asset.frame.w, asset.frame.h, positionX, positionY, asset.frame.w, asset.frame.h);
} }
} }

View File

@ -191,6 +191,13 @@ export const spritesheet = {
trimmed: false, trimmed: false,
spriteSourceSize: { x: 0, y: 0, w: 34, h: 17 }, spriteSourceSize: { x: 0, y: 0, w: 34, h: 17 },
sourceSize: { w: 34, h: 17 }, sourceSize: { w: 34, h: 17 },
},
'r': {
frame: { x: 73, y: 153, w: 34, h: 17 },
rotated: false,
trimmed: false,
spriteSourceSize: { x: 0, y: 0, w: 34, h: 17 },
sourceSize: { w: 34, h: 17 },
}, },
'r_blocked': { 'r_blocked': {
frame: { x: 1, y: 172, w: 34, h: 17 }, frame: { x: 1, y: 172, w: 34, h: 17 },
@ -206,6 +213,20 @@ export const spritesheet = {
spriteSourceSize: { x: 0, y: 0, w: 34, h: 17 }, spriteSourceSize: { x: 0, y: 0, w: 34, h: 17 },
sourceSize: { w: 34, h: 17 }, sourceSize: { w: 34, h: 17 },
}, },
's': {
frame: { x: 73, y: 153, w: 34, h: 17 },
rotated: false,
trimmed: false,
spriteSourceSize: { x: 0, y: 0, w: 34, h: 17 },
sourceSize: { w: 34, h: 17 },
},
't': {
frame: { x: 73, y: 153, w: 34, h: 17 },
rotated: false,
trimmed: false,
spriteSourceSize: { x: 0, y: 0, w: 34, h: 17 },
sourceSize: { w: 34, h: 17 },
},
'x': { 'x': {
frame: { x: 73, y: 172, w: 34, h: 17 }, frame: { x: 73, y: 172, w: 34, h: 17 },
rotated: false, rotated: false,