本文整理汇总了C++中SpinnerWidget::addLabel方法的典型用法代码示例。如果您正苦于以下问题:C++ SpinnerWidget::addLabel方法的具体用法?C++ SpinnerWidget::addLabel怎么用?C++ SpinnerWidget::addLabel使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SpinnerWidget
的用法示例。
在下文中一共展示了SpinnerWidget::addLabel方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: beforeAddingWidgets
void CustomVideoSettingsDialog::beforeAddingWidgets()
{
getWidget<CheckBoxWidget>("anim_gfx")->setState( UserConfigParams::m_graphical_effects );
getWidget<CheckBoxWidget>("weather_gfx")->setState( UserConfigParams::m_weather_effects );
getWidget<CheckBoxWidget>("dof")->setState(UserConfigParams::m_dof);
getWidget<CheckBoxWidget>("hd-textures")->setState(UserConfigParams::m_high_definition_textures);
SpinnerWidget* kart_anim = getWidget<SpinnerWidget>("steering_animations");
kart_anim->addLabel( _("Disabled") ); // 0
//I18N: animations setting (only karts with human players are animated)
kart_anim->addLabel( _("Human players only") ); // 1
//I18N: animations setting (all karts are animated)
kart_anim->addLabel( _("Enabled for all") ); // 2
kart_anim->setValue( UserConfigParams::m_show_steering_animations );
SpinnerWidget* filtering = getWidget<SpinnerWidget>("filtering");
int value = 0;
if (UserConfigParams::m_anisotropic == 2) value = 2;
else if (UserConfigParams::m_anisotropic == 4) value = 3;
else if (UserConfigParams::m_anisotropic == 8) value = 4;
else if (UserConfigParams::m_anisotropic == 16) value = 5;
else if (UserConfigParams::m_trilinear) value = 1;
filtering->addLabel( _("Bilinear") ); // 0
filtering->addLabel( _("Trilinear") ); // 1
filtering->addLabel( _("Anisotropic x2") ); // 2
filtering->addLabel( _("Anisotropic x4") ); // 3
filtering->addLabel( _("Anisotropic x8") ); // 4
filtering->addLabel( _("Anisotropic x16") ); // 5
filtering->setValue( value );
SpinnerWidget* shadows = getWidget<SpinnerWidget>("shadows");
shadows->addLabel( _("Disabled") ); // 0
shadows->addLabel( _("low") ); // 1
shadows->addLabel( _("high") ); // 2
if (!irr_driver->needUBOWorkaround())
shadows->setValue(UserConfigParams::m_shadows);
else
shadows->setValue(0);
getWidget<CheckBoxWidget>("dynamiclight")->setState(UserConfigParams::m_dynamic_lights);
getWidget<CheckBoxWidget>("lightshaft")->setState(UserConfigParams::m_light_shaft);
getWidget<CheckBoxWidget>("global_illumination")->setState(UserConfigParams::m_gi);
getWidget<CheckBoxWidget>("motionblur")->setState(UserConfigParams::m_motionblur);
getWidget<CheckBoxWidget>("mlaa")->setState(UserConfigParams::m_mlaa);
getWidget<CheckBoxWidget>("glow")->setState(UserConfigParams::m_glow);
getWidget<CheckBoxWidget>("ssao")->setState(UserConfigParams::m_ssao);
getWidget<CheckBoxWidget>("bloom")->setState(UserConfigParams::m_bloom);
getWidget<CheckBoxWidget>("texture_compression")->setState(UserConfigParams::m_texture_compression);
}
示例2: ModalDialog
StoryModeNewDialog::StoryModeNewDialog(const float w, const float h) :
ModalDialog(w, h)
{
loadFromFile("story_mode_new.stkgui");
SpinnerWidget* ident = getWidget<SpinnerWidget>("identity");
const int playerAmount = UserConfigParams::m_all_players.size();
ident->setMax(playerAmount - 1);
for(int n=0; n<playerAmount; n++)
{
ident->addLabel( translations->fribidize(UserConfigParams::m_all_players[n].getName()) );
}
RibbonWidget* difficulty = getWidget<RibbonWidget>("difficulty");
difficulty->setSelection( 1 /* medium */, PLAYER_ID_GAME_MASTER );
ident->setFocusForPlayer(PLAYER_ID_GAME_MASTER);
}