Skip to content

Commit 17647d4

Browse files
committed
revert: remove unrelated StructureIconsLayer changes from lobby-chat PR
1 parent 0d83cf8 commit 17647d4

File tree

1 file changed

+11
-7
lines changed

1 file changed

+11
-7
lines changed

src/client/graphics/layers/StructureIconsLayer.ts

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
import { OutlineFilter } from "@pixi/filter-outline";
21
import { extend } from "colord";
32
import a11yPlugin from "colord/plugins/a11y";
3+
import { OutlineFilter } from "pixi-filters";
44
import * as PIXI from "pixi.js";
55
import bitmapFont from "../../../../resources/fonts/round_6x6_modified.xml";
66
import { Theme } from "../../../core/configuration/Config";
@@ -272,7 +272,7 @@ export class StructureIconsLayer implements Layer {
272272
canUpgrade: false,
273273
});
274274
this.ghostUnit.container.filters = [
275-
new OutlineFilter(2, 0xff0000) as any,
275+
new OutlineFilter({ thickness: 2, color: "rgba(255, 0, 0, 1)" }),
276276
];
277277
return;
278278
}
@@ -290,15 +290,15 @@ export class StructureIconsLayer implements Layer {
290290
);
291291
if (this.potentialUpgrade) {
292292
this.potentialUpgrade.iconContainer.filters = [
293-
new OutlineFilter(2, 0x00ff00) as any,
293+
new OutlineFilter({ thickness: 2, color: "rgba(0, 255, 0, 1)" }),
294294
];
295295
this.potentialUpgrade.dotContainer.filters = [
296-
new OutlineFilter(2, 0x00ff00) as any,
296+
new OutlineFilter({ thickness: 2, color: "rgba(0, 255, 0, 1)" }),
297297
];
298298
}
299299
} else if (unit.canBuild === false) {
300300
this.ghostUnit.container.filters = [
301-
new OutlineFilter(2, 0xff0000) as any,
301+
new OutlineFilter({ thickness: 2, color: "rgba(255, 0, 0, 1)" }),
302302
];
303303
}
304304

@@ -502,8 +502,12 @@ export class StructureIconsLayer implements Layer {
502502
render.iconContainer.alpha = structureInfos.visible ? 1 : 0.3;
503503
render.dotContainer.alpha = structureInfos.visible ? 1 : 0.3;
504504
if (structureInfos.visible && focusStructure) {
505-
render.iconContainer.filters = [new OutlineFilter(2, 0xffffff) as any];
506-
render.dotContainer.filters = [new OutlineFilter(2, 0xffffff) as any];
505+
render.iconContainer.filters = [
506+
new OutlineFilter({ thickness: 2, color: "rgb(255, 255, 255)" }),
507+
];
508+
render.dotContainer.filters = [
509+
new OutlineFilter({ thickness: 2, color: "rgb(255, 255, 255)" }),
510+
];
507511
} else {
508512
render.iconContainer.filters = [];
509513
render.dotContainer.filters = [];

0 commit comments

Comments
 (0)