style: make sidebar block selector more visible
This commit is contained in:
parent
4fcc15d888
commit
81f80a8887
1 changed files with 4 additions and 4 deletions
|
|
@ -8,7 +8,7 @@ import { ToolContext } from "@/context/Tool";
|
||||||
|
|
||||||
import { useBlockData } from "@/hooks/useBlockData";
|
import { useBlockData } from "@/hooks/useBlockData";
|
||||||
import { useTextures } from "@/hooks/useTextures";
|
import { useTextures } from "@/hooks/useTextures";
|
||||||
import { Application } from "pixi.js";
|
import { AlphaFilter, Application } from "pixi.js";
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
stageWidth: number;
|
stageWidth: number;
|
||||||
|
|
@ -92,6 +92,7 @@ function BlockSelector({ stageWidth, searchInput }: Props) {
|
||||||
mouseover={() => setHoverPosition({ x, y })}
|
mouseover={() => setHoverPosition({ x, y })}
|
||||||
click={onClick}
|
click={onClick}
|
||||||
tap={onClick}
|
tap={onClick}
|
||||||
|
filters={selectedBlock == block ? [] : [new AlphaFilter(0.3)]}
|
||||||
/>
|
/>
|
||||||
);
|
);
|
||||||
})}
|
})}
|
||||||
|
|
@ -102,8 +103,7 @@ function BlockSelector({ stageWidth, searchInput }: Props) {
|
||||||
y={hoverPosition.y}
|
y={hoverPosition.y}
|
||||||
draw={(g) => {
|
draw={(g) => {
|
||||||
g.clear();
|
g.clear();
|
||||||
g.beginFill(0x000000, 0.5);
|
g.lineStyle(4, isDark ? 0xffffff : 0x000000, 1, 1);
|
||||||
g.lineStyle(2, isDark ? 0xffffff : 0x000000, 1, 1);
|
|
||||||
g.drawRect(0, 0, 32, 32);
|
g.drawRect(0, 0, 32, 32);
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
|
|
@ -115,7 +115,7 @@ function BlockSelector({ stageWidth, searchInput }: Props) {
|
||||||
y={selectedBlockPosition.y}
|
y={selectedBlockPosition.y}
|
||||||
draw={(g) => {
|
draw={(g) => {
|
||||||
g.clear();
|
g.clear();
|
||||||
g.lineStyle(2, isDark ? 0xffffff : 0x000000, 1, 1);
|
g.lineStyle(2, isDark ? 0xffffff : 0x000000, 0.75, 0);
|
||||||
g.drawRect(0, 0, 32, 32);
|
g.drawRect(0, 0, 32, 32);
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue