本文整理汇总了C++中SpinnerWidget::setActive方法的典型用法代码示例。如果您正苦于以下问题:C++ SpinnerWidget::setActive方法的具体用法?C++ SpinnerWidget::setActive怎么用?C++ SpinnerWidget::setActive使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SpinnerWidget
的用法示例。
在下文中一共展示了SpinnerWidget::setActive方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: init
// -----------------------------------------------------------------------------
void SoccerSetupScreen::init()
{
m_schedule_continue = false;
Screen::init();
if (UserConfigParams::m_num_goals <= 0)
UserConfigParams::m_num_goals = 3;
if (UserConfigParams::m_soccer_time_limit <= 0)
UserConfigParams::m_soccer_time_limit = 3;
SpinnerWidget* goalamount = getWidget<SpinnerWidget>("goalamount");
goalamount->setValue(UserConfigParams::m_num_goals);
goalamount->setActive(!UserConfigParams::m_soccer_use_time_limit);
SpinnerWidget* timeAmount = getWidget<SpinnerWidget>("timeamount");
timeAmount->setValue(UserConfigParams::m_soccer_time_limit);
timeAmount->setActive(UserConfigParams::m_soccer_use_time_limit);
CheckBoxWidget* timeEnabled = getWidget<CheckBoxWidget>("time_enabled");
timeEnabled->setState(UserConfigParams::m_soccer_use_time_limit);
// 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);
// This flag will cause that a 'fire' event will be mapped to 'select' (if
// 'fire' is not assigned to a GUI event). This is done to support the old
// way of player joining by pressing 'fire' instead of 'select'.
input_manager->getDeviceManager()->mapFireToSelect(true);
} // init