Advertisement
Guest User

Untitled

a guest
Jun 17th, 2015
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 1.89 KB | None | 0 0
  1. void AddNumber(char* text, float value, __int8 decimal_places, bool &A_PRESS = null, bool &RIGHT_PRESS = null, bool &LEFT_PRESS = null)
  2.     {
  3.         null = 0;
  4.         AddOption(text, null);
  5.  
  6.         if (OptionY < 0.6325 && OptionY > 0.1425)
  7.         {
  8.             SET_TEXT_FONT(0);
  9.             SET_TEXT_SCALE(0.0f, 0.35f);
  10.             SET_TEXT_CENTRE(1);
  11.             SET_TEXT_COLOUR(255, 51, 51, 255);
  12.             drawfloat(value, (DWORD)decimal_places, 0.233f + menuPos, OptionY);
  13.         }
  14.  
  15.         if (menu::printingop == menu::currentop)
  16.         {
  17.             if (null) A_PRESS = true;
  18.             else if (IsOptionRJPressed()) RIGHT_PRESS = true;
  19.             else if (IsOptionRPressed()) RIGHT_PRESS = true;
  20.             else if (IsOptionLJPressed()) LEFT_PRESS = true;
  21.             else if (IsOptionLPressed()) LEFT_PRESS = true;
  22.         }
  23.  
  24.     }
  25.  
  26. ##############################################################################################################################
  27.  
  28.  
  29. int timeLastRan = 0;
  30.  
  31.     bool IsOptionRPressed()
  32.     {
  33.         int time = GetTickCount();
  34.         if (CheckRPressed())
  35.         {
  36.             if (timeLastRan + 500 >= time)
  37.             {
  38.                 PlaySoundFrontend_default("NAV_LEFT_RIGHT");
  39.                 return true;
  40.                 timeLastRan = time;
  41.             }
  42.         }
  43.         else return false;
  44.     }
  45.     bool IsOptionRJPressed()
  46.     {
  47.         int time = GetTickCount();
  48.         if (CheckRJPressed())
  49.         {
  50.             if (timeLastRan + 500 >= time)
  51.             {
  52.                 PlaySoundFrontend_default("NAV_LEFT_RIGHT");
  53.                 return true;
  54.                 timeLastRan = time;
  55.             }
  56.         }
  57.         else return false;
  58.     }
  59.     bool IsOptionLPressed()
  60.     {
  61.         int time = GetTickCount();
  62.         if (CheckLPressed())
  63.         {
  64.             if (timeLastRan + 500 >= time)
  65.             {
  66.                 PlaySoundFrontend_default("NAV_LEFT_RIGHT");
  67.                 return true;
  68.                 timeLastRan = time;
  69.             }
  70.         }
  71.         else return false;
  72.     }
  73.     bool IsOptionLJPressed()
  74.     {
  75.         int time = GetTickCount();
  76.         if (CheckLJPressed())
  77.         {
  78.             if (timeLastRan + 500 >= time)
  79.             {
  80.                 PlaySoundFrontend_default("NAV_LEFT_RIGHT");
  81.                 return true;
  82.                 timeLastRan = time;
  83.             }
  84.         }
  85.         else return false;
  86.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement