11<script lang =" ts" >
2+ // client-only.
23import { Block } from " @/constants.ts" ;
34import type { UIContext } from " @/context.ts" ;
4- // client-only.
55import { setup } from " @/main.ts" ;
66import type { StageDefinition } from " @/stages.ts" ;
7- import { type Writable , writable } from " svelte/store " ;
8- import Ability from " ./Ability. svelte" ;
7+ import Ability from " @/ui-components/Ability.svelte " ;
8+ import { writable } from " svelte/store " ;
99
1010type Props = { stageNum: string ; stage: StageDefinition };
1111const { stageNum, stage }: Props = $props ();
@@ -27,21 +27,34 @@ $effect(() => {
2727 </script >
2828
2929<div bind:this ={container } class =" container" >
30- <div class =" uiBackground" style =" position: fixed; left: 0; top: 0; right: 0; display: flex; align-items: baseline;" >
30+ <div
31+ class =" uiBackground"
32+ style =" position: fixed; left: 0; top: 0; right: 0; display: flex; align-items: baseline;"
33+ >
3134 <span style =" font-size: 2rem; margin-right:0.5rem;" >Stage:</span >
3235 <span style ="font-size: 2.5rem" >{stageNum }</span >
3336 <span style =" flex-grow: 1" ></span >
3437 <span style =" font-size: 1.5rem;" >Clipboard:</span >
3538 <div class =" inventory" >
3639 {#if $uiContext .inventory === Block .movable }
3740 <!-- todo: tint 0xff0000 をする必要があるが、そもそもこの画像は仮なのか本当に赤色にするのか -->
38- <img src =" /assets/block.png" width =" 100%" height =" 100%" />
41+ <img
42+ src =" /assets/block.png"
43+ alt =" inventory"
44+ width =" 100%"
45+ height =" 100%"
46+ />
3947 {/if }
4048 </div >
4149 <span style =" font-size: 1.5rem;" >✕</span >
42- <span style ="font-size: 2rem;" >{$uiContext .inventoryIsInfinite ? " ∞" : " 1" }</span >
50+ <span style =" font-size: 2rem;"
51+ >{$uiContext .inventoryIsInfinite ? " ∞" : " 1" }</span
52+ >
4353 </div >
44- <div class =" uiBackground" style =" position: fixed; left: 0; bottom: 0; right: 0; display: flex; align-items: baseline;" >
54+ <div
55+ class =" uiBackground"
56+ style =" position: fixed; left: 0; bottom: 0; right: 0; display: flex; align-items: baseline;"
57+ >
4558 <span style =" font-size: 1.5rem; margin-right: 1rem;" >Abilities:</span >
4659 <Ability key ="C" name ="Copy" num ={$uiContext .copy } />
4760 <Ability key ="X" name ="Cut" num ={$uiContext .cut } />
@@ -60,7 +73,7 @@ $effect(() => {
6073 .uiBackground {
6174 background : oklch(82.8% 0.189 84.429 / 40% );
6275 backdrop-filter : blur (2px );
63- padding : 0.75rem 1rem ;
76+ padding : 0.75rem 1rem ;
6477 }
6578 .inventory {
6679 width : 3rem ;
0 commit comments