Log In  

Hello everyone, time to show you another project I just made last night : a stack-based Window Manager (WM), cleverfully named StackWM.

A WM is a program or library to manage windows, dispatch events/interactivity to them and draw them. THink of your Windows/Linux/Mac's windows. So yeah, that's totally overkill and eating most of your cart space but it was fun to do and it put me on the tracks for another unrelated project.

Sooo... What does the WM do?

  • Update/render events
  • Window render context :clipping and camera offsetting to limit the renderer to the window's area:
  • Focus or Global events : both aren't exclusive, you can manage both of them on one window.
  • Button/Buttonp events : global or focused (available only if the window is focused)
  • There is always one focused window. THere are helper functions to switch focus to another window.

What do I plan or think of adding to StackWM?

  • Easier customisation? (colors? booleans to set functionnalities like notitle, grabbable, resizable?)
  • Mouse support (emulated with pressing arrow keys and a button for click) and interaction support? (Click+grab on title -> grab window? CLick on close button : Close event?)

And here's a demo to show what I can do with StackWM. That's maybe a simple game but with time, better examples could be done. Have Fun!

Cart #12218 | 2015-08-03 | Code ▽ | Embed ▽ | No License
7

P#12283 2015-08-04 16:05 ( Edited 2015-08-10 12:25)

Emulated Mouse support is what you need for this. Very cute.

P#12303 2015-08-05 10:42 ( Edited 2015-08-05 14:42)

Dang, nice work.

P#12305 2015-08-05 10:52 ( Edited 2015-08-05 14:52)

Thanks guys. I have a question, how would like to see the mouse moving? I have two options :

  • Constant speed whatever the movement
  • If moving in a direction, keep accelerating until the user stops or changes the direction (then, get back at the minimal speed).
P#12549 2015-08-10 07:13 ( Edited 2015-08-10 11:13)

Maybe something in between? Like, constant reasonable speed once you're up to speed by maintaining input for half a second, but in that first half a second to a steady acceleration from zero toward that speed so there's a little window of finer touch controls as well?

P#12552 2015-08-10 08:25 ( Edited 2015-08-10 12:25)

[Please log in to post a comment]

Follow Lexaloffle:          
Generated 2024-03-29 13:04:14 | 0.011s | Q:16