[3459159] Tidy up UI layout in assimp_view.
I changed the size slightly, but left the majority of the patch unchanged. Many thanks to Tor Andersson for the original patch! (see https://sourceforge.net/tracker/?func=detail&aid=3459159&group_id=226462&atid=1067634) git-svn-id: https://assimp.svn.sourceforge.net/svnroot/assimp/trunk@1155 67173fc5-114c-0410-ac8e-9d2fd5bffc1fpull/5/head
parent
d508e44030
commit
6f2ca1bb22
|
@ -884,12 +884,12 @@ int CDisplay::OnSetupNormalView()
|
||||||
}
|
}
|
||||||
|
|
||||||
// now ... change the meaning of the statistics fields back
|
// now ... change the meaning of the statistics fields back
|
||||||
SetWindowText(GetDlgItem(g_hDlg,IDC_NUMVERTS),"Verts:");
|
SetWindowText(GetDlgItem(g_hDlg,IDC_NUMVERTS),"Vertices:");
|
||||||
SetWindowText(GetDlgItem(g_hDlg,IDC_NUMNODES),"Nodes:");
|
SetWindowText(GetDlgItem(g_hDlg,IDC_NUMNODES),"Nodes:");
|
||||||
SetWindowText(GetDlgItem(g_hDlg,IDC_NUMFACES),"Faces:");
|
SetWindowText(GetDlgItem(g_hDlg,IDC_NUMFACES),"Faces:");
|
||||||
SetWindowText(GetDlgItem(g_hDlg,IDC_NUMSHADERS),"Shd:");
|
SetWindowText(GetDlgItem(g_hDlg,IDC_NUMSHADERS),"Shaders:");
|
||||||
SetWindowText(GetDlgItem(g_hDlg,IDC_NUMMATS),"Mats:");
|
SetWindowText(GetDlgItem(g_hDlg,IDC_NUMMATS),"Materials:");
|
||||||
SetWindowText(GetDlgItem(g_hDlg,IDC_NUMMESHES),"Mesh:");
|
SetWindowText(GetDlgItem(g_hDlg,IDC_NUMMESHES),"Meshes:");
|
||||||
SetWindowText(GetDlgItem(g_hDlg,IDC_LOADTIME),"Time:");
|
SetWindowText(GetDlgItem(g_hDlg,IDC_LOADTIME),"Time:");
|
||||||
|
|
||||||
FillDefaultStatistics();
|
FillDefaultStatistics();
|
||||||
|
@ -911,12 +911,12 @@ int CDisplay::OnSetupNodeView(NodeInfo* pcNew)
|
||||||
ai_assert(NULL != pcNew);
|
ai_assert(NULL != pcNew);
|
||||||
|
|
||||||
if (m_pcCurrentNode == pcNew)return 2;
|
if (m_pcCurrentNode == pcNew)return 2;
|
||||||
|
|
||||||
// now ... change the meaning of the statistics fields back
|
// now ... change the meaning of the statistics fields back
|
||||||
SetWindowText(GetDlgItem(g_hDlg,IDC_NUMVERTS),"Verts:");
|
SetWindowText(GetDlgItem(g_hDlg,IDC_NUMVERTS),"Vertices:");
|
||||||
SetWindowText(GetDlgItem(g_hDlg,IDC_NUMFACES),"Faces:");
|
SetWindowText(GetDlgItem(g_hDlg,IDC_NUMFACES),"Faces:");
|
||||||
SetWindowText(GetDlgItem(g_hDlg,IDC_NUMMATS),"Mats:");
|
SetWindowText(GetDlgItem(g_hDlg,IDC_NUMMATS),"Materials:");
|
||||||
SetWindowText(GetDlgItem(g_hDlg,IDC_NUMMESHES),"Mesh:");
|
SetWindowText(GetDlgItem(g_hDlg,IDC_NUMMESHES),"Meshes:");
|
||||||
|
|
||||||
ShowWindow(GetDlgItem(g_hDlg,IDC_NUMNODES),SW_HIDE);
|
ShowWindow(GetDlgItem(g_hDlg,IDC_NUMNODES),SW_HIDE);
|
||||||
ShowWindow(GetDlgItem(g_hDlg,IDC_ENODEWND),SW_HIDE);
|
ShowWindow(GetDlgItem(g_hDlg,IDC_ENODEWND),SW_HIDE);
|
||||||
|
|
|
@ -1493,7 +1493,7 @@ INT_PTR CALLBACK MessageProc(HWND hwndDlg,UINT uMsg,
|
||||||
}
|
}
|
||||||
else if (!g_pcAsset)
|
else if (!g_pcAsset)
|
||||||
{
|
{
|
||||||
r = g = b = 150;szText = "-";
|
r = g = b = 150;szText = "";
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -1526,7 +1526,7 @@ INT_PTR CALLBACK MessageProc(HWND hwndDlg,UINT uMsg,
|
||||||
}
|
}
|
||||||
else if (!g_pcAsset)
|
else if (!g_pcAsset)
|
||||||
{
|
{
|
||||||
r = g = b = 150;szText = "-";
|
r = g = b = 150;szText = "";
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -1551,11 +1551,11 @@ INT_PTR CALLBACK MessageProc(HWND hwndDlg,UINT uMsg,
|
||||||
CDisplay::VIEWMODE_MATERIAL == CDisplay::Instance().GetViewMode())
|
CDisplay::VIEWMODE_MATERIAL == CDisplay::Instance().GetViewMode())
|
||||||
{
|
{
|
||||||
r = g = b = 0;
|
r = g = b = 0;
|
||||||
szText = "-";
|
szText = "";
|
||||||
}
|
}
|
||||||
else if (!g_pcAsset)
|
else if (!g_pcAsset)
|
||||||
{
|
{
|
||||||
r = g = b = 150;szText = "-";
|
r = g = b = 150;szText = "";
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -2562,6 +2562,16 @@ int APIENTRY _tWinMain(HINSTANCE hInstance,
|
||||||
|
|
||||||
ToggleCulling();
|
ToggleCulling();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case 'T':
|
||||||
|
case 't':
|
||||||
|
|
||||||
|
CheckDlgButton(g_hDlg,IDC_NOAB,
|
||||||
|
IsDlgButtonChecked(g_hDlg,IDC_NOAB) == BST_CHECKED
|
||||||
|
? BST_UNCHECKED : BST_CHECKED);
|
||||||
|
|
||||||
|
ToggleTransparency();
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -53,70 +53,100 @@ BEGIN
|
||||||
CONTROL "",IDC_STATIC,"Static",SS_ETCHEDHORZ,0,10,281,1
|
CONTROL "",IDC_STATIC,"Static",SS_ETCHEDHORZ,0,10,281,1
|
||||||
END
|
END
|
||||||
|
|
||||||
IDD_DIALOGMAIN DIALOGEX 0, 0, 709, 485
|
#define X_GROUP1 7
|
||||||
STYLE DS_SETFONT | DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU
|
#define W_GROUP1 6+160+6
|
||||||
|
#define X_GROUP2 X_GROUP1+W_GROUP1+7
|
||||||
|
#define W_GROUP2 6+150+8
|
||||||
|
#define X_GROUP3 X_GROUP2+W_GROUP2+7
|
||||||
|
#define W_GROUP3 6+60+35+8
|
||||||
|
|
||||||
|
#define W X_GROUP3+W_GROUP3+47
|
||||||
|
#define H 450
|
||||||
|
|
||||||
|
#define Y_PANEL H-12-82-7-7-14-4
|
||||||
|
#define Y_GROUPS Y_PANEL+14+7
|
||||||
|
|
||||||
|
#define TREE_W 143
|
||||||
|
#define COMBO_W 100
|
||||||
|
|
||||||
|
IDD_DIALOGMAIN DIALOGEX 0, 0, W+TREE_W, H
|
||||||
|
STYLE DS_SETFONT | DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU
|
||||||
EXSTYLE WS_EX_ACCEPTFILES | WS_EX_WINDOWEDGE
|
EXSTYLE WS_EX_ACCEPTFILES | WS_EX_WINDOWEDGE
|
||||||
CAPTION "Open Asset Import Library - Model Viewer "
|
CAPTION "Open Asset Import Library - Model Viewer "
|
||||||
MENU IDR_MENU1
|
MENU IDR_MENU1
|
||||||
FONT 8, "Microsoft Sans Serif", 400, 0, 0x0
|
FONT 8, "Microsoft Sans Serif", 400, 0, 0x0
|
||||||
BEGIN
|
BEGIN
|
||||||
CONTROL "Multisampling",IDC_TOGGLEMS,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,12,402,56,12
|
|
||||||
CONTROL "Wireframe",IDC_TOGGLEWIRE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,12,412,57,12
|
CONTROL "",IDC_RT,"Static",SS_OWNERDRAW,0,0,W,Y_PANEL
|
||||||
CONTROL "No materials",IDC_TOGGLEMAT,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,12,423,64,12
|
CONTROL "",IDC_TREE1,"SysTreeView32",TVS_HASBUTTONS|TVS_HASLINES|TVS_SHOWSELALWAYS|WS_BORDER|WS_HSCROLL|WS_TABSTOP, W,0,TREE_W,H
|
||||||
LTEXT "Vertices",IDC_NUMVERTS,234,404,31,9
|
|
||||||
LTEXT "Faces",IDC_NUMFACES,318,405,26,9
|
#define Y Y_PANEL+4
|
||||||
LTEXT "Materials",IDC_NUMMATS,318,420,27,9
|
CONTROL "<<",IDC_BLUBB,"Button",BS_AUTOCHECKBOX|BS_PUSHLIKE|WS_TABSTOP, W-7-35,Y,35,14
|
||||||
LTEXT "Fps",IDC_FPS,318,449,30,9
|
COMBOBOX IDC_COMBO1, W-7-35-4-100,Y,100,14, CBS_DROPDOWN|WS_VSCROLL|WS_TABSTOP
|
||||||
CONTROL "Display normals",IDC_TOGGLENORMALS,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,12,433,62,12
|
PUSHBUTTON "Play",IDC_PLAY, W-7-35-4-100-35-4,Y,35,14
|
||||||
CONTROL "Toggle AutoRotate",IDC_AUTOROTATE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,112,402,80,12
|
CONTROL "",IDC_SLIDERANIM,"msctls_trackbar32",TBS_AUTOTICKS|TBS_BOTH|TBS_NOTICKS|WS_TABSTOP, 0,Y,W-7-35-4-100-35-4,15
|
||||||
EDITTEXT IDC_EVERT,268,402,37,14,ES_AUTOHSCROLL | ES_READONLY
|
|
||||||
EDITTEXT IDC_EFACE,350,402,34,14,ES_AUTOHSCROLL | ES_READONLY
|
#undef Y
|
||||||
EDITTEXT IDC_EMAT,350,417,34,14,ES_AUTOHSCROLL | ES_READONLY
|
#define Y Y_GROUPS+12
|
||||||
EDITTEXT IDC_EFPS,350,446,34,14,ES_AUTOHSCROLL | ES_READONLY
|
#define X X_GROUP1+6
|
||||||
CONTROL "Rotate light sources",IDC_LIGHTROTATE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,112,424,80,12
|
|
||||||
CONTROL "Two lights",IDC_3LIGHTS,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,112,435,56,12
|
GROUPBOX "Display",IDC_STATIC, X_GROUP1,Y_GROUPS,W_GROUP1,12+82+7
|
||||||
LTEXT "Load time",IDC_LOADTIME,234,449,34,9
|
|
||||||
EDITTEXT IDC_ELOAD,268,447,37,14,ES_AUTOHSCROLL | ES_READONLY
|
CONTROL "Multisampling [M]",IDC_TOGGLEMS,"Button",BS_AUTOCHECKBOX | WS_TABSTOP, X,Y,80,10
|
||||||
CONTROL "Zoom/Rotate",IDC_ZOOM,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,112,413,68,12
|
CONTROL "Wireframe [W]",IDC_TOGGLEWIRE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP, X,Y+12,80,10
|
||||||
CONTROL "Low quality",IDC_LOWQUALITY,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,12,443,48,12
|
CONTROL "No materials [D]",IDC_TOGGLEMAT,"Button",BS_AUTOCHECKBOX | WS_TABSTOP, X,Y+24,80,10
|
||||||
CONTROL "No specular ",IDC_NOSPECULAR,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,12,454,50,12
|
CONTROL "Display normals [N]",IDC_TOGGLENORMALS,"Button",BS_AUTOCHECKBOX | WS_TABSTOP, X,Y+36,80,10
|
||||||
LTEXT "Shaders",IDC_NUMSHADERS,234,435,27,9
|
CONTROL "Low quality [P]",IDC_LOWQUALITY,"Button",BS_AUTOCHECKBOX | WS_TABSTOP, X,Y+48,80,10
|
||||||
EDITTEXT IDC_ESHADER,268,432,37,14,ES_AUTOHSCROLL | ES_READONLY
|
CONTROL "No specular [S]",IDC_NOSPECULAR,"Button",BS_AUTOCHECKBOX | WS_TABSTOP, X,Y+60,80,10
|
||||||
LTEXT "[M]",IDC_STATIC,84,404,13,9
|
CONTROL "Show skeleton [K]",IDC_SHOWSKELETON,"Button",BS_AUTOCHECKBOX | WS_TABSTOP, X,Y+72,80,10
|
||||||
LTEXT "[W]",IDC_STATIC,84,414,13,9
|
|
||||||
LTEXT "[C]",IDC_STATIC,198,448,13,9
|
CONTROL "AutoRotate [A]",IDC_AUTOROTATE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP, X+80,Y,80,10
|
||||||
LTEXT "[D]",IDC_STATIC,84,425,13,9
|
CONTROL "Zoom/Rotate [Z]",IDC_ZOOM,"Button",BS_AUTOCHECKBOX | WS_TABSTOP, X+80,Y+12,80,10
|
||||||
LTEXT "[L]",IDC_STATIC,198,436,13,9
|
CONTROL "Rotate lights [R]",IDC_LIGHTROTATE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP, X+80,Y+24,80,10
|
||||||
LTEXT "[N]",IDC_STATIC,84,435,13,9
|
CONTROL "Two lights [L]",IDC_3LIGHTS,"Button",BS_AUTOCHECKBOX | WS_TABSTOP, X+80,Y+36,80,10
|
||||||
LTEXT "[P]",IDC_STATIC,84,447,13,9
|
CONTROL "Backface culling [C]",IDC_BFCULL,"Button",BS_AUTOCHECKBOX | WS_TABSTOP, X+80,Y+48,80,10
|
||||||
LTEXT "[A]",IDC_STATIC,198,402,13,9
|
CONTROL "No transparency [T]",IDC_NOAB,"Button",BS_AUTOCHECKBOX | WS_TABSTOP, X+80,Y+60,80,10
|
||||||
LTEXT "[Z]",IDC_STATIC,198,413,13,9
|
|
||||||
LTEXT "[R]",IDC_STATIC,198,424,13,9
|
#undef X
|
||||||
COMBOBOX IDC_COMBO1,408,369,112,30,CBS_DROPDOWN | WS_VSCROLL | WS_TABSTOP
|
#define X X_GROUP2+6
|
||||||
LTEXT "Nodes",IDC_NUMNODES,234,420,28,9
|
|
||||||
EDITTEXT IDC_ENODEWND,268,417,37,14,ES_AUTOHSCROLL | ES_READONLY
|
GROUPBOX "Statistics",IDC_STATIC, X_GROUP2,Y_GROUPS,W_GROUP2,12+36+8+7
|
||||||
CONTROL "",IDC_TREE1,"SysTreeView32",TVS_HASBUTTONS | TVS_HASLINES | TVS_SHOWSELALWAYS | WS_BORDER | WS_HSCROLL | WS_TABSTOP,565,0,143,484
|
|
||||||
LTEXT "Meshes",IDC_NUMMESHES,318,434,27,9
|
LTEXT "Vertices:",IDC_NUMVERTS, X,Y,35,8
|
||||||
EDITTEXT IDC_EMESH,350,431,34,14,ES_AUTOHSCROLL | ES_READONLY
|
LTEXT "Nodes:",IDC_NUMNODES, X,Y+12,35,8
|
||||||
CONTROL "Button1",IDC_LCOLOR1,"Button",BS_OWNERDRAW | WS_TABSTOP,462,402,36,20
|
LTEXT "Shaders:",IDC_NUMSHADERS, X,Y+24,35,8
|
||||||
CONTROL "Button1",IDC_LCOLOR2,"Button",BS_OWNERDRAW | WS_TABSTOP,462,426,36,20
|
LTEXT "Time:",IDC_LOADTIME, X,Y+36,35,8
|
||||||
CONTROL "Button1",IDC_LCOLOR3,"Button",BS_OWNERDRAW | WS_TABSTOP,462,450,36,20
|
|
||||||
PUSHBUTTON "Reset",IDC_LRESET,504,402,33,13,BS_BOTTOM
|
EDITTEXT IDC_EVERT, X+35,Y,35,8, ES_AUTOHSCROLL | ES_READONLY | NOT WS_BORDER | ES_RIGHT
|
||||||
EDITTEXT IDC_VIEWMATRIX,234,417,71,44,ES_MULTILINE | ES_AUTOHSCROLL | ES_READONLY | NOT WS_VISIBLE
|
EDITTEXT IDC_ENODEWND, X+35,Y+12,35,8, ES_AUTOHSCROLL | ES_READONLY | NOT WS_BORDER | ES_RIGHT
|
||||||
CONTROL "Show skeleton",IDC_SHOWSKELETON,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,9,484,58,12
|
EDITTEXT IDC_ESHADER, X+35,Y+24,35,8, ES_AUTOHSCROLL | ES_READONLY | NOT WS_BORDER | ES_RIGHT
|
||||||
LTEXT "[S]",IDC_STATIC,84,457,13,9
|
EDITTEXT IDC_ELOAD, X+35,Y+36,35,8, ES_AUTOHSCROLL | ES_READONLY | NOT WS_BORDER | ES_RIGHT
|
||||||
CONTROL "<<",IDC_BLUBB,"Button",BS_AUTOCHECKBOX | BS_PUSHLIKE | WS_TABSTOP,528,366,36,24
|
|
||||||
CONTROL "",IDC_SLIDERANIM,"msctls_trackbar32",TBS_AUTOTICKS | TBS_BOTH | TBS_NOTICKS | WS_TABSTOP,0,366,382,16
|
LTEXT "Faces:",IDC_NUMFACES, X+80,Y,35,8
|
||||||
PUSHBUTTON "Play",IDC_PLAY,382,368,25,14
|
LTEXT "Materials:",IDC_NUMMATS, X+80,Y+12,35,8
|
||||||
CONTROL "Backface culling",IDC_BFCULL,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,112,446,65,12
|
LTEXT "Meshes:",IDC_NUMMESHES, X+80,Y+24,35,8
|
||||||
CONTROL "",IDC_RT,"Static",SS_OWNERDRAW,0,0,566,363
|
LTEXT "FPS:",IDC_FPS, X+80,Y+36,35,8
|
||||||
CONTROL "No transparency",IDC_NOAB,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,112,457,68,12
|
|
||||||
GROUPBOX "Statistics",IDC_STATIC,228,390,162,84
|
EDITTEXT IDC_EFACE, X+115,Y,35,8, ES_AUTOHSCROLL | ES_READONLY | NOT WS_BORDER | ES_RIGHT
|
||||||
GROUPBOX "Display",IDC_STATIC,6,390,216,84
|
EDITTEXT IDC_EMAT, X+115,Y+12,35,8, ES_AUTOHSCROLL | ES_READONLY | NOT WS_BORDER | ES_RIGHT
|
||||||
GROUPBOX "Colors",IDC_STATIC,396,390,150,85
|
EDITTEXT IDC_EMESH, X+115,Y+24,35,8, ES_AUTOHSCROLL | ES_READONLY | NOT WS_BORDER | ES_RIGHT
|
||||||
LTEXT "Primary light",IDC_STATIC,402,408,48,8
|
EDITTEXT IDC_EFPS, X+115,Y+36,35,8, ES_AUTOHSCROLL | ES_READONLY | NOT WS_BORDER | ES_RIGHT
|
||||||
LTEXT "Secondary light",IDC_STATIC,402,432,54,8
|
|
||||||
LTEXT "Ambient light",IDC_STATIC,402,456,54,8
|
EDITTEXT IDC_VIEWMATRIX, X,Y+48+7,72,44, ES_MULTILINE | ES_AUTOHSCROLL | ES_READONLY | NOT WS_BORDER | NOT WS_VISIBLE
|
||||||
|
|
||||||
|
#undef X
|
||||||
|
#define X X_GROUP3+6
|
||||||
|
|
||||||
|
GROUPBOX "Colors",IDC_STATIC, X_GROUP3,Y_GROUPS,W_GROUP3,12+54+14+7
|
||||||
|
|
||||||
|
LTEXT "Primary:",IDC_STATIC, X,Y+3,48,8
|
||||||
|
LTEXT "Secondary:",IDC_STATIC, X,Y+3+18,54,8
|
||||||
|
LTEXT "Ambient:",IDC_STATIC, X,Y+3+36,54,8
|
||||||
|
|
||||||
|
CONTROL "Button1",IDC_LCOLOR1,"Button",BS_OWNERDRAW | WS_TABSTOP, X+60,Y,35,14
|
||||||
|
CONTROL "Button1",IDC_LCOLOR2,"Button",BS_OWNERDRAW | WS_TABSTOP, X+60,Y+18,35,14
|
||||||
|
CONTROL "Button1",IDC_LCOLOR3,"Button",BS_OWNERDRAW | WS_TABSTOP, X+60,Y+36,35,14
|
||||||
|
PUSHBUTTON "Reset",IDC_LRESET, X+60,Y+54,35,14
|
||||||
END
|
END
|
||||||
|
|
||||||
IDD_LOADDIALOG DIALOGEX 0, 0, 143, 60
|
IDD_LOADDIALOG DIALOGEX 0, 0, 143, 60
|
||||||
|
|
Loading…
Reference in New Issue