How Can I Drag a Button with mouse?
BlitzMax Forums/MaxGUI Module/How Can I Drag a Button with mouse?
| ||
can any one submit some code for that |
| ||
Have you played with LogicZone? http://jsp.logiczone.de/ The reason I ask is because you should take a cue from the way this editor works. You don't edit or draw actual buttons, just graphical representations of them. If resizing buttons was simple I'm sure JSP would have done it. |
| ||
Just try something "simplier" first. like "sending a notification (notify) as a user presses a button" as gui movement is somewhat different. But what should do it: on button creation, store the handle in a variable save "mouse down on button"-state to a variable as long as mousemove-events are generated you will have to move the button (there are some functions concerning position and size of an element). But remember: current days are using guis which fit to the clientsize a user sets up not your application, so to say: relative positioning/sizing rather than absolute one. bye Ron |
| ||
not in a code-writing mood right now, but it should be something like.. [bbcode] if mousedown(left) then button_x|button_y = mousex()|mousey() [/bbcode] sorry for not being too detailed, but I am just lazy atm ;P |