Hallo.
I have a simple problem (among many others much bigger...).
I have a code that check if a button is pressed.
I do this in this manner:
first i check if the left mouse button is pressed and second if the image under the mouse pointer is overlapping the image of the button.
The strange thing is that if i use mousebutton(1) the code don't work at all...so i change with mousebutton(2)....
The second strange thing is if i use mousehit(2) nothing happen!
I have to use mousedown(2)....but if i use this i don't have the same effect i search (every time i check i want to create a object...and if i use mousedown many object are created!).
I have many many lines of codeabove this small ones...and i have similar problems with various mousebutton!
If i use the key nothing go wrong...but i want to use the mouse to make every action,so the user don't waste time to learn all the buttons.
What could possibly be the problem?
Another question...this is a complex one without see the code itself...but i try to explayn the effect.
My code is an application to create "path points" to use in game dev...to make object move and so on.
I have a simple interface made by myself(wich i interact in the manner i described above) that have the possibility to:make new path,load saved path,try path,save path,cancel path,exit program.
If i create a new path.....all go ok until i click the "cancel button".....i use array to store the position of the button (made with the esc key because the mouse button don't work[see above...])so every click of the key i store information of the coordinates of the cursor....but if i click cancel....i want to reset the array and to continue to follow the position of the mouse until i click again.
But if i click cancel...and repeat the creation process....the FIRST nodes coordinates is the coordinates that the mouse have when i click cancel!
I don't know how to restore all at the beginning!
I use array to store data and types to set path nodes...so is array within types.
Cancel button goes trough all types and cancel all created object....and set the array of nodes to 0.
I also don't know how to change to "path that i create on the fly" and "path that i have previously loaded"....
So if i load a path and i create a new one...the object still continue to follow the loaded one and viceversa if i create and after i load a new one....
I have tried to make "trigger" variable to set the button pressed but nothing....always the same problems!
I think the bigger problem is the one of the mouse button (i have tried to use flushmouse but nothing...).
If there's anyone who whant to see the code.....is a little big and commented in italian....and not too well writed!
Thanks in advance!
(i also have tried to use xlnt gui but don't know how to interact with buttons created..argh)
I have a simple problem (among many others much bigger...).
I have a code that check if a button is pressed.
I do this in this manner:
first i check if the left mouse button is pressed and second if the image under the mouse pointer is overlapping the image of the button.
The strange thing is that if i use mousebutton(1) the code don't work at all...so i change with mousebutton(2)....
The second strange thing is if i use mousehit(2) nothing happen!
I have to use mousedown(2)....but if i use this i don't have the same effect i search (every time i check i want to create a object...and if i use mousedown many object are created!).
I have many many lines of codeabove this small ones...and i have similar problems with various mousebutton!
If i use the key nothing go wrong...but i want to use the mouse to make every action,so the user don't waste time to learn all the buttons.
What could possibly be the problem?
Another question...this is a complex one without see the code itself...but i try to explayn the effect.
My code is an application to create "path points" to use in game dev...to make object move and so on.
I have a simple interface made by myself(wich i interact in the manner i described above) that have the possibility to:make new path,load saved path,try path,save path,cancel path,exit program.
If i create a new path.....all go ok until i click the "cancel button".....i use array to store the position of the button (made with the esc key because the mouse button don't work[see above...])so every click of the key i store information of the coordinates of the cursor....but if i click cancel....i want to reset the array and to continue to follow the position of the mouse until i click again.
But if i click cancel...and repeat the creation process....the FIRST nodes coordinates is the coordinates that the mouse have when i click cancel!
I don't know how to restore all at the beginning!
I use array to store data and types to set path nodes...so is array within types.
Cancel button goes trough all types and cancel all created object....and set the array of nodes to 0.
I also don't know how to change to "path that i create on the fly" and "path that i have previously loaded"....
So if i load a path and i create a new one...the object still continue to follow the loaded one and viceversa if i create and after i load a new one....
I have tried to make "trigger" variable to set the button pressed but nothing....always the same problems!
I think the bigger problem is the one of the mouse button (i have tried to use flushmouse but nothing...).
If there's anyone who whant to see the code.....is a little big and commented in italian....and not too well writed!
Thanks in advance!
(i also have tried to use xlnt gui but don't know how to interact with buttons created..argh)