/************************************************************************* constructor *************************************************************************/ MouseCursor::MouseCursor(void) : d_geometry(&System::getSingleton().getRenderer()->createGeometryBuffer()) { const Rect screenArea(Vector2(0, 0), System::getSingleton().getRenderer()->getDisplaySize()); d_geometry->setClippingRegion(screenArea); // mouse defaults to middle of the constrained area d_position.d_x = screenArea.getWidth() / 2; d_position.d_y = screenArea.getHeight() / 2; // default constraint is to whole screen setConstraintArea(&screenArea); // mouse defaults to visible d_visible = true; // no default image though d_cursorImage = 0; char addr_buff[32]; sprintf(addr_buff, "(%p)", static_cast<void*>(this)); Logger::getSingleton().logEvent( "CEGUI::MouseCursor singleton created. " + String(addr_buff)); }
/************************************************************************* constructor *************************************************************************/ MouseCursor::MouseCursor(void) { Rect screenArea(System::getSingleton().getRenderer()->getRect()); // mouse defaults to middle of the constrained area d_position.d_x = screenArea.getWidth() / 2; d_position.d_y = screenArea.getHeight() / 2; d_position.d_z = 1.0f; // default constraint is to whole screen setConstraintArea(&screenArea); // mouse defaults to visible d_visible = true; // no default image though d_cursorImage = NULL; // set default colour rect d_colourRect.setColours(colour(1.0f, 1.0f, 1.0f)); // add events addMouseCursorEvents(); Logger::getSingleton().logEvent((utf8*)"CEGUI::MouseCursor singleton created."); }