Advertisement
renix1

G300S frenesi colors on g_pressed

Mar 23rd, 2020
199
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.87 KB | None | 0 0
  1. function FrenesiColors()
  2.     for i=0, 20, 10 do
  3.         SetBacklightColor(3, 227, 252, "mouse");
  4.         Sleep(100);
  5.         SetBacklightColor(252, 169, 3, "mouse");
  6.         Sleep(100);
  7.         SetBacklightColor(255, 255, 255, "mouse");
  8.         Sleep(100);
  9.         SetBacklightColor(255, 0, 0, "mouse");
  10.     end
  11. end
  12.  
  13. function PressedColors(event, arg, family)
  14.    
  15.     -- PRESSED EVENTS
  16.     if event == "MOUSE_BUTTON_PRESSED" and arg == 6  then
  17.         SetBacklightColor(252, 169, 3, family);
  18.     end
  19.  
  20.     if event == "MOUSE_BUTTON_PRESSED" and arg == 7  then
  21.         SetBacklightColor(255, 255, 255, family);
  22.     end
  23.  
  24.     if event == "MOUSE_BUTTON_PRESSED" and arg == 9 then
  25.         SetBacklightColor(255, 0, 0, family);
  26.     end
  27.     -- PRESSED EVENTS
  28. end
  29.  
  30. function OnEvent(event, arg, family)
  31.     now = GetDate("%d/%m/%Y as %H:%M");
  32.     OutputLogMessage("Evento recebido [%s \\ %s]\n", event, now);
  33.     OutputLogMessage("Botao G%d\n", arg);
  34.     FrenesiColors();
  35. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement