Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void AddNumber(char* text, float value, __int8 decimal_places, bool &A_PRESS = null, bool &RIGHT_PRESS = null, bool &LEFT_PRESS = null)
- {
- null = 0;
- AddOption(text, null);
- if (OptionY < 0.6325 && OptionY > 0.1425)
- {
- SET_TEXT_FONT(0);
- SET_TEXT_SCALE(0.0f, 0.35f);
- SET_TEXT_CENTRE(1);
- SET_TEXT_COLOUR(255, 51, 51, 255);
- drawfloat(value, (DWORD)decimal_places, 0.233f + menuPos, OptionY);
- }
- if (menu::printingop == menu::currentop)
- {
- if (null) A_PRESS = true;
- else if (IsOptionRJPressed()) RIGHT_PRESS = true;
- else if (IsOptionRPressed()) RIGHT_PRESS = true;
- else if (IsOptionLJPressed()) LEFT_PRESS = true;
- else if (IsOptionLPressed()) LEFT_PRESS = true;
- }
- }
- ##############################################################################################################################
- int timeLastRan = 0;
- bool IsOptionRPressed()
- {
- int time = GetTickCount();
- if (CheckRPressed())
- {
- if (timeLastRan + 500 >= time)
- {
- PlaySoundFrontend_default("NAV_LEFT_RIGHT");
- return true;
- timeLastRan = time;
- }
- }
- else return false;
- }
- bool IsOptionRJPressed()
- {
- int time = GetTickCount();
- if (CheckRJPressed())
- {
- if (timeLastRan + 500 >= time)
- {
- PlaySoundFrontend_default("NAV_LEFT_RIGHT");
- return true;
- timeLastRan = time;
- }
- }
- else return false;
- }
- bool IsOptionLPressed()
- {
- int time = GetTickCount();
- if (CheckLPressed())
- {
- if (timeLastRan + 500 >= time)
- {
- PlaySoundFrontend_default("NAV_LEFT_RIGHT");
- return true;
- timeLastRan = time;
- }
- }
- else return false;
- }
- bool IsOptionLJPressed()
- {
- int time = GetTickCount();
- if (CheckLJPressed())
- {
- if (timeLastRan + 500 >= time)
- {
- PlaySoundFrontend_default("NAV_LEFT_RIGHT");
- return true;
- timeLastRan = time;
- }
- }
- else return false;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement