Пример #1
0
void UI::Joystick(void)
{
  Common *cm = Common::GetInstance();
  if (CAVEButtonChange(3) == 1) {
    /*
      stop -> run run
      run-> stop
    */
    cm->runstate = (cm->runstate == 1) ? 0 : 1;
  } else if (CAVEBUTTON2 == 1) {
    if (CAVEButtonChange(2) == 0) {
      cm->beam_flag = true;
    }
  } else if (CAVEButtonChange(2) == -1) {
    cm->beam_flag = false;
  }

  if(CAVEBUTTON1==1){
    if(CAVEButtonChange(1) == 1){
      cm->beam_clear_flag = true;
    }
  }else if(CAVEButtonChange(1) == -1){
    cm->beam_clear_flag = false;
  }
}
Пример #2
0
int vrlib_button_change (int ibutton)
{
    return CAVEButtonChange (ibutton);
}