Página 1 de 1

This example serves to toggle buttons using keystrokes

Publicado: 13 Feb 2016 23:42
por josslouiss
يخدم هذا المثال ل تبديل أزرار باستخدام ضربات المفاتيح
This example serves to toggle buttons using keystrokes
Este ejemplo sirve para activar o desactivar botones utilizando combinaciones de teclas
HIDE: ON
Hidebb Message Hidden Description
!TmE4hA7_6hGUNc4EqF815zbQMNYawSBp7nqf4pmJwPs

Re: This example serves to toggle buttons using keystrokes

Publicado: 14 Feb 2016 16:03
por patch
What do you mean toggle button using keystrokes is no longer a button if its listening to a keystroke it become more of a command action, two different means really unless you mean its a exable to show a keystroke enabling and disabling a toggle button.


Also what is with this key bull shit, if you made these example or passing example on what are on the ineternet stop locking them with keys.

Re: This example serves to toggle buttons using keystrokes

Publicado: 14 Feb 2016 16:22
por patch
On Show add
TestForEnable = 0;
TestForDisable = 0;


And change your functions like so.

if e_Modifiers.ctrl and e_Key == 70 then --Press ctrl + "F"  
TestForEnable = TestForEnable + 1;
elseif e_Key == 85 then --letter "U"
TestForEnable = TestForEnable + 1;
elseif e_Key == 67 then --letter "C"
TestForEnable = TestForEnable + 1;
elseif e_Key == 75 then --letter "K"
TestForEnable = TestForEnable+ 1;
if(TestForEnable == 4)then
xButton.SetEnabled("xButton1", true);
-- Reset TestForEnable
TestForEnable = 0;
end
end


This means the user can't just press K and D to enable and disable the buttons like you had it before.
and to make it a little more complex you could also create a timer what resets TestForEnable and disabled
the timer after the modifer as been enabled.

Re: This example serves to toggle buttons using keystrokes

Publicado: 26 Feb 2016 00:45
por dripro
Graças

Re: This example serves to toggle buttons using keystrokes

Publicado: 25 Ago 2017 21:36
por hdd.utilities
fffffffffffffffffffff

Re: This example serves to toggle buttons using keystrokes

Publicado: 10 Sep 2017 21:45
por jhonitimer
thanxxxxxx

Re: This example serves to toggle buttons using keystrokes

Publicado: 26 Ene 2018 01:50
por good
thanksssss

Re: This example serves to toggle buttons using keystrokes

Publicado: 16 Feb 2019 00:57
por nivaldorhk
AMIGO BOM DE