| | |
| | | const style = new PIXI.TextStyle({ |
| | | fontFamily: 'Roboto', |
| | | fontSize: 12, |
| | | fill: '#000000', |
| | | fill: themeMode === 'light' ? '#000' : '#eee', |
| | | }); |
| | | const text = new PIXI.Text(`${sprite.data?.type} ${sprite.data?.no}`, style); |
| | | const background = new PIXI.Graphics(); |
| | | // shadow |
| | | background.beginFill(0x000000, 0.1); |
| | | background.beginFill(themeMode === 'light' ? '#000' : '#eee', 0.1); |
| | | background.drawRoundedRect(4, 4, text.width + 6, text.height + 6, 4); |
| | | background.endFill(); |
| | | // background |
| | | background.beginFill(0xffffff, 1); |
| | | background.beginFill(themeMode === 'light' ? '#fff' : '#333', 1); |
| | | background.drawRoundedRect(0, 0, text.width + 8, text.height + 8, 4); |
| | | background.endFill(); |
| | | |