This commit is contained in:
kolaflash
2025-12-07 14:52:14 +01:00
parent 11bf084fd8
commit c5ceebdecb
2 changed files with 15 additions and 3 deletions
+3
View File
@@ -7,6 +7,9 @@
}, },
"suspicious": { "suspicious": {
"noAssignInExpressions": "off" "noAssignInExpressions": "off"
},
"correctness": {
"useParseIntRadix": "off"
} }
} }
} }
+12 -3
View File
@@ -1,6 +1,7 @@
import "./main.css"; import "./main.css";
import { type Component, createSignal, onMount } from "solid-js"; import { type Component, createSignal, onMount } from "solid-js";
import { render } from "solid-js/web"; import { render } from "solid-js/web";
import { currentScene } from "#/engine/Scene.ts";
import { setScale, viewport } from "#/engine/Viewport.ts"; import { setScale, viewport } from "#/engine/Viewport.ts";
import { InputField } from "#/tools/controls/InputField.tsx"; import { InputField } from "#/tools/controls/InputField.tsx";
import { RangeSlider } from "#/tools/controls/RangeSlider.tsx"; import { RangeSlider } from "#/tools/controls/RangeSlider.tsx";
@@ -65,20 +66,28 @@ const DevTools: Component<{ gameContainer: HTMLElement }> = ({
<div class="scene-props"> <div class="scene-props">
<InputField <InputField
name="file" name="file"
value="/foo/bar" value={currentScene.data.id}
icon={FileIcon()} icon={FileIcon()}
></InputField> ></InputField>
<InputField <InputField
type="number" type="number"
name="width" name="width"
value="42" value={String(currentScene.data.width)}
icon={ArrowAutofitWidthIcon()} icon={ArrowAutofitWidthIcon()}
onChange={(value) => {
currentScene.data.width = parseInt(value);
self.dispatchEvent(new Event("resize"));
}}
></InputField> ></InputField>
<InputField <InputField
type="number" type="number"
name="height" name="height"
value="24" value={String(currentScene.data.height)}
icon={ArrowAutofitHeightIcon()} icon={ArrowAutofitHeightIcon()}
onChange={(value) => {
currentScene.data.height = parseInt(value);
self.dispatchEvent(new Event("resize"));
}}
></InputField> ></InputField>
</div> </div>
</div> </div>