Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
May 16, 2019, 2:27:40 PM (5 years ago)
Author:
tkuonen
Message:

Improve MouseAPI
Add Comments
Cleanup

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/MouseAPI_FS19/src/modules/MouseAPI/mouseapicursor.cc

    r12363 r12377  
    1010    cursor = static_cast<Ogre::PanelOverlayElement*>(Ogre::OverlayManager::getSingleton()
    1111                                                          .createOverlayElement("Panel", "MouseAPI_cursor_" + getUniqueNumberString()));
    12     cursor->setMaterialName(TextureGenerator::getMaterialName(
    13                                       cursorname, Ogre::ColourValue::White));
    14 
     12    updateCursor();
    1513    overlay_->add2D(this->cursor);
    1614    scale(Vector2(0.03,0.03));
     
    2220    if(running)
    2321        MouseAPI::getInstance().deactivate();
     22    if(this->isInitialized())
     23        Ogre::OverlayManager::getSingleton().destroyOverlayElement(this->cursor);
    2424}
    2525
     
    3030    SUPER(MouseAPICursor, XMLPort, xmlelement, mode);
    3131    XMLPortParam(MouseAPICursor, "cursorShape", setCursorName, getCursorName,xmlelement, mode);
    32     //XMLPortParam(MouseAPICursor, "cursorColor", setCursorColor, getCursorColor,xmlelement, mode);//TODO: ColoValue::setAsARGB()
     32    XMLPortParam(MouseAPICursor, "cursorColor", setCursorColor, getCursorColor,xmlelement, mode);
    3333}
    3434
Note: See TracChangeset for help on using the changeset viewer.