|
Hello all! I am trying to make a GUI.Window that can be resized by placing the mouse in the bottom, bottom/right or right side. I am trying to mimic basic Window usage much like you see on a Mac or Windows OS. This is my theory and I needed some smarter people to bounce this off of: 1) Create a GUI.Window 2) Check to see if the mouse is over the GUI.Window 3) Check to see if the mouse is over a part of the window (bottom, bottom,right, right) and show the icon to resize the window 4) Change the size of the GUI.Window based on the mouse movement. Is this even possible? Thanks!
(comments are locked)
|
|
This is something like what I've used (though I ended up wrapping it in a class), which goes in your window draw function, near the very end so it can be in the lower right corner:
I didn't have much luck with using Event.mouseDelta (it got out of sync), which is why this simply stores the starting position and does the difference. Usage example:
(comments are locked)
|
|
well I found this article usefull for my doing and I did my own Structure for window resizing did it all player cannot turn around the window, except maybe with both X&Y together on witch I haven't done much thought all you do is: you just have to refer to window/button you want to make it resizable everything works Up/Down/Left/Right AND IF you want only X axis to be dragable you simply only call: AND if you want only Down to be resizable you simply call:
don't ask me but I love ref more than return less code to write and I don't like classes as you have to instantiate 1 and I have ridden writing more code I hate to write that . just to call something that's always same am I haven't played with static as I think I don't have enough experience with it even tho it maybe would be faster but for resizing IDK code is revetivelly simple only thing is IF you press the upper or left you'll end up with shifting right side or down side a bit Upvoted for effort ! Edit : sure, but still worth a vote (and the karma is always nice to get, hey!)
Mar 22 at 01:43 PM
alucardj
uhm thanks I can update with my latest and much better one ;) in the new one the lst side and top side doesn't get jumpy any longer heh I love programming as it's so much fun :) it's much better than playing games as I have totally open mind of possibilities :) yeah I was wandering from where did I get 200 karma :)
Mar 22 at 02:03 PM
sdgd
(comments are locked)
|
|
Yes, that's what I would try. I know you can resize the window just by calling GUI.Window again with different Rect.
(comments are locked)
|
