示例#1
0
/**
 * Reacts to changges of the combo box selection for the histogram options for
 * event data
 * @param index the new index of the combo box.
 */
void SANSAddFiles::onCurrentIndexChangedForHistogramChoice(int index) {
  // Set the overlay checkbox enabled or disabled
  // Set the input field enabled or disabled
  switch (index) {
  case CUSTOMBINNING:
    m_SANSForm->overlayCheckBox->setEnabled(false);
    setHistogramUiLogic(m_customBinningText, m_customBinningToolTip,
                        m_customBinning, true);
    break;
  case FROMMONITORS:
    setHistogramUiLogic(m_customBinningText, m_customBinningToolTip,
                        m_customBinning, false);
    setInputEnabled(false);
    break;
  case SAVEASEVENTDATA:
    m_customBinning = this->m_SANSForm->eventToHistBinning->text();
    m_SANSForm->eventToHistBinning->setText("");

    setHistogramUiLogic(m_saveEventDataText, m_saveEventDataToolTip, "", true);
    m_SANSForm->overlayCheckBox->setEnabled(true);

    setInputEnabled(m_SANSForm->overlayCheckBox->isChecked());
    break;
  default:
    setInputEnabled(false);
    break;
  }
}
示例#2
0
void Garage::doOnStartClosingEvent() {
    auto player = engine->getPlayer();
    auto plyChar = player->getCharacter();
    auto playerPosition = plyChar->getPosition();
    auto playerVehicle = plyChar->getCurrentVehicle();
    bool playerIsInVehicle = playerVehicle != nullptr;
    RW_UNUSED(playerPosition);
    RW_UNUSED(playerIsInVehicle);

    switch (type) {
        case Type::Mission:
        case Type::CollectCars1:
        case Type::CollectCars2: {
            player->setInputEnabled(false);
            break;
        }

        case Type::BombShop1:
        case Type::BombShop2:
        case Type::BombShop3:
        case Type::Respray: {
            player->setInputEnabled(false);
            playerVehicle->setHandbraking(true);
            break;
        }

        case Type::MissionForCarToComeOut: {
            break;
        }

        case Type::Crusher: {
            break;
        }

        case Type::MissionKeepCar: {
            break;
        }

        case Type::MissionToOpenAndClose: {
            break;
        }

        case Type::MissionForSpecificCar: {
            break;
        }

        case Type::MissionKeepCarAndRemainClosed: {
            break;
        }

        default: { break; }
    }
}
示例#3
0
void MarbleWidget::setLockToSubSolarPoint( bool visible )
{
    if ( d->map()->isLockedToSubSolarPoint() != visible ) { // Toggling input modifies event filters, so avoid that if not needed
        d->map()->setLockToSubSolarPoint( visible );
        setInputEnabled( !d->map()->isLockedToSubSolarPoint() );
    }
}
示例#4
0
void MidiSetup::inputNotAvailable()
{
    setInputEnabled(false);
    ui.chkEnableInput->setEnabled(false);
    ui.chkEnableThru->setEnabled(false);
    ui.comboInput->setCurrentIndex(-1);
}
示例#5
0
	DebugActor::DebugActor():_frames(0), _startTime(0), _corner(0), _showTexel2PixelErrors(false), _showTouchedActor(false)
	{
		DebugActor::initialize();

		setName(getDefaultName());

		_startTime = getTimeMS();
		setPriority(1000);

		float scale = 1.0f;
		if (getRoot())
			scale = 1.0f/getRoot()->getScaleX();

		setScale(scale);

		setInputEnabled(false);
		

		TextStyle st;
		st.font = resSystem->getResFont("system")->getFont();
		st.vAlign = TextStyle::VALIGN_TOP;
		//st.color = Color(rand()%255, rand()%255, rand()%255, 255);
		st.color = Color(Color::Black, 255);
		st.multiline = true;
		setWidth(230);
		setHeight(45);

		_bg = new ColorRectSprite;
		_bg->setColor(Color(Color::White, 64));
		_bg->setSize(getSize());
		_bg->setInputEnabled(false);
		addChild(_bg);


		float x = getWidth();
		addButton(x, "tree", "tree");
		addButton(x, "finger", "finger");		
#ifdef OXYGINE_DEBUG_T2P
		addButton(x, "t2p", "t2p");
#endif

#ifdef OXYGINE_DEBUG_TRACE_LEAKS
		
		addButton(x, "images", "images");		
#endif
		
		

		_text = new TextActor;
		addChild(_text);
		_text->setInputEnabled(false);
		_text->setStyle(st);
		_text->setWidth(getWidth());
		_text->setText("debug text");

		getRoot()->addEventListener(TouchEvent::MOVE, CLOSURE(this, &DebugActor::onDAEvent));

		instance = this;
	}
