This repository has been archived by the owner on Aug 24, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
35 additions
and
44 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
<script lang="ts"> | ||
import { store } from '../game'; | ||
const propertyDescriptions: Record<number, string> = { | ||
32: 'Enable gravity', | ||
}; | ||
let propertyValues = $store.brushColour.split('').map((v) => v === '1'); | ||
$: { | ||
$store.brushColour = propertyValues.map((v) => (v ? '1' : '0')).join(''); | ||
} | ||
</script> | ||
|
||
<div class="col-span-2 flex flex-col items-center"> | ||
<h2 class="text-xl font-semibold">Pixel properties</h2> | ||
<div class="flex w-full gap-4 p-2"> | ||
{#each Array(4) as _, groupIndex} | ||
<div class="flex flex-1 justify-between"> | ||
{#each Array(8) as _, i} | ||
<div class="flex flex-col items-center justify-between gap-2"> | ||
<input type="checkbox" bind:checked={propertyValues[8 * groupIndex + i]} /> | ||
<div style:writing-mode="vertical-lr"> | ||
{propertyDescriptions[8 * groupIndex + i + 1] || ''} | ||
</div> | ||
</div> | ||
{/each} | ||
</div> | ||
{/each} | ||
</div> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters