window_embed_into for GameMaker
A downloadable extension
This extension allows you to embed your game window into unrelated window, such as GMS2 IDE very specifically (if there are any other Practical Uses, I'm not aware of them).
- window_embed_into_ide() ➜ succeeded?
Inserts your game window into the associated GMS2 IDE window (based on reported project name), returns whether successful.
- window_embed_into(window_class, window_title) ➜ succeeded?
Inserts your game window into arbitrary window matching the filter, returns whether successful.
See MSDN page for FindWindowW for class/title remarks.
Set either to undefined for NULL use (don't use for filter).
Set both to undefined to un-embed the window.
- window_embed_has_parent() ➜ bool
Returns whether the game window had been embedded
- window_embed_get_parent_width() ➜ pixel width
Returns width of parent window, desktop width if none
- window_embed_get_parent_height() ➜ pixel height
Returns height of parent window, desktop height if none
- Does this work in GMS1?
Depends on your definition of "works in GMS1"
For real though, you'll want to check how window_embed_into_ide works and match your IDE title (since the game doesn't know IDE license/version to figure that out automatically).
If you didn't want this for embedding into GameMaker, then yes, all is well.
- Does this work with GMEdit?
Apparently not? Maybe with hardware acceleration disabled? Blame Chromium
- Can you embed some other window into the game window?
That requires more functions and effort. This extension is not about effort.
- Is there source code available?
- Why can you insert windows into other windows just like that?
You see... on Windows, everything is a window - even the (native) buttons and labels. And desktop manager doesn't really mind - if something is assigned as a child to a parent, it gets drawn inside the parent and catches some events.
Click download now to get access to the following files:
- GM2022+ support58 days ago
Leave a comment
Log in with itch.io to leave a comment.