示例#6
0
void PlayerController::prepareForCutscene() {
    setInputEnabled(false);

    // @todo: make player invincible
    //                    ignored by police

    // clear all particles, projectiles, extinguish all fires
    //                                              including cars on fire
}
示例#7
0
/**
 * Set the UI logic for the histogram binning and saving as event data bit.
 * @param label :: the label of the line edit field.
 * @param toolTip :: the tooltip text.
 * @param lineEditText :: text for the line edit field
 * @param enabled :: if the input should be enabled.
 */
void SANSAddFiles::setHistogramUiLogic(QString label, QString toolTip,
                                       QString lineEditText, bool enabled) {
  // Line edit field
  m_SANSForm->eventToHistBinning->setText(lineEditText);
  m_SANSForm->eventToHistBinning->setToolTip(toolTip);

  // Label for line edit field
  m_SANSForm->binning_label->setText(label);
  m_SANSForm->binning_label->setToolTip(toolTip);

  setInputEnabled(enabled);
}
示例#8
0
void Garage::doOnCloseEvent() {
    auto player = engine->getPlayer();
    auto plyChar = player->getCharacter();
    auto playerPosition = plyChar->getPosition();
    auto playerVehicle = plyChar->getCurrentVehicle();
    bool playerIsInVehicle = playerVehicle != nullptr;
    RW_UNUSED(playerPosition);
    RW_UNUSED(playerIsInVehicle);

    switch (type) {
        case Type::Mission: {
            player->setInputEnabled(true);
            break;
        }

        case Type::BombShop1:
        case Type::BombShop2:
        case Type::BombShop3: {
            // Find out real value
            garageTimer = engine->getGameTime() + 1.5f;

            break;
        }

        case Type::Respray: {
            // Find out real value
            garageTimer = engine->getGameTime() + 2.f;
            playerVehicle->setHealth(1000.f);

            break;
        }

        case Type::CollectCars1:
        case Type::CollectCars2: {
            break;
        }

        case Type::MissionForCarToComeOut: {
            break;
        }

        case Type::Crusher: {
            break;
        }

        case Type::MissionKeepCar: {
            break;
        }

        case Type::Hideout1:
        case Type::Hideout2:
        case Type::Hideout3: {
            break;
        }

        case Type::MissionToOpenAndClose: {
            break;
        }

        case Type::MissionForSpecificCar: {
            break;
        }

        case Type::MissionKeepCarAndRemainClosed: {
            break;
        }

        default: { break; }
    }
}
示例#9
0
void PlayerController::freeFromCutscene() {
    setInputEnabled(true);

    // @todo: make player no longer invincible
    //                              ignored by police
}
	ThreadLoading::ThreadLoading():_thread(pthread_self()), _threadDone(false)
	{
		setInputEnabled(false);
	}
示例#11
0
/**
 * Reacts to changes of the overlay check box when adding event data
 * @param state the state of the check box
 */
void SANSAddFiles::onStateChangedForOverlayCheckBox(int state) {
  setInputEnabled(state != 0);
}
	TreeInspectorPreview::TreeInspectorPreview(TreeInspector *tree): _tree(tree), _prevParent(0), _drawChildren(false)
	{
		setInputEnabled(false);
	}