sauerCHAOS

MouseBinds Manager

Jul 31st, 2012
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 2.90 KB | None | 0 0
  1. // ----------------------------------------------------
  2. // MouseBinds Manager, v1.0
  3. // (C) Chaos, ZLIB license
  4. // http://www.opensource.org/licenses/zlib-license.php
  5. // ----------------------------------------------------
  6.  
  7. _mbinds_type = ""
  8. _mbinds_var = 1
  9.  
  10. newgui _mbinds_gui [
  11.     guistayopen [
  12.         guititle "Mouse-Binds Manager"
  13.         guibar
  14.         guialign 0 [
  15.             guitext "^f2Type:" 0
  16.             guistrut 2
  17.             guibutton (concatword (? (=s $_mbinds_type "") "^f0") "normal") [
  18.                 _mbinds_type = ""
  19.                 _mbinds_var = 1
  20.             ] 0
  21.             guibar
  22.             guibutton (concatword (? (=s $_mbinds_type "edit") "^f0") "edit") [
  23.                 _mbinds_type = "edit"
  24.                 _mbinds_var = 1
  25.             ] 0
  26.             guibar
  27.             guibutton (concatword (? (=s $_mbinds_type "spec") "^f0") "spectator") [
  28.                 _mbinds_type = "spec"
  29.                 _mbinds_var = 1
  30.             ] 0
  31.         ]
  32.         guibar
  33.         guilist [
  34.             guialign 0 [
  35.                 loop i 8 [  
  36.                     guitext (concatword "^f2MOUSE" (+ $i 1)) 0
  37.                 ]
  38.             ]
  39.             guibar
  40.             guialign 0 [
  41.                 loop i 8 [
  42.                     if $_mbinds_var [
  43.                         guitext (concatword "^f7" (do (concatword "get" $_mbinds_type "bind MOUSE" (+ $i 1)))) 0
  44.                     ] [
  45.                         guilist [
  46.                             guifield _mbinds_m@i -35
  47.                             guistrut 1
  48.                             guibutton "" [ _mbinds_m@i = "" ] "exit"
  49.                         ]
  50.                     ]
  51.                 ]
  52.             ]
  53.         ]
  54.         guibar
  55.         guialign 1 [
  56.             if $_mbinds_var [
  57.                 guibutton "Edit" [
  58.                     loop i 8 [
  59.                         [_mbinds_m@i] = (do (concatword "get" $_mbinds_type "bind MOUSE" (+ $i 1)))
  60.                     ]
  61.                     _mbinds_var = 0
  62.                 ] 0
  63.             ] [
  64.                 guibutton "Apply" [
  65.                     loop i 8 [
  66.                         do [
  67.                             (concatword $_mbinds_type "bind") (concatword "MOUSE" (+ $i 1)) $_mbinds_m@i
  68.                         ]
  69.                     ]
  70.                     _mbinds_var = 1
  71.                 ] 0
  72.                 guibar
  73.                 guibutton "Reset" [
  74.                     loop i 8 [
  75.                         [_mbinds_m@i] = (do (concatword "get" $_mbinds_type "bind MOUSE" (+ $i 1)))
  76.                     ]
  77.                 ] 0
  78.                 guibar
  79.                 guibutton "Cancel" [ _mbinds_var = 1 ] 0
  80.             ]
  81.         ]
  82.     ]
  83.     guitab "Reference"
  84.     guititle "Reference"
  85.     guibar
  86.     guialign 0 [
  87.         guibar
  88.         guilist [
  89.             loop i 5 [
  90.                 guitext (concatword "^f2MOUSE" (+ $i 1)) 0
  91.                 if (!= $i 4) [ guibar ]
  92.             ]
  93.         ]
  94.         guibar
  95.         guilist [
  96.             guitext "^f7Left Click" 0
  97.             guibar
  98.             guitext "^f7Right Click" 0
  99.             guibar
  100.             guitext "^f7Middle Mouse" 0
  101.             guibar
  102.             guitext "^f7Scroll Up" 0
  103.             guibar
  104.             guitext "^f7Scroll Down" 0
  105.         ]
  106.         guibar
  107.         guibar
  108.         guilist [
  109.             guitext "^f2MOUSE6" 0
  110.             guibar
  111.             guitext "^f2MOUSE7" 0
  112.             guibar
  113.             guitext "^f2MOUSE8" 0
  114.         ]
  115.         guibar
  116.         guilist [
  117.             guitext "^f7Extra" 0
  118.             guibar
  119.             guitext "^f7Extra" 0
  120.             guibar
  121.             guitext "^f7Extra" 0
  122.         ]
  123.         guibar
  124.     ]
  125.     guibar
  126.     guitab "About"
  127.     guititle "About"
  128.     guibar
  129.     guitextbox "MouseBinds Manager, v1.0^n(C) Chaos, ZLIB license^[email protected]^nhttp://www.opensource.org/licenses/zlib-license.php" 50
  130.     guibar
  131.     guitextbox "^f7Visit ^f1http://Chaos95.net^f7 to see all of your favorite scripts in one place." 50
  132. ] "MouseBinds"
  133.  
  134. mousebinds = [ showgui _mbinds_gui ]
Advertisement
Add Comment
Please, Sign In to add comment