pixijs / ui

Commonly used UI components for PixiJS

Home Page:https://pixijs.io/ui/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

CheckBox: When update styles it is broken

CyberDex opened this issue · comments

When you do

checkBox.style = {
                unchecked: new Graphics()
                    .beginFill(a % 2 === 0 ? 'red' : 'blue')
                    .drawRoundedRect(-2, -2, width + 4, height + 4, radius)
                    .beginFill(color)
                    .drawRoundedRect(0, 0, width, height, radius),
                checked: new Graphics()
                    .beginFill('blue')
                    .drawRoundedRect(-2, -2, width + 4, height + 4, radius)
                    .beginFill(a % 2 === 0 ? 'red' : 'blue')
                    .drawRoundedRect(0, 0, width, height, radius)
                    .beginFill('yellow')
                    .drawRoundedRect(3, 3, width - 6, height - 6, radius)
                    .beginFill('red')
                    .drawRoundedRect(5, 5, width - 10, height - 10, radius),
            };

checkbox turns into black