GameDirectorSB 19-03-23 [v1.24] World_Viewer For World_Editor Loader
@@ -15,10 +15,13 @@ | ||
15 | 15 | #define IDD_FILEVIEW 129 |
16 | 16 | #define IDD_VIEWER3D 130 |
17 | 17 | #define IDD_PROGRESS_BAR 131 |
18 | +#define IDD_DIALOG1 132 | |
19 | +#define IDD_RIGHTGROUPS 132 | |
18 | 20 | #define IDC_PBBANNER 1000 |
19 | 21 | #define IDC_PBACTION 1001 |
20 | 22 | #define IDC_STBAR 1002 |
21 | 23 | #define IDC_ST_PB_STATUS 1003 |
24 | +#define IDC_BASETEXTURE2 1004 | |
22 | 25 | #define ID_DEBUG_SHOWIMGUIDEMO 32771 |
23 | 26 | #define ID_FILE_OPEN 32772 |
24 | 27 | #define ID_OPEN_WORLDEDITORPROJECT 32773 |
@@ -31,9 +34,9 @@ | ||
31 | 34 | #ifdef APSTUDIO_INVOKED |
32 | 35 | #ifndef APSTUDIO_READONLY_SYMBOLS |
33 | 36 | #define _APS_NO_MFC 1 |
34 | -#define _APS_NEXT_RESOURCE_VALUE 132 | |
37 | +#define _APS_NEXT_RESOURCE_VALUE 133 | |
35 | 38 | #define _APS_NEXT_COMMAND_VALUE 32776 |
36 | -#define _APS_NEXT_CONTROL_VALUE 1004 | |
39 | +#define _APS_NEXT_CONTROL_VALUE 1005 | |
37 | 40 | #define _APS_NEXT_SYMED_VALUE 110 |
38 | 41 | #endif |
39 | 42 | #endif |
@@ -23,6 +23,7 @@ | ||
23 | 23 | |
24 | 24 | #include "stdafx.h" |
25 | 25 | #include "WV_App.h" |
26 | +#include "resource.h" | |
26 | 27 | #include "WV_Loader.h" |
27 | 28 | |
28 | 29 | #include "RAM.h" |
@@ -33,6 +34,8 @@ | ||
33 | 34 | Path_FileName[0] = 0; |
34 | 35 | szSelectedDir[0] = 0; |
35 | 36 | |
37 | + RightGroups_Hwnd = nullptr; | |
38 | + | |
36 | 39 | NameCount = 0; |
37 | 40 | } |
38 | 41 |
@@ -274,8 +277,8 @@ | ||
274 | 277 | HBITMAP hbm; |
275 | 278 | HDC hDC; |
276 | 279 | |
277 | - //PreviewWnd = GetDlgItem(App->CL_Groups->RightGroups_Hwnd, IDC_BASETEXTURE2); | |
278 | - hDC = NULL;// GetDC(PreviewWnd); | |
280 | + PreviewWnd = GetDlgItem(RightGroups_Hwnd, IDC_BASETEXTURE2); | |
281 | + hDC = GetDC(PreviewWnd); | |
279 | 282 | hbm = CreateHBitmapFromgeBitmap(Bitmap, hDC); |
280 | 283 | |
281 | 284 | App->CL_Model->Group[GroupIndex]->Base_Bitmap = hbm; |
@@ -441,3 +444,61 @@ | ||
441 | 444 | |
442 | 445 | return 0; |
443 | 446 | } |
447 | + | |
448 | +// ************************************************************************* | |
449 | +// * Start_Groups * | |
450 | +// ************************************************************************* | |
451 | +bool WV_Loader::Start_Groups_Dialog() | |
452 | +{ | |
453 | + RightGroups_Hwnd = CreateDialog(App->hInst, (LPCTSTR)IDD_RIGHTGROUPS, App->MainHwnd, (DLGPROC)Groups_Proc); | |
454 | + ShowWindow(RightGroups_Hwnd, 0); | |
455 | + return 1; | |
456 | +} | |
457 | + | |
458 | +// ************************************************************************* | |
459 | +// * Groups_Proc Terry Bernie * | |
460 | +// ************************************************************************* | |
461 | +LRESULT CALLBACK WV_Loader::Groups_Proc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam) | |
462 | +{ | |
463 | + switch (message) | |
464 | + { | |
465 | + case WM_INITDIALOG: | |
466 | + { | |
467 | + | |
468 | + } | |
469 | + | |
470 | + case WM_CTLCOLORSTATIC: | |
471 | + { | |
472 | + | |
473 | + return FALSE; | |
474 | + } | |
475 | + | |
476 | + case WM_CTLCOLORDLG: | |
477 | + { | |
478 | + return (LONG)App->AppBackground; | |
479 | + } | |
480 | + | |
481 | + case WM_CLOSE: | |
482 | + { | |
483 | + /*ShowWindow(App->CL_Groups->RightGroups_Hwnd, 0); | |
484 | + App->CL_Groups->RightGroups_Visable = 0; | |
485 | + CheckMenuItem(App->mMenu, ID_WINDOWS_GROUPS, MF_BYCOMMAND | MF_UNCHECKED);*/ | |
486 | + break; | |
487 | + } | |
488 | + | |
489 | + | |
490 | + case WM_NOTIFY: | |
491 | + { | |
492 | + | |
493 | + | |
494 | + return CDRF_DODEFAULT; | |
495 | + } | |
496 | + | |
497 | + case WM_COMMAND: | |
498 | + { | |
499 | + | |
500 | + } | |
501 | + | |
502 | + } | |
503 | + return FALSE; | |
504 | +} |
@@ -31,6 +31,7 @@ | ||
31 | 31 | WV_Loader(void); |
32 | 32 | ~WV_Loader(void); |
33 | 33 | |
34 | + bool Start_Groups_Dialog(); | |
34 | 35 | bool Open_File_Model(const char* Extension, const char* Title, const char* StartDirectory); |
35 | 36 | bool Read_Project_File(char* Path_And_File); |
36 | 37 | void Load_File_Wepf(); |
@@ -49,6 +50,8 @@ | ||
49 | 50 | |
50 | 51 | protected: |
51 | 52 | |
53 | + static LRESULT CALLBACK Groups_Proc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam); | |
54 | + | |
52 | 55 | bool LoadTextures_TXL(); |
53 | 56 | void Copy_Texture_Names(); |
54 | 57 | int Check_for_Textures(geVFile* BaseFile); |
@@ -57,6 +60,7 @@ | ||
57 | 60 | HBITMAP CreateHBitmapFromgeBitmap(geBitmap* Bitmap, HDC hdc); |
58 | 61 | |
59 | 62 | int NameCount; |
63 | + HWND RightGroups_Hwnd; | |
60 | 64 | |
61 | 65 | std::vector<Char_type2> BitMap_Names; |
62 | 66 |
@@ -76,8 +76,8 @@ | ||
76 | 76 | } |
77 | 77 | |
78 | 78 | App->SetMainWinCentre(); |
79 | + App->CL_Loader->Start_Groups_Dialog(); | |
79 | 80 | |
80 | - | |
81 | 81 | SetTimer(App->MainHwnd, 1, 1, NULL); |
82 | 82 | |
83 | 83 | HACCEL hAccelTable = LoadAccelerators(hInstance, MAKEINTRESOURCE(IDC_WORLDVIEWER)); |