gui_actions.cpp

changeset 175
b094d5e9d6e0
parent 172
a65547b84ef8
child 177
4cdd408f2863
equal deleted inserted replaced
174:963697b36118 175:b094d5e9d6e0
453 for (LDObject* obj : g_win->sel ()) 453 for (LDObject* obj : g_win->sel ())
454 obj->setHidden (!obj->hidden ()); 454 obj->setHidden (!obj->hidden ());
455 455
456 g_win->refresh (); 456 g_win->refresh ();
457 } 457 }
458
459 // =============================================================================
460 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
461 // =============================================================================
462 // Debug things
463 #ifndef RELEASE
464 MAKE_ACTION (addTestQuad, "Add Test Quad", "add-quad", "Adds a test quad.", (0)) {
465 LDQuad* pQuad = new LDQuad;
466 pQuad->dColor = rand () % 24;
467 pQuad->vaCoords[0] = { 1.0f, 0.0f, 1.0f};
468 pQuad->vaCoords[1] = {-1.0f, 0.0f, 1.0f};
469 pQuad->vaCoords[2] = {-1.0f, 0.0f, -1.0f};
470 pQuad->vaCoords[3] = { 1.0f, 0.0f, -1.0f};
471
472 g_curfile->insertObj (g_win->getInsertionPoint (), pQuad);
473 History::addEntry (new AddHistory ({(ulong)pQuad->getIndex (g_curfile)}, {pQuad->clone ()}));
474 g_win->refresh ();
475 }
476
477 MAKE_ACTION (addTestRadial, "Add Test Radial", "add-radial", "Adds a test radial.", (0)) {
478 LDRadial* pRad = new LDRadial;
479 pRad->eRadialType = LDRadial::Cone;
480 pRad->mMatrix = g_identity;
481 pRad->vPosition = vertex (0, 0, 0);
482 pRad->dColor = rand () % 24;
483 pRad->dDivisions = 16;
484 pRad->dRingNum = 2;
485 pRad->dSegments = 16;
486
487 g_curfile->insertObj (g_win->getInsertionPoint (), pRad);
488 History::addEntry (new AddHistory ({(ulong)pRad->getIndex (g_curfile)}, {pRad->clone ()}));
489 g_win->refresh ();
490 }
491
492 #endif // RELEASE

mercurial