space for window x to close window suckless wm api docs: - to create a window, create a clone with some variables set (one has already been provided when you press space). windows are nothing but clones of the wm sprite! - to create custom apps, upon window creation, set Window.run to something else and add the app's main function to Window.run (a demo app called "app" has already been provided) - the main function of the app runs every frame, so write your app in a way that everything it displays is dependent on the blocks being run at any given frame (you'd have to draw things using pen/stamps), e.g. to write a simple timer app, the only blocks you should have are to draw the window itself (probably a rectangle filler) and 1 block to print the output of scratch's timer block (using a pen/stamp text engine) - every variable specific to a running instance of the app must be set to for this sprite only (e.g. user input), and any variable shared between multiple windows should be made for all sprites (e.g. global dark/light theme) - before handling any kind of mouse/keyboard input within the window (e.g. button presses), check if the window is focused. that way it won't trigger if you're doing things on an overlapping window - to check if a window is focused, check if Window.id = item 1 of Window.order - be sure to draw stuff relative to the Window.x1, Window.y1, Window.x2 and Window.y2 positions so that things get drawn according to the size and position of the window (for scalability reasons you may choose to write your own UI handler where the position and size of every element get determined automatically, similar to CSS flexbox)