Quick thing I made with the, ahem, undocumented mouse feature, dunno if it's been done before, but here's my take on a stacking window manager I coded in, like, less than an hour?
- You can drag and drop windows
- Active window goes on front
- Each window has its own update/draw function, clip'd and camera'd to the window
I wanted to post this before going to sleep, but here's what's probably next:
- Resizing windows
- Title bars
- Input to the active window
- Task bar and desktop icons
Well, hope you like it. It's pretty much a multitasking OS in PICO-8 we have here.
P.S.: Since it uses the undocumented mouse feature, it may or may not work on anything other than the desktop version. You've been warned.
Hey, thanks, it worked.
So yeah, the library is mostly done and everything that is supposed to work should work, see for yourself. Feel free to use it in your apps! It has some nice API I should probably document, anyway, have fun with it. What's next, controls and stuff?
Added a taskbar and the usual 3 minimize/maximize/close buttons, and the window object (that you should use as the parameter of the window update/draw functions) exports its own input functions that will only work on the current focused window. That and a few other nice functions. Oh, and the Enter menu, it makes for a nice start menu.
Yeah, I should really document everything.
This is seriously good!
A quirk: when reducing size of window by resizing, I think it should be limited to the location of the opposite side of the window. Maybe even limited to width of widgets away from left side of window?
Right now, you can resize it past the opposite edge and a slither of window moves across the screen.
It's very good this way...
Like above, a cursor change would make resizing windows easier. Also I think it could also start dragging when you select the inner pixel delimitated by the window border (so it would be 2 pixels wide/high and would be easier to select).
I've made a variation, with icons more like win95 (I've moved a bit the buttons, they are 9 px wide instead of 8 pixels):
a few suggestions:
-crop the windows titles (or have opaque buttons drawn over)
-avoid 3d buttons, the windows look slick, the taskbar not so much
-the taskbar seems buggy,clicking buttons should only focus the corresponding window. also have the taskbar buttons reflect the focus
-the colored window buttons don't talk for themselves, I've tried a white dot/square/cross combo, looks better.
-make a start menu (pico logo?), the console menu is not mouse driven, breaks immersion
-the pointer hotspot should be on the topmost white pixel (imho)
-use the gamepad too!
- +1 on what everybody said!
oh, and buttons,radios,sliders, color-pickers...
and drop-down menus, tabs... ;)
Thanks for the suggestions, +1 to what everybody said and changed. There's some stuff that are deliberate and/or known issues, I'll work on that :)
@matt, that's kind of deliberate... yeah, could change it so it stops instead of moving the window.
@Ivoah, thought of that too, but right now I'd have to add some more spaghetti to my code to do that.
@farvardin, I do like the new buttons, it addresses a few of @ultrabrite's concerns. The console menu is kind of a stand-in to the start menu, actually. The gamepad is indeed used, look at "Program 1", start a few of them, the gamepad buttons are sent to the focused window... unless the mouse can be driven with the gamepad too, except the windows would only receive mouse events.
Anyway, there's quite a few stuff to improve here, and I'm taking all of this in consideration.
:: Some UI Tweaks
I really like PicoWm so far, @JuJu.
I want to help out, so I took a jab editing the UI to be better (or at least more to my personal preferences :P):
The UI changes are skin deep, and not (yet) functional.
I kinda aimed for a windows 3.1/10 look, along with a pico-8 start menu thing.
I also changed which pixel on the mouse "clicks", if you can tell.
Hopefully, as I learn to understand the code better I'll be able to help tweak the infrastructure too. :)
Log in to post a comment