Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines

How window dragging works?

A topic by Jonathan Hunter created 59 days ago Views: 60 Replies: 2
Viewing posts 1 to 3

I'm looking to create a virtual pet using this extension. I only want the player to be able to drag and move the window when pressing and holding down over a specific area of the window. Is this possible with this extension?

Developer

You can see this being done in the last GIF on the page, but you don’t really need an extension for this part - when a mouse is pressed in the right area, you store the difference between display mouse coordinates and window coordinates, and then every frame until mouse is released you set the window position to (display mouse position - difference).

That's perfect, thanks!