gui_actions.cpp

changeset 153
03a7bdcce50d
parent 150
bcbbdc5454e6
child 154
cc53e5cbad54
equal deleted inserted replaced
152:552e46650a95 153:03a7bdcce50d
371 pQuad->vaCoords[0] = { 1.0f, 0.0f, 1.0f}; 371 pQuad->vaCoords[0] = { 1.0f, 0.0f, 1.0f};
372 pQuad->vaCoords[1] = {-1.0f, 0.0f, 1.0f}; 372 pQuad->vaCoords[1] = {-1.0f, 0.0f, 1.0f};
373 pQuad->vaCoords[2] = {-1.0f, 0.0f, -1.0f}; 373 pQuad->vaCoords[2] = {-1.0f, 0.0f, -1.0f};
374 pQuad->vaCoords[3] = { 1.0f, 0.0f, -1.0f}; 374 pQuad->vaCoords[3] = { 1.0f, 0.0f, -1.0f};
375 375
376 g_CurrentFile->addObject (pQuad); 376 g_CurrentFile->insertObj (g_ForgeWindow->getInsertionPoint (), pQuad);
377 History::addEntry (new AddHistory ({(ulong)pQuad->getIndex (g_CurrentFile)}, {pQuad->clone ()})); 377 History::addEntry (new AddHistory ({(ulong)pQuad->getIndex (g_CurrentFile)}, {pQuad->clone ()}));
378 g_ForgeWindow->refresh (); 378 g_ForgeWindow->refresh ();
379 } 379 }
380 380
381 MAKE_ACTION (addTestRadial, "Add Test Radial", "add-radial", "Adds a test radial.", (0)) { 381 MAKE_ACTION (addTestRadial, "Add Test Radial", "add-radial", "Adds a test radial.", (0)) {
386 pRad->dColor = rand () % 24; 386 pRad->dColor = rand () % 24;
387 pRad->dDivisions = 16; 387 pRad->dDivisions = 16;
388 pRad->dRingNum = 2; 388 pRad->dRingNum = 2;
389 pRad->dSegments = 16; 389 pRad->dSegments = 16;
390 390
391 g_CurrentFile->addObject (pRad); 391 g_CurrentFile->insertObj (g_ForgeWindow->getInsertionPoint (), pRad);
392 History::addEntry (new AddHistory ({(ulong)pRad->getIndex (g_CurrentFile)}, {pRad->clone ()})); 392 History::addEntry (new AddHistory ({(ulong)pRad->getIndex (g_CurrentFile)}, {pRad->clone ()}));
393 g_ForgeWindow->refresh (); 393 g_ForgeWindow->refresh ();
394 } 394 }
395 395
396 #endif // RELEASE 396 #endif // RELEASE

mercurial