本文整理汇总了C++中SpinnerWidget::setDeactivated方法的典型用法代码示例。如果您正苦于以下问题:C++ SpinnerWidget::setDeactivated方法的具体用法?C++ SpinnerWidget::setDeactivated怎么用?C++ SpinnerWidget::setDeactivated使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SpinnerWidget
的用法示例。
在下文中一共展示了SpinnerWidget::setDeactivated方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: init
// -----------------------------------------------------------------------------
void SoccerSetupScreen::init()
{
m_schedule_continue = false;
Screen::init();
// TODO: remember in config.xml the last number of goals
if (UserConfigParams::m_soccer_time_limit <= 0)
UserConfigParams::m_soccer_time_limit = 3;
SpinnerWidget* goalamount = getWidget<SpinnerWidget>("goalamount");
goalamount->setValue(3);
goalamount->setActivated();
SpinnerWidget* timeAmount = getWidget<SpinnerWidget>("timeamount");
timeAmount->setValue(UserConfigParams::m_soccer_time_limit);
timeAmount->setDeactivated();
CheckBoxWidget* timeEnabled = getWidget<CheckBoxWidget>("time_enabled");
timeEnabled->setState(false);
// Set focus on "continue"
ButtonWidget* bt_continue = getWidget<ButtonWidget>("continue");
bt_continue->setFocusForPlayer(PLAYER_ID_GAME_MASTER);
// We need players to be able to choose their teams
input_manager->setMasterPlayerOnly(false);
} // init
示例2: onGameModeChanged
void RaceSetupScreen::onGameModeChanged()
{
DynamicRibbonWidget* w2 = getWidget<DynamicRibbonWidget>("gamemode");
assert( w2 != NULL );
std::string gamemode_str = w2->getSelectionIDString(PLAYER_ID_GAME_MASTER);
if (gamemode_str == "locked") return;
RaceManager::MinorRaceModeType gamemode =
RaceManager::getModeIDFromInternalName(gamemode_str);
// deactivate the AI karts count widget for modes for which we have no AI
SpinnerWidget* kartamount = getWidget<SpinnerWidget>("aikartamount");
if (!RaceManager::hasAI(gamemode))
{
kartamount->setDeactivated();
}
else
{
kartamount->setActivated();
}
}