In our MiniIDE project, I'm experimenting with getting the editor (its own window) inside the Love2D window to move in relationship to the Love2D window resizing. However, it seems to do that properly, I need to determine which side of the Love2D window is shrinking (e.g. if the editor window is anchored on the right-side of the Love2D window and the user moves the left side of the Love2D window inwards then the editor window can stay put. If, instead, the user moves the right side of the Love2D window inwards, I need to know that in order to translate the editor window to the left).
Is there a way, therefore, in Love2D to determine which side of the Love2D window is being resized?
I appreciate any input the community might have.
Thanks!
Is there a way in Love2D to determine which side of a window is being resized?
Forum rules
Before you make a thread asking for help, read this.
Before you make a thread asking for help, read this.
-
- Citizen
- Posts: 55
- Joined: Sat Dec 03, 2022 7:52 pm
Re: Is there a way in Love2D to determine which side of a window is being resized?
I haven't checked but I would imagine the window position would also change when it's resized from the left. Maybe you can use that to help your logic?
Re: Is there a way in Love2D to determine which side of a window is being resized?
I imagine this would work, but you might have some trouble using this alone if you're just moving the window without resizing it - you might want to also check if the window size has changed if the position of the window has changed.
Dragon
Re: Is there a way in Love2D to determine which side of a window is being resized?
Yeah, if it wasn't clear, I was suggesting to use the position when handling the resize event. It wouldn't work without both pieces of information.
-
- Citizen
- Posts: 55
- Joined: Sat Dec 03, 2022 7:52 pm
Re: Is there a way in Love2D to determine which side of a window is being resized?
Ingenious solution, thank you, all!
Who is online
Users browsing this forum: Google [Bot] and 4 guests