Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
Tags

Window Commands for GameMaker

Check/disable/dispatch window commands in GameMaker · By YellowAfterlife

Other API hook Window-related functions I'd like

A topic by Amaroq-Softfur created Feb 23, 2021 Views: 269 Replies: 2
Viewing posts 1 to 3

1. A way to automatically prevent the window from opening off-screen.

2. A way for the window to automatically snap to the edges of other windows.

3. A way for the window's title to appear in the center of the title bar, instead of on the left of it.

4. A way to hide the standard window controls and window border, and instead use custom ones.

Developer(+1)
  1. You can do that yourself using window_ and display_ functions; I wrote an extension that can return workspace areas (read: excluding taskbar areas) for each screen (also included in Dekstop Screenshots).

  2. Based on fact that most third-party software for competently snapping windows to edges of other windows costs $30 and more, I’m willing to assume that this is not as easy as it sounds.

  3. It is possible to override WM_NCPAINT to do various strange things with window border, but in doing so you open yourself up to a lot of potential compatibility issues across different versions of Windows, themes, and custom desktop managers (like Stardock’s WindowBlinds). Doing so just for a centered title is uncommon.

  4. You can disable the window border in Game Options - Windows - Graphics, and then draw your own as you please; This extension offers simple 1-bit transparency if you need rounded borders. GMS1 includes with a small demo project on implementing custom frame movement/resizing on Demos tab.

Developer

Looking back through the threads, I did make an extension for custom border+controls later on.