------------------------------------------------------------------------------- Fill animation combo box
| 117 | //------------------------------------------------------------------------------- |
| 118 | // Fill animation combo box |
| 119 | int CDisplay::FillAnimList(void) { |
| 120 | if (0 != g_pcAsset->pcScene->mNumAnimations) |
| 121 | { |
| 122 | // now fill in all animation names |
| 123 | for (unsigned int i = 0; i < g_pcAsset->pcScene->mNumAnimations; ++i) |
| 124 | { |
| 125 | std::string animationLabel(g_pcAsset->pcScene->mAnimations[i]->mName.data); |
| 126 | if (animationLabel.empty()) |
| 127 | { |
| 128 | animationLabel = std::string("Animation ") + std::to_string(i) + " (UNNAMED)"; |
| 129 | } |
| 130 | |
| 131 | SendDlgItemMessage(g_hDlg,IDC_COMBO1,CB_ADDSTRING,0, |
| 132 | (LPARAM)animationLabel.c_str()); |
| 133 | } |
| 134 | |
| 135 | // also add a dummy - 'none' |
| 136 | SendDlgItemMessage(g_hDlg,IDC_COMBO1,CB_ADDSTRING,0,(LPARAM)"none"); |
| 137 | |
| 138 | // select first |
| 139 | SendDlgItemMessage(g_hDlg,IDC_COMBO1,CB_SETCURSEL,0,0); |
| 140 | |
| 141 | EnableAnimTools(TRUE); |
| 142 | } |
| 143 | else // tools remain disabled |
| 144 | EnableAnimTools(FALSE); |
| 145 | |
| 146 | return 1; |
| 147 | } |
| 148 | //------------------------------------------------------------------------------- |
| 149 | // Clear the list of animations |
| 150 | int CDisplay::ClearAnimList(void) |