Skip to content

Commit

Permalink
- fix animation selection combobox in assimpview.
Browse files Browse the repository at this point in the history
  • Loading branch information
acgessler committed Jul 26, 2012
1 parent 776d8e3 commit acdd0bf
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions tools/assimp_view/MessageProc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

#include "stdafx.h"
#include "assimp_view.h"
#include <Windowsx.h>

namespace AssimpView {

Expand Down Expand Up @@ -1815,6 +1816,16 @@ INT_PTR CALLBACK MessageProc(HWND hwndDlg,UINT uMsg,
PostQuitMessage(0);
DestroyWindow(hwndDlg);
}
else if (IDC_COMBO1 == LOWORD(wParam))
{
if(HIWORD(wParam) == CBN_SELCHANGE) {
const size_t sel = static_cast<size_t>(ComboBox_GetCurSel(GetDlgItem(hwndDlg,IDC_COMBO1)));
if(g_pcAsset) {
g_pcAsset->mAnimator->SetAnimIndex(sel);
SendDlgItemMessage(hwndDlg,IDC_SLIDERANIM,TBM_SETPOS,TRUE,0);
}
}
}
else if (ID_VIEWER_RESETVIEW == LOWORD(wParam))
{
g_sCamera.vPos = aiVector3D(0.0f,0.0f,-10.0f);
Expand Down

0 comments on commit acdd0bf

Please sign in to comment.