本文整理汇总了C++中MenuItem::GetLabel方法的典型用法代码示例。如果您正苦于以下问题:C++ MenuItem::GetLabel方法的具体用法?C++ MenuItem::GetLabel怎么用?C++ MenuItem::GetLabel使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类MenuItem
的用法示例。
在下文中一共展示了MenuItem::GetLabel方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: CharacterPullDownChanged
void VoxGame::CharacterPullDownChanged()
{
MenuItem* pMenuItem = m_pCharacterPulldown->GetSelectedMenuItem();
if (pMenuItem != NULL)
{
m_pPlayer->UnloadWeapon(false);
m_pPlayer->UnloadWeapon(true);
m_pPlayer->LoadCharacter(pMenuItem->GetLabel().GetText().c_str(), false);
AnimationPullDownChanged();
}
}
示例2: WeaponPullDownChanged
void VoxGame::WeaponPullDownChanged()
{
m_pPlayer->UnloadWeapon(true);
m_pPlayer->UnloadWeapon(false);
m_pPlayer->GetVoxelCharacter()->SetQubicleMatrixRender("Right_Hand", true);
m_pPlayer->GetVoxelCharacter()->SetQubicleMatrixRender("Left_Hand", true);
MenuItem* pMenuItem = m_pWeaponsPulldown->GetSelectedMenuItem();
if (pMenuItem != NULL)
{
if (strcmp(pMenuItem->GetLabel().GetText().c_str(), "NONE") == 0)
{
}
else if (strcmp(pMenuItem->GetLabel().GetText().c_str(), "Sword") == 0)
{
m_pPlayer->GetVoxelCharacter()->LoadRightWeapon("media/gamedata/weapons/Sword/Sword.weapon");
}
else if (strcmp(pMenuItem->GetLabel().GetText().c_str(), "Sword & Shield") == 0)
{
m_pPlayer->GetVoxelCharacter()->LoadRightWeapon("media/gamedata/weapons/Sword/Sword.weapon");
m_pPlayer->GetVoxelCharacter()->LoadLeftWeapon("media/gamedata/weapons/Shield/Shield.weapon");
}
else if (strcmp(pMenuItem->GetLabel().GetText().c_str(), "2 Handed Sword") == 0)
{
m_pPlayer->GetVoxelCharacter()->LoadRightWeapon("media/gamedata/weapons/2HandedSword/2HandedSword.weapon");
}
else if (strcmp(pMenuItem->GetLabel().GetText().c_str(), "Hammer") == 0)
{
m_pPlayer->GetVoxelCharacter()->LoadRightWeapon("media/gamedata/weapons/Hammer/Hammer.weapon");
}
else if (strcmp(pMenuItem->GetLabel().GetText().c_str(), "Bow") == 0)
{
m_pPlayer->GetVoxelCharacter()->LoadLeftWeapon("media/gamedata/weapons/Bow/Bow.weapon");
}
else if (strcmp(pMenuItem->GetLabel().GetText().c_str(), "Staff") == 0)
{
m_pPlayer->GetVoxelCharacter()->LoadRightWeapon("media/gamedata/weapons/Staff/Staff.weapon");
}
else if (strcmp(pMenuItem->GetLabel().GetText().c_str(), "DruidStaff") == 0)
{
m_pPlayer->GetVoxelCharacter()->LoadRightWeapon("media/gamedata/weapons/DruidStaff/DruidStaff.weapon");
}
else if (strcmp(pMenuItem->GetLabel().GetText().c_str(), "PriestStaff") == 0)
{
m_pPlayer->GetVoxelCharacter()->LoadRightWeapon("media/gamedata/weapons/PriestStaff/PriestStaff.weapon");
}
else if (strcmp(pMenuItem->GetLabel().GetText().c_str(), "NecroStaff") == 0)
{
m_pPlayer->GetVoxelCharacter()->LoadRightWeapon("media/gamedata/weapons/NecroStaff/NecroStaff.weapon");
}
else if (strcmp(pMenuItem->GetLabel().GetText().c_str(), "Torch") == 0)
{
m_pPlayer->GetVoxelCharacter()->LoadRightWeapon("media/gamedata/weapons/Torch/Torch.weapon");
}
else if (strcmp(pMenuItem->GetLabel().GetText().c_str(), "Magic") == 0)
{
m_pPlayer->GetVoxelCharacter()->LoadRightWeapon("media/gamedata/weapons/FireballHands/FireballHandsRight.weapon");
m_pPlayer->GetVoxelCharacter()->LoadLeftWeapon("media/gamedata/weapons/FireballHands/FireballHandsLeft.weapon");
m_pPlayer->GetVoxelCharacter()->SetQubicleMatrixRender("Right_Hand", false);
m_pPlayer->GetVoxelCharacter()->SetQubicleMatrixRender("Left_Hand", false);
}
}
}
示例3: AnimationPullDownChanged
void VoxGame::AnimationPullDownChanged()
{
MenuItem* pMenuItem = m_pAnimationsPulldown->GetSelectedMenuItem();
if (pMenuItem != NULL)
{
m_pPlayer->GetVoxelCharacter()->PlayAnimation(AnimationSections_FullBody, false, AnimationSections_FullBody, pMenuItem->GetLabel().GetText().c_str());
}
}