forked from Blendman974/faceclaw
Merge branch 'main' of https://github.com/jimrandomh/faceclaw
This commit is contained in:
commit
51edaee883
27 files changed
+634
-127
No files matched your search
@@ -52,11 +52,19 @@ export class ShellModalLayer implements Layer {
|
||||
this.stack.setBaseSize(interior);
|
||||
// Flattening bakes the inner stack's planes (glyphs included) so the blit
|
||||
// below transplants the finished modal content into this layer's plane.
|
||||
const inner = flattenPlanes(this.stack.paint(), interior);
|
||||
// The top plane's retained presentations (a menu's selection highlight
|
||||
// and scroll strip) stay unbaked: they are display lists the glasses
|
||||
// animate, and baking one freezes it on its first frame. Lower planes'
|
||||
// are baked so the top plane's raster still covers them.
|
||||
const planes = this.stack.paint();
|
||||
const top = planes[planes.length - 1]!;
|
||||
const inner = flattenPlanes(planes.map((plane) => plane === top ? { ...plane, image: plane.image.withDrawsBaked(false) } : plane), interior);
|
||||
const rect = modalRect();
|
||||
const innerX = rect.x + MODAL_PADDING, innerY = rect.y + MODAL_PADDING;
|
||||
image.fillRect(rect.x, rect.y, rect.width, rect.height, SHELL_OPAQUE_BLACK);
|
||||
image.drawRect(rect.x, rect.y, rect.width, rect.height, 110);
|
||||
image.bitBlt(inner, rect.x + MODAL_PADDING, rect.y + MODAL_PADDING, { transparentZero: true });
|
||||
image.bitBlt(inner, innerX, innerY, { transparentZero: true });
|
||||
top.image.copyPresentationsInto(image, innerX + top.x, innerY + top.y);
|
||||
return image;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user