Hi everyone,
i'm using a double click code which is working just fine, the only time it doesn't work is when i double click a gui button.
If i double click the gui it works but not the button on the gui.
I tried with different gui and buttons but always the same result.
Here is the code for the button on the gui which doesn't work:
Code: ags
And here is the code for the gui where the button is on, which works:
Code: ags
I looked everywhere but i don't seem to find a solution.
Is there any other way to double click a button?
Any help is appreciated:)
i'm using a double click code which is working just fine, the only time it doesn't work is when i double click a gui button.
If i double click the gui it works but not the button on the gui.
I tried with different gui and buttons but always the same result.
Here is the code for the button on the gui which doesn't work:
function btnPocketPC_OnDoubleClick(GUIControl *control, MouseButton button)
{
gPocketPC.Visible = true;
}
function btnPocketPC_OnClick(GUIControl *control, MouseButton button)
{
// Double click
if (mouseTimer>0 && mouseTimer<14 && mouse.IsButtonDown(eMouseLeft))
{
btnPocketPC_OnDoubleClick(control, button);
return;
}
mouseTimer=0;
And here is the code for the gui where the button is on, which works:
function gIcon_OnDoubleClick(GUI *theGui, MouseButton button)
{
gPocketPC.Visible = true;
}
function gIcon_OnClick(GUI *theGui, MouseButton button)
{
// Double click
if (mouseTimer>0 && mouseTimer<14 && mouse.IsButtonDown(eMouseLeft))
{
gIcon_OnDoubleClick(theGui, button);
return;
}
mouseTimer=0;
}
I looked everywhere but i don't seem to find a solution.
Is there any other way to double click a button?
Any help is appreciated:)