Resizable Window?
LabyStudio 14 Oct 2013
Resizable Window?
✔ Movable window?
✔ "mouse_click" in a movable window?
I've tried but I can't do this :/
[Pastebin]
I need this for my program.. please help!
✔ Movable window?
✔ "mouse_click" in a movable window?
I've tried but I can't do this :/
[Pastebin]
I need this for my program.. please help!
M4sh3dP0t4t03 14 Oct 2013
Is this some sort of an OS/Graphical shell? Or is it a tutorial for an OS? Because if it is you would have to say which one it is and you should also post the source code so we could help you.
MKlegoman357 14 Oct 2013
You would have to check where the user clicks: if he/she clicked on the title bar and after that dragged his/her mouse then move the window up/down and left/right as many pixels as they moved their mouse. Same with resize. If you have multiple windows then I would recommend to have them as "objects". Tutorial for OOP in Lua can be found here.
LabyStudio 14 Oct 2013
KingOfNoobs, on 14 October 2013 - 01:08 PM, said:
Is this some sort of an OS/Graphical shell? Or is it a tutorial for an OS? Because if it is you would have to say which one it is and you should also post the source code so we could help you.
Lyqyd 15 Oct 2013
You should be looking at the mouse click coordinates relative to the actual window position rather than simply checking if they are in one absolute position of the screen.
LabyStudio 15 Oct 2013
Lyqyd, on 15 October 2013 - 12:48 PM, said:
You should be looking at the mouse click coordinates relative to the actual window position rather than simply checking if they are in one absolute position of the screen.
www.pastebin.com/jJTRsGFB
CoderPuppy 15 Oct 2013
On line 28 you have:
if XY2 == "X+8,Y" and button == 1 then -- #### X positionIt's checking if XY2 is equal to "X+8,Y", the variables aren't getting replaced. Replace "X+8,Y" with (X + 8) .. "," .. Y.
LabyStudio 16 Oct 2013
CoderPuppy, on 15 October 2013 - 02:33 PM, said:
On line 28 you have:
if XY2 == "X+8,Y" and button == 1 then -- #### X positionIt's checking if XY2 is equal to "X+8,Y", the variables aren't getting replaced. Replace "X+8,Y" with (X + 8) .. "," .. Y.
Thank you
[Pastebin]