GameDirectorSB 25-01-23 Light Entity
@@ -190,7 +190,7 @@ | ||
190 | 190 | CursorPosX = 500; |
191 | 191 | CursorPosY = 500; |
192 | 192 | |
193 | - Debug_App = 0; | |
193 | + Debug_App = 1; | |
194 | 194 | |
195 | 195 | EquityDirecory_FullPath[0] = 0; |
196 | 196 | ETemp_Folder[0] = 0; |
@@ -109,9 +109,9 @@ | ||
109 | 109 | Object->S_Light[0]->light = App->SBC_Ogre->mSceneMgr->createLight(buf); |
110 | 110 | |
111 | 111 | Object->S_Light[0]->light->setType(Light::LT_SPOTLIGHT); |
112 | - Object->S_Light[0]->light->setDiffuseColour(0, 0, 1.0); | |
112 | + Object->S_Light[0]->light->setDiffuseColour(ColourValue::White); | |
113 | 113 | Object->S_Light[0]->light->setSpecularColour(ColourValue::White); |
114 | - Object->S_Light[0]->light->setSpotlightRange(Degree(35), Degree(50)); | |
114 | + Object->S_Light[0]->light->setSpotlightRange(Degree(5), Degree(10)); | |
115 | 115 | |
116 | 116 | Ogre::SceneNode* PartNode = App->SBC_Ogre->mSceneMgr->getRootSceneNode()->createChildSceneNode(); |
117 | 117 |
@@ -128,7 +128,7 @@ | ||
128 | 128 | |
129 | 129 | Object->Object_Node->setScale(Object->Mesh_Scale); |
130 | 130 | Object->Object_Node->setOrientation(Object->Mesh_Quat); |
131 | - | |
131 | + Object->Object_Node->setScale(0.02, 0.02, 0.02); | |
132 | 132 | } |
133 | 133 | |
134 | 134 |
@@ -950,11 +950,11 @@ | ||
950 | 950 | { |
951 | 951 | App->SBC_FileView->Context_Selection = Enums::FileView_Light_File; |
952 | 952 | |
953 | - //HideRightPanes(); | |
954 | - //ShowWindow(App->GD_Properties_Hwnd, 1); | |
953 | + HideRightPanes(); | |
954 | + ShowWindow(App->GD_Properties_Hwnd, 1); | |
955 | 955 | |
956 | 956 | //App->SBC_Props_Dialog->Hide_Details_Goto_Dlg(1); |
957 | - //App->SBC_Props_Dialog->Hide_Dimensions_Dlg(1, App->SBC_Scene->B_Object[Index]->Dimensions_Locked); | |
957 | + App->SBC_Props_Dialog->Hide_Dimensions_Dlg(1, App->SBC_Scene->B_Object[Index]->Dimensions_Locked); | |
958 | 958 | |
959 | 959 | App->SBC_Properties->Edit_Category = Enums::Edit_Lights; |
960 | 960 |
@@ -966,7 +966,7 @@ | ||
966 | 966 | |
967 | 967 | App->SBC_Visuals->MarkerBB_Addjust(Index); |
968 | 968 | |
969 | - //App->SBC_Properties->Update_ListView_Particles(); | |
969 | + App->SBC_Properties->Update_ListView_Lights(); | |
970 | 970 | |
971 | 971 | return; |
972 | 972 | } |
@@ -364,6 +364,16 @@ | ||
364 | 364 | return; |
365 | 365 | } |
366 | 366 | |
367 | + // Lights | |
368 | + if (Edit_Category == Enums::Edit_Lights) | |
369 | + { | |
370 | + if (Edit_Physics == 0) | |
371 | + { | |
372 | + Edit_Light_Onclick(lParam); | |
373 | + } | |
374 | + return; | |
375 | + } | |
376 | + | |
367 | 377 | return; |
368 | 378 | } |
369 | 379 |
@@ -1224,6 +1234,64 @@ | ||
1224 | 1234 | } |
1225 | 1235 | |
1226 | 1236 | // ************************************************************************* |
1237 | +// * Update_ListView_Lights:- Terry and Hazel Flanigan 2023 * | |
1238 | +// ************************************************************************* | |
1239 | +bool SB_Properties::Update_ListView_Lights() | |
1240 | +{ | |
1241 | + | |
1242 | + int index = App->SBC_Properties->Current_Selected_Object; | |
1243 | + | |
1244 | + char Num[10]; | |
1245 | + char chr_ID[50]; | |
1246 | + char IndexNum[10]; | |
1247 | + _itoa(App->SBC_Scene->B_Object[index]->This_Object_UniqueID, Num, 10); | |
1248 | + _itoa(index, IndexNum, 10); | |
1249 | + strcpy(chr_ID, "Unique ID "); | |
1250 | + strcat(chr_ID, Num); | |
1251 | + strcat(chr_ID, " Object Index "); | |
1252 | + strcat(chr_ID, IndexNum); | |
1253 | + SetWindowText(Properties_Dlg_hWnd, chr_ID); | |
1254 | + SetDlgItemText(Properties_Dlg_hWnd, IDC_STOBJECTNAME, (LPCTSTR)App->SBC_Scene->B_Object[index]->Mesh_Name); | |
1255 | + | |
1256 | + char chr_PosX[100]; | |
1257 | + sprintf(chr_PosX, "%.3f", App->SBC_Scene->B_Object[index]->Mesh_Pos.x); | |
1258 | + char chr_PosY[100]; | |
1259 | + sprintf(chr_PosY, "%.3f", App->SBC_Scene->B_Object[index]->Mesh_Pos.y); | |
1260 | + | |
1261 | + const int NUM_ITEMS = 5; | |
1262 | + const int NUM_COLS = 2; | |
1263 | + string grid[NUM_COLS][NUM_ITEMS]; // string table | |
1264 | + LV_ITEM pitem; | |
1265 | + memset(&pitem, 0, sizeof(LV_ITEM)); | |
1266 | + pitem.mask = LVIF_TEXT; | |
1267 | + | |
1268 | + grid[0][0] = "Name", grid[1][0] = App->SBC_Scene->B_Object[index]->Mesh_Name; | |
1269 | + grid[0][1] = "Particle", grid[1][1] = App->SBC_Scene->B_Object[index]->Mesh_Name; | |
1270 | + grid[0][2] = " ", grid[1][2] = " "; | |
1271 | + grid[0][3] = "PosX", grid[1][3] = chr_PosX; | |
1272 | + grid[0][4] = "PosY", grid[1][4] = chr_PosY; | |
1273 | + | |
1274 | + ListView_DeleteAllItems(Properties_hLV); | |
1275 | + | |
1276 | + for (DWORD row = 0; row < NUM_ITEMS; row++) | |
1277 | + { | |
1278 | + pitem.iItem = row; | |
1279 | + pitem.pszText = const_cast<char*>(grid[0][row].c_str()); | |
1280 | + ListView_InsertItem(Properties_hLV, &pitem); | |
1281 | + | |
1282 | + //ListView_SetItemText | |
1283 | + | |
1284 | + for (DWORD col = 1; col < NUM_COLS; col++) | |
1285 | + { | |
1286 | + ListView_SetItemText(Properties_hLV, row, col, | |
1287 | + const_cast<char*>(grid[col][row].c_str())); | |
1288 | + } | |
1289 | + } | |
1290 | + | |
1291 | + return 1; | |
1292 | +} | |
1293 | + | |
1294 | +// ************************************************************************* | |
1227 | 1295 | // * Update_ListView_Particles:- Terry and Hazel Flanigan 2022 * |
1228 | 1296 | // ************************************************************************* |
1229 | 1297 | bool SB_Properties::Update_ListView_Particles() |
@@ -1307,6 +1375,69 @@ | ||
1307 | 1375 | } |
1308 | 1376 | |
1309 | 1377 | // ************************************************************************* |
1378 | +// * Edit_Light_Onclick:- Terry and Hazel Flanigan 2022 * | |
1379 | +// ************************************************************************* | |
1380 | +void SB_Properties::Edit_Light_Onclick(LPARAM lParam) | |
1381 | +{ | |
1382 | + int Index = App->SBC_Properties->Current_Selected_Object; | |
1383 | + int result = 1; | |
1384 | + int test; | |
1385 | + | |
1386 | + LPNMLISTVIEW poo = (LPNMLISTVIEW)lParam; | |
1387 | + test = poo->iItem; | |
1388 | + ListView_GetItemText(Properties_hLV, test, 0, btext, 20); | |
1389 | + | |
1390 | + result = strcmp(btext, "Name"); | |
1391 | + if (result == 0) | |
1392 | + { | |
1393 | + App->SBC_Object->Rename_Object(Index); | |
1394 | + Update_ListView_Particles(); | |
1395 | + } | |
1396 | + | |
1397 | + result = strcmp(btext, "PosX"); | |
1398 | + if (result == 0) | |
1399 | + { | |
1400 | + | |
1401 | + App->SBC_Gui_Dialogs->Start_Dialog_Float(1, App->SBC_Scene->B_Object[Index]->Mesh_Pos.x, "Pos X"); | |
1402 | + | |
1403 | + while (App->SBC_Gui_Dialogs->Show_Dialog_Float == 1) | |
1404 | + { | |
1405 | + App->SBC_Gui_Dialogs->BackGround_Render_Loop(); | |
1406 | + | |
1407 | + App->SBC_Scene->B_Object[Index]->Mesh_Pos.x = App->SBC_Gui_Dialogs->m_Dialog_Float; | |
1408 | + App->SBC_Scene->B_Object[Index]->Object_Node->setPosition(App->SBC_Scene->B_Object[Index]->Mesh_Pos); | |
1409 | + | |
1410 | + } | |
1411 | + | |
1412 | + App->Disable_Panels(false); | |
1413 | + | |
1414 | + Update_ListView_Lights(); | |
1415 | + } | |
1416 | + | |
1417 | + result = strcmp(btext, "PosY"); | |
1418 | + if (result == 0) | |
1419 | + { | |
1420 | + | |
1421 | + App->SBC_Gui_Dialogs->Start_Dialog_Float(1, App->SBC_Scene->B_Object[Index]->Mesh_Pos.y, "Pos Y"); | |
1422 | + | |
1423 | + while (App->SBC_Gui_Dialogs->Show_Dialog_Float == 1) | |
1424 | + { | |
1425 | + App->SBC_Gui_Dialogs->BackGround_Render_Loop(); | |
1426 | + | |
1427 | + App->SBC_Scene->B_Object[Index]->Mesh_Pos.y = App->SBC_Gui_Dialogs->m_Dialog_Float; | |
1428 | + App->SBC_Scene->B_Object[Index]->Object_Node->setPosition(App->SBC_Scene->B_Object[Index]->Mesh_Pos); | |
1429 | + | |
1430 | + } | |
1431 | + | |
1432 | + App->Disable_Panels(false); | |
1433 | + | |
1434 | + Update_ListView_Lights(); | |
1435 | + } | |
1436 | + | |
1437 | + | |
1438 | +} | |
1439 | + | |
1440 | +// ************************************************************************* | |
1310 | 1441 | // * Edit_Particle_Onclick:- Terry and Hazel Flanigan 2022 * |
1311 | 1442 | // ************************************************************************* |
1312 | 1443 | void SB_Properties::Edit_Particle_Onclick(LPARAM lParam) |
@@ -49,6 +49,7 @@ | ||
49 | 49 | bool Update_ListView_Counters(); |
50 | 50 | bool Update_ListView_Environs(); |
51 | 51 | bool Update_ListView_Particles(); |
52 | + bool Update_ListView_Lights(); | |
52 | 53 | |
53 | 54 | void Reset_Last_Selected_Object(int Index); |
54 | 55 |
@@ -89,6 +90,7 @@ | ||
89 | 90 | bool Edit_Counters_OnClick(LPARAM lParam); |
90 | 91 | bool Edit_Environs_OnClick(LPARAM lParam); |
91 | 92 | void Edit_Particle_Onclick(LPARAM lParam); |
93 | + void Edit_Light_Onclick(LPARAM lParam); | |
92 | 94 | |
93 | 95 | |
94 | 96 | char btext[20]; // ListView_GetItemText Text Holder for Compare [041221] |