Advertisement
Guest User

Untitled

a guest
Dec 19th, 2018
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 3.49 KB | None | 0 0
  1. void StandardUKButtonController::CheckAutoplayButtons()
  2. {
  3.     SCOPE_MEMBER();
  4.     LOGMESSAGE(MSG_DBG, "CheckAutoplayButtons");
  5.  
  6.     switch (m_GameState.state)
  7.     {
  8.     case GameState::Unitialised:
  9.         if (!m_DefaultAutoplayButtons)
  10.         {
  11.             SetAutoplayButtonsToDefault();
  12.         }
  13.         break;
  14.     case GameState::Initialise:
  15.         if (!m_DefaultAutoplayButtons)
  16.         {
  17.             SetAutoplayButtonsToDefault();
  18.         }
  19.         break;
  20.     case GameState::WaitingToPlay:
  21.         if (m_AutoplayIsActive)
  22.         {
  23.             m_DefaultAutoplayButtons = false;
  24.             EnableAndShow(c_AutoplayToggleButton);
  25.             EnableAndShow(c_AutoplayToggleCancelButton);
  26.             DisableAndHide(c_AutoplayInactiveButton);
  27.             DisableAndHide(c_AutoPlayStopButton);
  28.  
  29.             EnableAndShow(c_HardwareAutoplayCountSD);
  30.             EnableAndShow(c_HardwareAutoplayStopSD);
  31.             DisableAndHide(c_HardwareAutoplaySD);
  32.         }
  33.         else if (!m_DefaultAutoplayButtons)
  34.         {
  35.             SetAutoplayButtonsToDefault();
  36.         }
  37.         break;
  38.     case GameState::PrePlay:
  39.         if (m_AutoplayIsActive)
  40.         {
  41.             m_DefaultAutoplayButtons = false;
  42.             EnableAndShow(c_AutoplayToggleButton);
  43.             EnableAndShow(c_AutoplayToggleCancelButton);
  44.             DisableAndHide(c_AutoplayInactiveButton);
  45.             DisableAndHide(c_AutoPlayStopButton);
  46.  
  47.             EnableAndShow(c_HardwareAutoplayCountSD);
  48.             EnableAndShow(c_HardwareAutoplayStopSD);
  49.             DisableAndHide(c_HardwareAutoplaySD);
  50.         }
  51.         else if (!m_DefaultAutoplayButtons)
  52.         {
  53.             SetAutoplayButtonsToDefault();
  54.         }
  55.         break;
  56.     case GameState::Playing:
  57.         if (!m_AutoplayStopPressed)
  58.         {
  59.             m_DefaultAutoplayButtons = false;
  60.             EnableAndShow(c_AutoPlayStopButton);
  61.             DisableAndHide(c_AutoplayToggleButton);
  62.             DisableAndHide(c_AutoplayInactiveButton);
  63.             DisableAndHide(c_AutoplayToggleCancelButton);
  64.  
  65.             EnableAndShow(c_HardwareAutoplayStopSD);
  66.             DisableAndHide(c_HardwareAutoplayCountSD);
  67.             DisableAndHide(c_HardwareAutoplaySD);
  68.         }
  69.         else if (m_AutoplayStopPressed)
  70.         {
  71.             SetAutoplayButtonsToDisabled();
  72.         }
  73.         break;
  74.     case GameState::PrePayingOut:
  75.         if (!m_AutoplayStopPressed)
  76.         {
  77.             EnableAndShow(c_AutoPlayStopButton);
  78.             DisableAndHide(c_AutoplayToggleButton);
  79.             DisableAndHide(c_AutoplayInactiveButton);
  80.             DisableAndHide(c_AutoplayToggleCancelButton);
  81.  
  82.             EnableAndShow(c_HardwareAutoplayStopSD);
  83.             DisableAndHide(c_HardwareAutoplayCountSD);
  84.             DisableAndHide(c_HardwareAutoplaySD);
  85.         }
  86.         else if (m_AutoplayStopPressed)
  87.         {
  88.             SetAutoplayButtonsToDisabled();
  89.         }
  90.         break;
  91.     case GameState::PayingOut:
  92.         if (!m_AutoplayStopPressed)
  93.         {
  94.             EnableAndShow(c_AutoPlayStopButton);
  95.             DisableAndHide(c_AutoplayToggleButton);
  96.             DisableAndHide(c_AutoplayInactiveButton);
  97.             DisableAndHide(c_AutoplayToggleCancelButton);
  98.  
  99.             EnableAndShow(c_HardwareAutoplayStopSD);
  100.             DisableAndHide(c_HardwareAutoplayCountSD);
  101.             DisableAndHide(c_HardwareAutoplaySD);
  102.         }
  103.         else if (m_AutoplayStopPressed)
  104.         {
  105.             SetAutoplayButtonsToDisabled();
  106.         }
  107.         break;
  108.     case GameState::PostPlaying:
  109.         if (!m_AutoplayStopPressed)
  110.         {
  111.             EnableAndShow(c_AutoPlayStopButton);
  112.             DisableAndHide(c_AutoplayToggleButton);
  113.             DisableAndHide(c_AutoplayInactiveButton);
  114.             DisableAndHide(c_AutoplayToggleCancelButton);
  115.  
  116.             EnableAndShow(c_HardwareAutoplayStopSD);
  117.             DisableAndHide(c_HardwareAutoplayCountSD);
  118.             DisableAndHide(c_HardwareAutoplaySD);
  119.         }
  120.         else if (m_AutoplayStopPressed)
  121.         {
  122.             SetAutoplayButtonsToDisabled();
  123.         }
  124.         break;
  125.     case GameState::LowCredit:
  126.         SetAutoplayButtonsToDisabled();
  127.         break;
  128.     default:
  129.         LOGMESSAGE(MSG_DBG, "How the fuck did I get in here");
  130.         SetAutoplayButtonsToDisabled();
  131.         break;
  132.     }
  133. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement