本文整理汇总了C++中fairy::LogicModel::getSkeletonAnimation方法的典型用法代码示例。如果您正苦于以下问题:C++ LogicModel::getSkeletonAnimation方法的具体用法?C++ LogicModel::getSkeletonAnimation怎么用?C++ LogicModel::getSkeletonAnimation使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类fairy::LogicModel
的用法示例。
在下文中一共展示了LogicModel::getSkeletonAnimation方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: nameStr
void
AddSkillDialog::OnInitDialog(wxInitDialogEvent &e)
{
wxDialog::OnInitDialog(e);
wxBoxSizer *item0 = new wxBoxSizer( wxVERTICAL );
wxFlexGridSizer *item1 = new wxFlexGridSizer( 2, 0, 0 );
wxStaticText *item2 = new wxStaticText( this, wxID_ANY, /*_("Animation")*/ wxT("动作"), wxDefaultPosition, wxDefaultSize, 0 );
item1->Add( item2, 0, wxALIGN_CENTER|wxALL, 5 );
wxString *strs3 = (wxString*) NULL;
wxComboBox *item3 = new wxComboBox( this, ID_COMBO_ANIMATION, wxT(""), wxDefaultPosition, wxSize(200,-1), 0, strs3, wxCB_DROPDOWN );
item1->Add( item3, 0, wxALIGN_CENTER|wxALL, 5 );
wxStaticText *item4 = new wxStaticText( this, wxID_ANY, /*_("Skill Name")*/wxT("技能名称"), wxDefaultPosition, wxDefaultSize, 0 );
item1->Add( item4, 0, wxALIGN_CENTER|wxALL, 5 );
wxTextCtrl *item5 = new wxTextCtrl( this, ID_TEXTCTRL_SKILL, wxT(""), wxDefaultPosition, wxSize(200,-1), 0 );
item1->Add( item5, 0, wxALIGN_CENTER|wxALL, 5 );
wxButton *item6 = new wxButton( this, wxID_OK, /*_("OK")*/wxT("确认[&O]"), wxDefaultPosition, wxDefaultSize, 0 );
item1->Add( item6, 0, wxALIGN_CENTER|wxALL, 5 );
wxButton *item7 = new wxButton( this, wxID_CANCEL, /*_("Cancel")*/wxT("取消[&C]"), wxDefaultPosition, wxDefaultSize, 0 );
item1->Add( item7, 0, wxALIGN_CENTER|wxALL, 5 );
item0->Add( item1, 0, wxALIGN_CENTER|wxALL, 5 );
this->SetSizer( item0 );
item0->SetSizeHints( this );
SkillObjectEditor* pSkillEditor = dynamic_cast<SkillObjectEditor*>(m_parent);
assert(pSkillEditor);
ActorAnimationSettingEditor *parentDialog = pSkillEditor->GetParentFrame()->GetActorSettingEditor();
assert (parentDialog);
Fairy::LogicModel *object = parentDialog->GetCurrentObject();
for ( unsigned short i = 0; i < object->getSkeletonAnimationCount(); ++i )
{
Ogre::Animation *anim = object->getSkeletonAnimation(i);
if ( anim )
{
wxString nameStr(anim->getName().c_str());
item3->AppendString(nameStr);
}
}
// 加入obj中定义的动作名称
Fairy::LogicModelManager::AnimationSkeletonLinksIterator asmIt =
Fairy::LogicModelManager::getSingleton().getAnimationSkeletonLinksIterator(object->getName());
while ( asmIt.hasMoreElements() )
{
wxString animName(asmIt.peekNextKey().c_str());
if ( wxNOT_FOUND == item3->FindString(animName) )
{
wxString nameStr(animName.c_str());
item3->AppendString(nameStr);
}
asmIt.moveNext();
}
item3->SetSelection(0);
mAnimComboBox = item3;
mSkillNameTextCtrl = item5;
}