@@ -22,6 +22,19 @@ import { attachKeyboardListeners } from "./controls/keyboard.mjs";
2222import { attachGamepadBlockListeners } from "./controls/general.mjs" ;
2323import { attachGamepadListeners } from "./controls/gamepad.mjs" ;
2424import { initializeCursor } from "./cursor.mjs" ;
25+ import { ColorButton } from "./ui/color.mjs" ;
26+ import { ToolButton } from "./ui/tool.mjs" ;
27+ import { VariantButton } from "./ui/variant.mjs" ;
28+ import { VariantStampButton } from "./ui/variant-stamp.mjs" ;
29+ import { UiButton } from "./ui/button.mjs" ;
30+
31+ function registerComponents ( ) {
32+ customElements . define ( "ui-button" , UiButton ) ;
33+ customElements . define ( "color-button" , ColorButton ) ;
34+ customElements . define ( "tool-button" , ToolButton ) ;
35+ customElements . define ( "variant-button" , VariantButton ) ;
36+ customElements . define ( "variant-stamp-button" , VariantStampButton ) ;
37+ }
2538
2639function attachResizeListeners ( ) {
2740 const canvas = getCanvas ( ) ;
@@ -59,6 +72,7 @@ export function boot() {
5972 const state = createState ( ) ;
6073 const canvas = getCanvas ( ) ;
6174
75+ registerComponents ( ) ;
6276 restorePreviousCanvas ( canvas ) ;
6377 attachCanvasSaveListener ( canvas ) ;
6478
0 commit comments