Drawing Boxes
Code
orxSTATUS orxFASTCALL RenderEventHandler(const orxEVENT *_pstEvent) {
if (_pstEvent->eType == orxEVENT_TYPE_RENDER){
if(_pstEvent->eID == orxRENDER_EVENT_STOP){
orxVECTOR topLeft = { -100, -50, 0 };
orxVECTOR size = { 200, 100, 0 };
orxOBOX boxArea;
orxVECTOR pivot = { 0, 0, 0 };
orxRGBA colour;
colour.u8R = 0;
colour.u8G = 255;
colour.u8B = 128;
colour.u8A = 50;
orxOBox_2DSet(&boxArea, &topLeft, &pivot, &size, 0);
orxDisplay_DrawOBox( &boxArea, colour, orxTRUE);
}
}
return orxSTATUS_SUCCESS;
}
orxSTATUS orxFASTCALL Init()
{
...
orxEvent_AddHandler(orxEVENT_TYPE_RENDER, RenderEventHandler);
...