Windows engine (SciSnap project)

Here's my new project: Windows engine v1.. I used SciSnap image pad.


For better result enable JS

Note: Windows engine v1

  • Press the title bar to move window on the screen
  • Move only if the mouse is on the screen
  • Press X to close the window (hide)
  • Press _ to minimize (position and size are saved)
  • Press _ to maxinize (restore position and size precedently saved)
  • Resize with the bottom-right control
  • You can't resize the window smaller than the title
  • When you create the window, if the width of the window is too small to contain the title, width is enlarged

It's cute. Kind of surprising how much code it takes just to do one bare-bones window!

I'm very impressed by how you use long variable names to make your code self-documenting. That makes it very readable, despite some long scripts.

One problem: When I load it (Chrome, Mac) the window starts jumping around the screen all by itself, and the close and max/min buttons appear and disappear randomly. When I enable JS, it stops doing that and starts working. I read the one procedure in which you use JS, and I didn't see anything that should lead to that behavior.

Figuring out the exact width of a text is why the WRITE primitive moves the sprite to the end of the text. You subtract the starting position from the ending position.

can confirm, windows 11, google chomre

are you running it in the embed or in the editor ?

(no problem here in the editor...)


Running the project on Chrome w/ ChromeOS I have no issues except only being able to resize the height of the window, not the width.

Window jumps around on mine Windows11/Vivaldi (Chrome based browser)

I'm sorry about that guys

@cymplecy can you tell me when it happen (moving, resizing,minimizing, maximizing)

I've made an update, can you redownload it again and retry it

(I just try to install Safari in win7: it doesn't work with the Snap! site!)

Update has fixed it - it only moves once when green flag is pressed :slight_smile:

Just addind a wait .05 sec will fixed it ! hahaha
(your computers are too fast guys)

Maybe @bh, @joecooldoo and... (max 2 users)

...@pajamaclaws21 can make a quick test plz

The window starts the dance when minimized.
Without JS Enabled the "window label..." recursion does not stop.
Because the wIndow width appears to be rounded down, the label length check fails.

Oups, it's a new bug...

I will look at this soon...

I noticed that it only flickers when I resize the window to have a width smaller than the title, and when I minimize it. Everything else works just fine. The same thing happens when javascript is enabled.

If you have time, I corrected it (JS enabled version)

Yup, it's fixed with js enabled, but it's still broken without js.

thank you

i work on this

This should resolve booth issues.
SciSnap-Window v1 script pic (1)

thank you