1
0
mirror of https://github.com/tobspr/shapez.io.git synced 2026-02-18 22:09:20 +00:00

Update mass_selector.js

This commit is contained in:
TcePrepK 2020-11-07 23:44:42 +03:00 committed by GitHub
parent 50cf1880f7
commit f15c1d4c4b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -305,9 +305,16 @@ export class HUDMassSelector extends BaseHUDPart {
renderedUids.add(uid);
const staticComp = contents.components.StaticMapEntity;
staticComp.drawSpriteOnBoundsClipped(parameters, staticComp.getBlueprintSprite(), 0);
const bounds = staticComp.getTileSpaceBounds();
parameters.context.beginRoundedRect(
bounds.x * globalConfig.tileSize + boundsBorder,
bounds.y * globalConfig.tileSize + boundsBorder,
bounds.w * globalConfig.tileSize - 2 * boundsBorder,
bounds.h * globalConfig.tileSize - 2 * boundsBorder,
2
);
parameters.context.fill();
}
parameters.context.globalAlpha = 1;
}
}
}
@ -316,8 +323,15 @@ export class HUDMassSelector extends BaseHUDPart {
this.selectedUids.forEach(uid => {
const entity = this.root.entityMgr.findByUid(uid);
const staticComp = entity.components.StaticMapEntity;
staticComp.drawSpriteOnBoundsClipped(parameters, staticComp.getBlueprintSprite(), 0);
const bounds = staticComp.getTileSpaceBounds();
parameters.context.beginRoundedRect(
bounds.x * globalConfig.tileSize + boundsBorder,
bounds.y * globalConfig.tileSize + boundsBorder,
bounds.w * globalConfig.tileSize - 2 * boundsBorder,
bounds.h * globalConfig.tileSize - 2 * boundsBorder,
2
);
parameters.context.fill();
});
}
}