• R/O
  • SSH
  • HTTPS

gdx64: Commit


Commit MetaInfo

Revision262 (tree)
Time2020-01-13 22:20:45
Authorhgtterry

Log Message

Basic Shapes 1.9 Textures 130120

Change Summary

Incremental Difference

--- Basic_Shapes/Ogre_Basic/Ogre_Basic/GD19_App.cpp (revision 261)
+++ Basic_Shapes/Ogre_Basic/Ogre_Basic/GD19_App.cpp (revision 262)
@@ -38,11 +38,14 @@
3838 Cl_ToOgre = nullptr;
3939 Cl_Export_Ogre3D = nullptr;
4040 Cl_Textures = nullptr;
41+ Cl_Right_Groups = nullptr;
4142
4243 Fdlg = nullptr;
4344 hInst = nullptr;
4445 MainHwnd = nullptr;
4546 mMenu = nullptr;
47+ RightGroups_Hwnd = nullptr;
48+ ViewGLhWnd = nullptr;
4649
4750 AppBackground = NULL;
4851 DialogBackGround = NULL;
@@ -89,8 +92,6 @@
8992 Font_CB15 = 0;
9093 Font_Arial20 = 0;
9194
92- ViewGLhWnd = nullptr;
93-
9495 OgreStarted = 0;
9596 Start_Scene_Loaded = 0;
9697 RenderBackGround = 0;
@@ -118,6 +119,7 @@
118119 Cl_ToOgre = new GD_ToOgre();
119120 Cl_Export_Ogre3D = new GD_Export_Ogre3D();
120121 Cl_Textures = new GD_Textures();
122+ Cl_Right_Groups = new GD_Right_Groups();
121123
122124 SetBrushes_Fonts();
123125
@@ -231,8 +233,6 @@
231233 SetWindowText(hDlg, TitleBar);
232234 }
233235
234-
235-
236236 // *************************************************************************
237237 // * Say *
238238 // *************************************************************************
@@ -253,12 +253,142 @@
253253 MessageBox(MainHwnd, buf, "Equity Notice", MB_OK);
254254 }
255255
256+// *************************************************************************
257+// * Custom_Button Terry Bernie *
258+// *************************************************************************
259+bool GD19_App::Custom_Button_Toggle(LPNMCUSTOMDRAW item, bool Toggle)
260+{
261+ static HBRUSH defaultbrush = NULL;
262+ static HBRUSH hotbrush = NULL;
263+ static HBRUSH selectbrush = NULL;
256264
265+ {
266+ if (item->uItemState & CDIS_HOT) //Our mouse is over the button
267+ {
268+ //Select our color when the mouse hovers our button
257269
270+ if (Toggle == 1)
271+ {
272+ hotbrush = App->Cl_Right_Groups->CreateGradientBrush(RGB(0, 200, 0), RGB(0, 200, 0), item);
273+ }
274+ else
275+ {
276+ hotbrush = App->AppBackground;
277+ }
258278
279+ HPEN pen = CreatePen(PS_INSIDEFRAME, 0, RGB(0, 0, 0));
259280
281+ HGDIOBJ old_pen = SelectObject(item->hdc, pen);
282+ HGDIOBJ old_brush = SelectObject(item->hdc, hotbrush);
260283
284+ RoundRect(item->hdc, item->rc.left, item->rc.top, item->rc.right, item->rc.bottom, 7, 7);
261285
286+ SelectObject(item->hdc, old_pen);
287+ SelectObject(item->hdc, old_brush);
288+ DeleteObject(pen);
262289
290+ return CDRF_DODEFAULT;
291+ }
263292
293+ //Select our color when our button is doing nothing
264294
295+ if (Toggle == 1)
296+ {
297+ defaultbrush = App->Brush_Green;
298+ }
299+ else
300+ {
301+ defaultbrush = App->Brush_White;
302+ }
303+
304+ HPEN pen = CreatePen(PS_INSIDEFRAME, 0, RGB(0, 0, 0));
305+
306+ HGDIOBJ old_pen = SelectObject(item->hdc, pen);
307+ HGDIOBJ old_brush = SelectObject(item->hdc, defaultbrush);
308+
309+ RoundRect(item->hdc, item->rc.left, item->rc.top, item->rc.right, item->rc.bottom, 7, 7);
310+
311+ SelectObject(item->hdc, old_pen);
312+ SelectObject(item->hdc, old_brush);
313+ DeleteObject(pen);
314+
315+ return CDRF_DODEFAULT;
316+ }
317+
318+ return CDRF_DODEFAULT;
319+}
320+
321+// *************************************************************************
322+// * Custom_Button_Normal Terry Bernie *
323+// *************************************************************************
324+bool GD19_App::Custom_Button_Normal(LPNMCUSTOMDRAW item)
325+{
326+ {
327+ if (item->uItemState & CDIS_SELECTED) // Push Down
328+ {
329+ //Create pen for button border
330+ HPEN pen = CreatePen(PS_INSIDEFRAME, 0, RGB(0, 0, 0));
331+
332+ //Select our brush into hDC
333+ HGDIOBJ old_pen = SelectObject(item->hdc, pen);
334+ HGDIOBJ old_brush = SelectObject(item->hdc, App->Brush_But_Pressed);
335+
336+ RoundRect(item->hdc, item->rc.left, item->rc.top, item->rc.right, item->rc.bottom, 5, 5);
337+
338+ //Clean up
339+ SelectObject(item->hdc, old_pen);
340+ SelectObject(item->hdc, old_brush);
341+ DeleteObject(pen);
342+
343+ return CDRF_DODEFAULT;
344+ }
345+ else
346+ {
347+ if (item->uItemState & CDIS_HOT) //Our mouse is over the button
348+ {
349+
350+ HPEN pen = CreatePen(PS_INSIDEFRAME, 0, RGB(0, 0, 0));
351+
352+ HGDIOBJ old_pen = SelectObject(item->hdc, pen);
353+ HGDIOBJ old_brush = SelectObject(item->hdc, App->Brush_But_Hover);
354+
355+ RoundRect(item->hdc, item->rc.left, item->rc.top, item->rc.right, item->rc.bottom, 5, 5);
356+
357+ SelectObject(item->hdc, old_pen);
358+ SelectObject(item->hdc, old_brush);
359+ DeleteObject(pen);
360+
361+ return CDRF_DODEFAULT;
362+ }
363+
364+ HPEN pen = CreatePen(PS_INSIDEFRAME, 0, RGB(0, 0, 0)); // Idel
365+
366+ HGDIOBJ old_pen = SelectObject(item->hdc, pen);
367+ HGDIOBJ old_brush = SelectObject(item->hdc, App->Brush_But_Normal);
368+
369+ RoundRect(item->hdc, item->rc.left, item->rc.top, item->rc.right, item->rc.bottom, 7, 7);
370+
371+ SelectObject(item->hdc, old_pen);
372+ SelectObject(item->hdc, old_brush);
373+ DeleteObject(pen);
374+
375+ return CDRF_DODEFAULT;
376+ }
377+
378+ return CDRF_DODEFAULT;
379+ }
380+
381+ return CDRF_DODEFAULT;
382+}
383+
384+
385+
386+
387+
388+
389+
390+
391+
392+
393+
394+
--- Basic_Shapes/Ogre_Basic/Ogre_Basic/GD19_App.h (revision 261)
+++ Basic_Shapes/Ogre_Basic/Ogre_Basic/GD19_App.h (revision 262)
@@ -34,6 +34,7 @@
3434 #include "GD_ToOgre.h"
3535 #include "GD_Export_Ogre3D.h"
3636 #include "GD_Textures.h"
37+#include "GD_Right_Groups.h"
3738
3839
3940 class GD19_App
@@ -52,6 +53,7 @@
5253 GD_ToOgre* Cl_ToOgre;
5354 GD_Export_Ogre3D* Cl_Export_Ogre3D;
5455 GD_Textures* Cl_Textures;
56+ GD_Right_Groups* Cl_Right_Groups;
5557
5658 GD19_App(void);
5759 ~GD19_App(void);
@@ -64,6 +66,8 @@
6466
6567 void Say(const char* Message);
6668 void Say_Int(int Value);
69+ bool Custom_Button_Toggle(LPNMCUSTOMDRAW item, bool Toggle);
70+ bool Custom_Button_Normal(LPNMCUSTOMDRAW item);
6771
6872 bool Start_Scene_Loaded;
6973 bool RenderBackGround;
@@ -72,6 +76,8 @@
7276 HWND Fdlg;
7377 HINSTANCE hInst;
7478 HWND MainHwnd;
79+
80+ HWND RightGroups_Hwnd;
7581
7682
7783 HWND ViewGLhWnd;
--- Basic_Shapes/Ogre_Basic/Ogre_Basic/GD_Right_Groups.cpp (nonexistent)
+++ Basic_Shapes/Ogre_Basic/Ogre_Basic/GD_Right_Groups.cpp (revision 262)
@@ -0,0 +1,503 @@
1+#include "StdAfx.h"
2+#include "resource.h"
3+#include "GD19_App.h"
4+#include "GD_Right_Groups.h"
5+
6+#pragma warning( disable : 4800)
7+
8+GD_Right_Groups::GD_Right_Groups(void)
9+{
10+ Sel_BaseBitmap = NULL;
11+ BasePicWidth = 100;
12+ BasePicHeight = 100;
13+ SelectedGroup = 0;
14+ CK_ShowGroupOnly = 0;
15+ CK_HideGroup = 0;
16+
17+ g_pOldProc = NULL;
18+}
19+
20+
21+GD_Right_Groups::~GD_Right_Groups(void)
22+{
23+}
24+
25+// *************************************************************************
26+// * Default_ClassData Terry Bernie *
27+// *************************************************************************
28+void GD_Right_Groups::SetDefault_ClassData(void)
29+{
30+ Sel_BaseBitmap = NULL;
31+ BasePicWidth = 100;
32+ BasePicHeight = 100;
33+ SelectedGroup = 0;
34+ CK_ShowGroupOnly = 0;
35+ CK_HideGroup = 0;
36+}
37+
38+// *************************************************************************
39+// * CreateGradientBrush *
40+// *************************************************************************
41+HBRUSH GD_Right_Groups::CreateGradientBrush(COLORREF top, COLORREF bottom, LPNMCUSTOMDRAW item)
42+ {
43+ HBRUSH Brush = NULL;
44+ HDC hdcmem = CreateCompatibleDC(item->hdc);
45+ HBITMAP hbitmap = CreateCompatibleBitmap(item->hdc, item->rc.right-item->rc.left, item->rc.bottom-item->rc.top);
46+ SelectObject(hdcmem, hbitmap);
47+
48+ int r1 = GetRValue(top), r2 = GetRValue(bottom), g1 = GetGValue(top), g2 = GetGValue(bottom), b1 = GetBValue(top), b2 = GetBValue(bottom);
49+ for(int i = 0; i < item->rc.bottom-item->rc.top; i++)
50+ {
51+ RECT temp;
52+ int r,g,b;
53+ r = int(r1 + double(i * (r2-r1) / item->rc.bottom-item->rc.top));
54+ g = int(g1 + double(i * (g2-g1) / item->rc.bottom-item->rc.top));
55+ b = int(b1 + double(i * (b2-b1) / item->rc.bottom-item->rc.top));
56+ Brush = CreateSolidBrush(RGB(r, g, b));
57+ temp.left = 0;
58+ temp.top = i;
59+ temp.right = item->rc.right-item->rc.left;
60+ temp.bottom = i + 1;
61+ FillRect(hdcmem, &temp, Brush);
62+ DeleteObject(Brush);
63+ }
64+ HBRUSH pattern = CreatePatternBrush(hbitmap);
65+
66+ DeleteDC(hdcmem);
67+ DeleteObject(Brush);
68+ DeleteObject(hbitmap);
69+
70+ return pattern;
71+ }
72+
73+// *************************************************************************
74+// * Start_Groups Terry Bernie *
75+// *************************************************************************
76+void GD_Right_Groups::Start_Groups(void)
77+{
78+ App->RightGroups_Hwnd = CreateDialog(App->hInst,(LPCTSTR)IDD_RIGHTGROUPS,App->Fdlg,(DLGPROC)RP_Groups_Proc);
79+ ShowWindow(App->RightGroups_Hwnd,0);
80+}
81+// *************************************************************************
82+// * RP_Groups_Proc Terry Bernie *
83+// *************************************************************************
84+LRESULT CALLBACK GD_Right_Groups::RP_Groups_Proc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
85+{
86+ switch (message)
87+ {
88+ case WM_INITDIALOG:
89+ {
90+
91+ SendDlgItemMessage(hDlg,IDC_CHANGE, WM_SETFONT, (WPARAM)App->Font_CB15, MAKELPARAM(TRUE, 0));
92+ /*SendDlgItemMessage(hDlg,IDC_CKSHOWONLYGROUPS, WM_SETFONT, (WPARAM)App->Font_CB15, MAKELPARAM(TRUE, 0));
93+ SendDlgItemMessage(hDlg,IDC_CKHIDEGROUP, WM_SETFONT, (WPARAM)App->Font_CB15, MAKELPARAM(TRUE, 0));
94+ SendDlgItemMessage(hDlg,IDC_SHOWALLGROUPS, WM_SETFONT, (WPARAM)App->Font_CB15, MAKELPARAM(TRUE, 0));*/
95+ SendDlgItemMessage(hDlg,IDC_TEXTURENAME, WM_SETFONT, (WPARAM)App->Font_CB15, MAKELPARAM(TRUE, 0));
96+
97+ SendDlgItemMessage(hDlg,IDC_GROUPNAME, WM_SETFONT, (WPARAM)App->Font_Arial20, MAKELPARAM(TRUE, 0));
98+
99+ SetWindowLong(GetDlgItem(hDlg,IDC_BASETEXTURE),GWL_WNDPROC , (LONG)ViewerBasePic);
100+ }
101+
102+ case WM_CTLCOLORSTATIC:
103+ {
104+ if(GetDlgItem(hDlg,IDC_TEXTURENAME) == (HWND)lParam)
105+ {
106+ SetBkColor((HDC) wParam, RGB(0, 255, 0));
107+ SetTextColor((HDC) wParam, RGB(0,0,0));
108+ SetBkMode((HDC) wParam, TRANSPARENT);
109+ return (UINT) App->AppBackground;
110+ }
111+ if(GetDlgItem(hDlg,IDC_GROUPNAME) == (HWND)lParam)
112+ {
113+ SetBkColor((HDC) wParam, RGB(0, 255, 0));
114+ SetTextColor((HDC) wParam, RGB(0,0,0));
115+ SetBkMode((HDC) wParam, TRANSPARENT);
116+ return (UINT) App->AppBackground;
117+ }
118+
119+ if(GetDlgItem(hDlg,IDC_CKSHOWONLYGROUPS) == (HWND)lParam)
120+ {
121+ if (App->Cl_Right_Groups->CK_ShowGroupOnly == 0)
122+ {
123+ SetBkColor((HDC) wParam, RGB(0, 255, 0));
124+ SetTextColor((HDC) wParam, RGB(0,255,0));
125+ SetBkMode((HDC) wParam, TRANSPARENT);
126+ return (UINT) App->Brush_White;
127+ }
128+ else
129+ {
130+ SetBkColor((HDC) wParam, RGB(0, 255, 0));
131+ SetTextColor((HDC) wParam, RGB(0,255,0));
132+ SetBkMode((HDC) wParam, TRANSPARENT);
133+ return (UINT) App->Brush_Green;
134+ }
135+ }
136+
137+ if(GetDlgItem(hDlg,IDC_CKHIDEGROUP) == (HWND)lParam)
138+ {
139+ if (App->Cl_Right_Groups->CK_HideGroup == 0)
140+ {
141+ SetBkColor((HDC) wParam, RGB(0, 255, 0));
142+ SetTextColor((HDC) wParam, RGB(0,255,0));
143+ SetBkMode((HDC) wParam, TRANSPARENT);
144+ return (UINT) App->Brush_White;
145+ }
146+ else
147+ {
148+ SetBkColor((HDC) wParam, RGB(0, 255, 0));
149+ SetTextColor((HDC) wParam, RGB(0,255,0));
150+ SetBkMode((HDC) wParam, TRANSPARENT);
151+ return (UINT) App->Brush_Green;
152+ }
153+ }
154+ return FALSE;
155+ }
156+
157+ case WM_CTLCOLORDLG:
158+ {
159+ return (LONG)App->AppBackground;
160+ }
161+
162+ case WM_CLOSE:
163+ {
164+ ShowWindow(App->RightGroups_Hwnd,0);
165+
166+ break;
167+ }
168+ case WM_NOTIFY:
169+ {
170+ LPNMHDR some_item = (LPNMHDR)lParam;
171+
172+ if (some_item->idFrom == IDC_CKSHOWONLYGROUPS && some_item->code == NM_CUSTOMDRAW)
173+ {
174+ LPNMCUSTOMDRAW item = (LPNMCUSTOMDRAW)some_item;
175+ App->Custom_Button_Toggle(item,App->Cl_Right_Groups->CK_ShowGroupOnly);
176+ return CDRF_DODEFAULT;
177+ }
178+
179+ if (some_item->idFrom == IDC_CKHIDEGROUP && some_item->code == NM_CUSTOMDRAW)
180+ {
181+ LPNMCUSTOMDRAW item = (LPNMCUSTOMDRAW)some_item;
182+ App->Custom_Button_Toggle(item,App->Cl_Right_Groups->CK_HideGroup);
183+ return CDRF_DODEFAULT;
184+ }
185+
186+ if (some_item->idFrom == IDC_CHANGE && some_item->code == NM_CUSTOMDRAW)
187+ {
188+ LPNMCUSTOMDRAW item = (LPNMCUSTOMDRAW)some_item;
189+ App->Custom_Button_Normal(item);
190+ return CDRF_DODEFAULT;
191+ }
192+
193+ return CDRF_DODEFAULT;
194+ }
195+
196+ case WM_COMMAND:
197+ {
198+ if (LOWORD(wParam) == IDC_CHANGE)
199+ {
200+ ///App->CL_Right_Groups->ChangeTexture_ModelLocation();
201+ return TRUE;
202+ }
203+ // ------------------------------------------------- Show All Groups
204+ if (LOWORD(wParam) == IDC_SHOWALLGROUPS)
205+ {
206+ /*HWND temp = GetDlgItem(hDlg,IDC_CKSHOWONLYGROUPS);
207+ HWND temp1 = GetDlgItem(hDlg,IDC_CKHIDEGROUP);
208+
209+ App->Cl_Right_Groups->CK_HideGroup = 0;
210+ App->Cl_Ogre->RenderListener->Show_HideGroup = 0;
211+ SendMessage(temp,BM_SETCHECK,0,0);
212+
213+ App->Cl_Right_Groups->CK_ShowGroupOnly = 0;
214+ App->Cl_Ogre->RenderListener->ShowOnlySubMesh = 0;
215+ SendMessage(temp1,BM_SETCHECK,0,0);*/
216+
217+ return TRUE;
218+ }
219+ // ------------------------------------------------- Show Only Group
220+ if (LOWORD(wParam) == IDC_CKSHOWONLYGROUPS)
221+ {
222+ /*HWND temp = GetDlgItem(hDlg,IDC_CKSHOWONLYGROUPS);
223+ HWND temp1 = GetDlgItem(hDlg,IDC_CKHIDEGROUP);
224+
225+ if (App->CL_Right_Groups->CK_ShowGroupOnly == 1)
226+ {
227+ App->CL_Right_Groups->CK_ShowGroupOnly = 0;
228+ App->Cl_Ogre->RenderListener->ShowOnlySubMesh = 0;
229+ SendMessage(temp,BM_SETCHECK,0,0);
230+ }
231+ else
232+ {
233+ App->CL_Right_Groups->CK_ShowGroupOnly = 1;
234+ App->Cl_Ogre->RenderListener->ShowOnlySubMesh = 1;
235+ SendMessage(temp,BM_SETCHECK,1,0);
236+
237+ App->CL_Right_Groups->CK_HideGroup = 0;
238+ App->Cl_Ogre->RenderListener->Show_HideGroup = 0;
239+ SendMessage(temp1,BM_SETCHECK,0,0);
240+ }*/
241+ return TRUE;
242+ }
243+ // ------------------------------------------------- Hide Group
244+ if (LOWORD(wParam) == IDC_CKHIDEGROUP)
245+ {
246+ /*HWND temp = GetDlgItem(hDlg,IDC_CKHIDEGROUP);
247+ HWND temp1 = GetDlgItem(hDlg,IDC_CKSHOWONLYGROUPS);
248+
249+ if (App->CL_Right_Groups->CK_HideGroup == 1)
250+ {
251+ App->CL_Right_Groups->CK_HideGroup = 0;
252+ App->Cl_Ogre->RenderListener->Show_HideGroup = 0;
253+ SendMessage(temp,BM_SETCHECK,0,0);
254+ }
255+ else
256+ {
257+ App->CL_Right_Groups->CK_HideGroup = 1;
258+ App->Cl_Ogre->RenderListener->Show_HideGroup = 1;
259+ SendMessage(temp,BM_SETCHECK,1,0);
260+
261+ App->CL_Right_Groups->CK_ShowGroupOnly = 0;
262+ App->Cl_Ogre->RenderListener->ShowOnlySubMesh = 0;
263+ SendMessage(temp1,BM_SETCHECK,0,0);
264+ }*/
265+ return TRUE;
266+ }
267+ }
268+ }
269+ return FALSE;
270+}
271+
272+// *************************************************************************
273+// * ViewerBasePic Terry Bernie *
274+// *************************************************************************
275+bool CALLBACK GD_Right_Groups::ViewerBasePic(HWND hwnd,UINT msg,WPARAM wParam,LPARAM lParam)
276+{
277+ if (msg == WM_PAINT)
278+ {
279+ PAINTSTRUCT ps;
280+ HDC hDC;
281+ RECT Rect;
282+
283+ hDC = BeginPaint(hwnd, &ps);
284+ GetClientRect(hwnd, &Rect);
285+ Rect.left--;
286+ Rect.bottom--;
287+ FillRect(hDC, &Rect,(HBRUSH)(RGB(0,255,0)));
288+
289+ if (App->Cl_Right_Groups->Sel_BaseBitmap != NULL)
290+ {
291+ RECT Source;
292+ RECT Dest;
293+ HDC hDC;
294+
295+ Source.left = 0;
296+ Source.top = 0;
297+ Source.bottom = App->Cl_Right_Groups->BasePicHeight;
298+ Source.right = App->Cl_Right_Groups->BasePicWidth;
299+
300+ Dest = Rect;
301+
302+ hDC = GetDC(hwnd);
303+ SetStretchBltMode(hDC, HALFTONE);
304+
305+ App->Cl_Right_Groups->RP_RenderTexture_Blit(hDC,App->Cl_Right_Groups->Sel_BaseBitmap,&Source,&Dest);
306+ ReleaseDC(hwnd, hDC);
307+ }
308+ EndPaint(hwnd, &ps);
309+ return 0;
310+ }
311+ return DefWindowProc(hwnd, msg, wParam, lParam);
312+}
313+// *************************************************************************
314+// * RP_RenderTexture_Blit Terry Bernie *
315+// *************************************************************************
316+bool GD_Right_Groups::RP_RenderTexture_Blit(HDC hDC, HBITMAP Bmp, const RECT *SourceRect, const RECT *DestRect)
317+{
318+ HDC MemDC;
319+ int SourceWidth;
320+ int SourceHeight;
321+ int DestWidth;
322+ int DestHeight;
323+
324+ MemDC = CreateCompatibleDC(hDC);
325+ if (MemDC == NULL)
326+ return FALSE;
327+
328+ if(Bmp)
329+ {
330+ SelectObject(MemDC, Bmp);
331+
332+ SourceWidth = SourceRect->right - SourceRect->left;
333+ SourceHeight = SourceRect->bottom - SourceRect->top;
334+ DestWidth = DestRect->right - DestRect->left;
335+ DestHeight = DestRect->bottom - DestRect->top;
336+ SetStretchBltMode(hDC, COLORONCOLOR);
337+ StretchBlt(hDC,
338+ DestRect->left,
339+ DestRect->top,
340+ DestHeight,
341+ DestHeight,
342+ MemDC,
343+ SourceRect->left,
344+ SourceRect->top,
345+ SourceWidth,
346+ SourceHeight,
347+ SRCCOPY);
348+ }
349+
350+ DeleteDC(MemDC);
351+
352+ return TRUE;
353+}
354+
355+// *************************************************************************
356+// * Update_Dialog Terry Bernie *
357+// *************************************************************************
358+void GD_Right_Groups::Update_Dialog(int Index)
359+{
360+
361+ Sel_BaseBitmap = App->Cl_Model->S_MeshGroup[Index]->Base_Bitmap;
362+
363+ BITMAP bm;
364+ GetObject(Sel_BaseBitmap, sizeof(bm), &bm);
365+
366+ BasePicWidth = bm.bmWidth;
367+ BasePicHeight = bm.bmHeight;
368+
369+ ShowWindow(GetDlgItem(App->RightGroups_Hwnd,IDC_BASETEXTURE),0);
370+ ShowWindow(GetDlgItem(App->RightGroups_Hwnd,IDC_BASETEXTURE),1);
371+
372+
373+ SetDlgItemText(App->RightGroups_Hwnd,IDC_TEXTURENAME,(LPCTSTR)App->Cl_Model->S_MeshGroup[Index]->Text_FileName);
374+ SetDlgItemText(App->RightGroups_Hwnd,IDC_GROUPNAME,(LPCTSTR)App->Cl_Model->S_MeshGroup[Index]->GroupName);
375+
376+ /*if (Sel_BaseBitmap)
377+ {
378+ DeleteObject(Sel_BaseBitmap);
379+ Sel_BaseBitmap = NULL;
380+ }*/
381+}
382+
383+// *************************************************************************
384+// * ChangeTexture_ModelLocation Terry Bernie *
385+// *************************************************************************
386+bool GD_Right_Groups::ChangeTexture_ModelLocation(void)
387+{
388+
389+ //int test = 0;
390+ //// -------------------- OBJ
391+ //if (App->CL_Model_Data->Model_Type == LoadedFile_Assimp)
392+ //{
393+
394+ // test = App->CL_FileIO->OpenTextureFile("Equity10 Replace Texture",NULL,NULL);//App->S_ModelTexturePaths[0]->TextureFolder,1);
395+ // if (test==0){return 0;}
396+
397+ // // Render Texture
398+ // App->CL_Textures->Soil_Load_Texture(App->CL_Textures->g_Texture,App->CL_FileIO->Texture_Path_FileName,SelectedGroup);//App->S_MeshGroup[mIndex]->Soil_TextureIndex);
399+ //
400+ // // Preview Texture
401+ // strcpy(App->CL_Model_Data->S_MeshGroup[SelectedGroup]->Text_FileName,App->CL_FileIO->Texture_FileName);
402+ // strcpy(App->CL_Model_Data->S_MeshGroup[SelectedGroup]->Text_PathFileName,App->CL_FileIO->Texture_Path_FileName);
403+
404+
405+ // App->CL_Textures->TexureToWinPreviewFullPath(SelectedGroup,App->CL_FileIO->Texture_Path_FileName);
406+ // Update_Dialog(SelectedGroup);
407+
408+ // char buf[255];
409+ // strcpy(buf,App->CL_Model_Data->S_MeshGroup[SelectedGroup]->GroupName);
410+ // strcat(buf," -> ");
411+ // strcat(buf,App->CL_Model_Data->S_MeshGroup[SelectedGroup]->Text_FileName);
412+
413+ // App->CL_FileView->ChangeItem_Name(App->CL_FileView->HT_Textures_Mapped_Item[SelectedGroup],buf);
414+
415+ // return 1;
416+ //}
417+
418+ //if (App->CL_Model_Data->Model_Type == LoadedFile_Actor)
419+ //{
420+
421+ // test = App->CL_FileIO->OpenTextureFile("Equity10 Replace Texture",NULL,NULL);//App->S_ModelTexturePaths[0]->TextureFolder,1);
422+ // if (test==0){return 0;}
423+
424+ // char mFileName[1024];
425+ // strcpy(mFileName,App->CL_FileIO->Texture_Path_FileName);
426+
427+ // App->CL_Textures->Soil_Load_Texture(App->CL_Textures->g_Texture,App->CL_FileIO->Texture_Path_FileName,SelectedGroup);//App->S_MeshGroup[mIndex]->Soil_TextureIndex);
428+
429+ // strcpy(App->CL_Model_Data->S_MeshGroup[SelectedGroup]->Text_FileName,App->CL_FileIO->Texture_FileName);
430+ // strcpy(App->CL_Model_Data->S_MeshGroup[SelectedGroup]->Text_PathFileName,App->CL_FileIO->Texture_Path_FileName);
431+
432+
433+ // App->CL_Textures->TexureToWinPreviewFullPath(SelectedGroup,App->CL_FileIO->Texture_Path_FileName);
434+ // Update_Dialog(SelectedGroup);
435+
436+ // char buf[255];
437+ // strcpy(buf,App->CL_Model_Data->S_MeshGroup[SelectedGroup]->GroupName);
438+ // strcat(buf," -> ");
439+ // strcat(buf,App->CL_Model_Data->S_MeshGroup[SelectedGroup]->Text_FileName);
440+
441+ // App->CL_FileView->ChangeItem_Name(App->CL_FileView->HT_Textures_Mapped_Item[SelectedGroup],buf);
442+
443+ // if (stricmp(mFileName+strlen(mFileName)-4,".BMP") == 0)
444+ // {
445+ // App->CL_Textures->Genesis_ChangeTexture(mFileName);
446+ // }
447+ // //---------------------------------------------------------- TGA
448+ // if (stricmp(mFileName+strlen(mFileName)-4,".TGA") == 0)
449+ // {
450+ // //C_Textures->LoadTgaTexture();
451+ // }
452+ // //---------------------------------------------------------- JPG
453+ // if (stricmp(mFileName+strlen(mFileName)-4,".jpg") == 0)
454+ // {
455+ // App->CL_Textures->Texture_To_Bmp(mFileName);
456+ // App->CL_Textures->Genesis_ChangeTexture("Etemp.bmp");
457+ // remove("Etemp.bmp");
458+ // }
459+ // //---------------------------------------------------------- PNG
460+ // if (stricmp(mFileName+strlen(mFileName)-4,".png") == 0)
461+ // {
462+ // App->CL_Textures->Texture_To_Bmp(mFileName);
463+ // App->CL_Textures->Genesis_ChangeTexture("Etemp.bmp");
464+ // remove("Etemp.bmp");
465+ // }
466+ // //---------------------------------------------------------- DDS
467+ // if (stricmp(mFileName+strlen(mFileName)-4,".dds") == 0)
468+ // {
469+ // App->CL_Textures->Texture_To_Bmp(mFileName);
470+ // App->CL_Textures->Genesis_ChangeTexture("Etemp.bmp");
471+ // remove("Etemp.bmp");
472+
473+ // /*strcpy(FileName,"Etemp.tga");
474+ // C_Textures->LoadTgaTexture();
475+ // remove("Etemp.tga");*/
476+ // }
477+ // //---------------------------------------------------------- PCX
478+ // if (stricmp(mFileName+strlen(mFileName)-4,".pcx") == 0)
479+ // {
480+ // App->CL_Textures->Texture_To_Bmp(mFileName);
481+ // App->CL_Textures->Genesis_ChangeTexture("Etemp.bmp");
482+ // remove("Etemp.bmp");
483+ // }
484+
485+ // //---------------------------------------------------------- TIF
486+ // if (stricmp(mFileName+strlen(mFileName)-4,".tif") == 0)
487+ // {
488+ // App->CL_Textures->Texture_To_Bmp(mFileName);
489+ // App->CL_Textures->Genesis_ChangeTexture("Etemp.bmp");
490+ // remove("Etemp.bmp");
491+ // }
492+
493+ // //---------------------------------------------------------- TIFF
494+ // if (stricmp(mFileName+strlen(mFileName)-5,".tiff") == 0)
495+ // {
496+ // App->CL_Textures->Texture_To_Bmp(mFileName);
497+ // App->CL_Textures->Genesis_ChangeTexture("Etemp.bmp");
498+ // remove("Etemp.bmp");
499+ // }
500+ //}
501+
502+ return TRUE;
503+}
--- Basic_Shapes/Ogre_Basic/Ogre_Basic/GD_Right_Groups.h (nonexistent)
+++ Basic_Shapes/Ogre_Basic/Ogre_Basic/GD_Right_Groups.h (revision 262)
@@ -0,0 +1,37 @@
1+#pragma once
2+class GD_Right_Groups
3+{
4+public:
5+ GD_Right_Groups(void);
6+ ~GD_Right_Groups(void);
7+
8+ void SetDefault_ClassData(void);
9+
10+ void Start_Groups(void);
11+
12+ void Update_Dialog(int Index);
13+
14+ bool RP_RenderTexture_Blit(HDC hDC, HBITMAP Bmp, const RECT *SourceRect, const RECT *DestRect);
15+
16+ bool ChangeTexture_ModelLocation(void);
17+
18+ HBITMAP Sel_BaseBitmap;
19+
20+ long BasePicWidth;
21+ long BasePicHeight;
22+
23+ int SelectedGroup;
24+
25+ bool CK_ShowGroupOnly;
26+ bool CK_HideGroup;
27+
28+ WNDPROC g_pOldProc;
29+
30+ HBRUSH CreateGradientBrush(COLORREF top, COLORREF bottom, LPNMCUSTOMDRAW item);
31+
32+protected:
33+
34+ static LRESULT CALLBACK RP_Groups_Proc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam);
35+ static bool CALLBACK ViewerBasePic(HWND hwnd,UINT msg,WPARAM wParam,LPARAM lParam);
36+
37+};
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Show on old repository browser