Advertisement
Guest User

Untitled

a guest
Dec 28th, 2015
185
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.80 KB | None | 0 0
  1. class VisualConfiguration
  2. {
  3.     constructor()
  4.     {
  5.         title_DrawVisual = createDraw("Welcome to visual configuration menu", "FONT_OLD_10_WHITE_HI.TGA", 50, 400, 255, 255, 255);
  6.         vism_isShown = false;
  7.     }
  8.    
  9.     function show()
  10.     {
  11.         if (!vism_isShown)
  12.         {
  13.             setDrawVisible(title_DrawVisual, true);
  14.             globalChat.hide();
  15.             vism_isShown = true;
  16.         }
  17.     }
  18.    
  19.     function hide()
  20.     {
  21.         if (vism_isShown)
  22.         {
  23.             setDrawVisible(title_DrawVisual, false);
  24.             globalChat.show();
  25.             vism_isShown = false;
  26.         }
  27.     }
  28. };
  29.  
  30. visConf = VisualConfiguration();
  31.  
  32. addEvent("onKey", function(key, letter)
  33. {
  34.     if (key == KEY_V)
  35.     {
  36.         if (visConf.vism_isShown)
  37.         {
  38.             visConf.hide();
  39.             addMessage(255, 255, 0, "VISMENU HIDDEN"); 
  40.         }
  41.         else
  42.         {
  43.             visConf.show();
  44.             addMessage(255, 255, 0, "VISMENU SHOWN");  
  45.         }  
  46.     }
  47. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement