-
Notifications
You must be signed in to change notification settings - Fork 238
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Window Controls #708
Window Controls #708
Conversation
COLLAB EXTENSION REALLL |
We should really be specifying this does not work in browser and only in electron applications. I can already imagine the issue statements. |
@LilyMakesThings I will be making a documentation page specifying this. Also, after vigorous testing, some blocks do still work in browsers/html. Just the ones that don't affect the page state. |
put that ones that work in Electron only under a BlockType.LABEL, perhaps |
@GarboMuffin I could, but basically all of them work in electron only. So it could mess up the entire order. So I'll just define in documentation that most work in electron only. |
You need to make a label saying the blocks only work in electron. The kind of people who would be making issues about it not working in browser are the kind of people who don't read the documentation. |
@LilyMakesThings Ahhhh like that one other extension I forgot the name of that had a label stating something important. Alright I will do that tomorrow with some more block additions and documentation and anything else. Then everything should be ready. |
Could this then help with #360? |
@UndermanReal Yes actually. I haven't added it yet because I'm outside. But I will be adding a block called "match stage size" that will change the window aspect ratio to match the canvas. |
…tage size block code better so that it matches stage size in any environment.
@GarboMuffin @LilyMakesThings Wanted to update you guys on something. After further testing, Window Controls works perfectly in Electron AND Pop Up HTML. Only certain ones work in browser/browser HTML. |
@GarboMuffin, Window Controls is ready for review/ready to be merged. |
@echoless3484, let me explain some things. The set Fullscreen to true/false block doesn't make sense on how the Fullscreen API works. Fullscreen API is a tricky thing to explain, as the API uses different sets to make it function. Fullscreen API functions using the sub window API called "window.document" which has its own set of APIs. To enter Fullscreen, it uses ANOTHER SUB API within "window.document", which is "window.document.documentElement", and to enter Fullscreen, we use "document.documentElement.requestFullscreen()". This is because ".documentElement.requestFullscreen" can be added to any element within the window, not just the window. Meaning any element in a window can be Fullscreen by itself. Now for exiting, that doesn't even use "document.documentElement", but uses just "window.document" for some odd reason. So to exit we run "document.exitFullscreen()". So we don't just set Fullscreen to true or false. So enter/exit cannot be deprecated, nor can "set Fullscreen to true/false" be added. BUT... Based on the reporter named simply "Fullscreen" that most likely returns if the window is in Fullscreen or not IS POSSIBLE. There is an official API that returns true or false in correlation to the window being Fullscreen or not. And I actually did have plans to add a boolean named, "is window fullscreen?", but I had forgotten to add it. But I will be adding this in the next version of Window Controls. You can find more details about the Fullscreen API in depth here: https://developer.mozilla.org/en-US/docs/Web/API/Fullscreen_API |
Oh wow, amazing. Is there a link or github page for the newest extension file? |
Go to the top and click on "Window Controls" in the "Window Controls > Master" boxes |
Now what's left is to be able to fullscreen, get the width and height of the display/screen, and to minimize, maximize, and change the ability of a window to be resizeable. Also imagine what we could do if we could open apps using scratch, like export 2 exe projects, and run the exe/open the project using scratch code. |
this extension already has fullscreen supports |
@creepersaur This extension can already enter and exit fullscreen. It can also already get the width and height of the screen, hence the screen x/y reporters. I'm not exactly sure what you mean by setting the ability of a window to be resizeable. And finally, I already have plans to add blocks that can minimize and maximize the window, but they won't be added among a ton others once I fully have a list of which BrowserWindow apis I want GarboMuffin to add. |
Ohh. I wasn't using the latest extension file. Now I see the screen w,h and the fullscreen, etc. This is very cool. The window resizeability means that currently, the user can drag on the corners of the application to change the size (w,h) of the window. Which you may not want in all cases. So the ability to stop the user from doing that could help. And also I don't know if this is possible, but removing the window border (including the edges of the application window and the top bar) so you could just have a plain window application, and then add your own border and things if you want. |
@creepersaur Ahhh I see. I will try to add a block that counters window size change, but you can currently use a method where if the program detects the window size changes, then you can set the size back to the dimensions you want. And about window border, I'm not sure if it's possible, I thought of it, but from what I'm seeing, it may be only for .appx apps. |
Maybe this could help? |
Why did you move TurboHook so far up? Edit: Nevermind broski made a typo |
Still a couple more things to do, but I gotta wait till I get home. |
The wonders of Meta Games begins here. |
…made "close window" terminal.
Welp, Window Controls V.1.0.0 is officially, truly, done. Even though it already was, the new TW updates allowed me to make it better. Now Window Controls is ready for merging. |
In some regards I question how necessary some of these blocks are but okay, that''s fine, don't need to change Last thing is making sure that people are aware that like half of these blocks won't work in the online editor, only desktop app and packaged projects as Electron |
I thought of that, in the documentation at the top, I state the places it mainly works in. |
I'm going to change something later in this updated code, I'll explain why later. |
I am saying you need a more obvious reminder of that than one line in documentation pages that few read |
Then I think I have an idea, I'll have to test it though. |
Ok finished making the changes. Prettier is my new enemy, at least eslint let you keep your own style. |
Wait, let me add an example Project |
Nevermind, I'll do example project later, so it's ready for now. |
Resolves #360
Resolves #454
Resolves #590
Hello all! This is a PR that is in collaboration between me and BlueDome. Me and him have merged ours extensions together and made a even better one! This extension gives you control over everything we could think of. More blocks will be coming soon!
This is the current roster: