mirror of
https://github.com/tobspr/shapez.io.git
synced 2026-02-19 14:29:20 +00:00
Update mass_selector.js
This commit is contained in:
parent
50cf1880f7
commit
f15c1d4c4b
@ -305,9 +305,16 @@ export class HUDMassSelector extends BaseHUDPart {
|
|||||||
renderedUids.add(uid);
|
renderedUids.add(uid);
|
||||||
|
|
||||||
const staticComp = contents.components.StaticMapEntity;
|
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 => {
|
this.selectedUids.forEach(uid => {
|
||||||
const entity = this.root.entityMgr.findByUid(uid);
|
const entity = this.root.entityMgr.findByUid(uid);
|
||||||
const staticComp = entity.components.StaticMapEntity;
|
const staticComp = entity.components.StaticMapEntity;
|
||||||
|
const bounds = staticComp.getTileSpaceBounds();
|
||||||
staticComp.drawSpriteOnBoundsClipped(parameters, staticComp.getBlueprintSprite(), 0);
|
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();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user