Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Nov 28, 2016, 7:21:35 PM (7 years ago)
Author:
patricwi
Message:

linker problem solved, visuals work as long as only 1 item is picked up.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/HUD_HS16/src/modules/overlays/hud/HUDPickupItem.cc

    r11305 r11314  
    5252        overlayElement_ = static_cast<Ogre::PanelOverlayElement* >(Ogre::OverlayManager::getSingleton().createOverlayElement("Panel", "HUDPickupItem" + getUniqueNumberString()));
    5353       
    54         overlayElement_->setPosition(0.0f,0.0f);
    55         overlayElement_->setDimensions(0.5f,0.5f);
    56         this->background_->addChild(overlayElement_);
     54        overlayElement_->setDimensions(0.1f,0.1f);
     55       
    5756    }
    5857
     
    6564    }
    6665
    67     void HUDPickupItem::initializeMaterial(const std::string& s)
    68     {
     66    void HUDPickupItem::initializeMaterial(const std::string& s, float x, float y)
     67    {
     68        orxout() << "material name is: " << s << endl;
    6969        overlayElement_->setMaterialName(s);
    70     }
    71 
    72     void HUDPickupItem::printHello()
    73     {
    74         orxout() << "lets say hello" << endl;
     70        overlayElement_->setPosition(x, y);
     71        overlayElement_->show();
     72        this->background_->addChild(overlayElement_);
     73    }
     74
     75    void HUDPickupItem::hideMe()
     76    {
     77        orxout() << this << " has called hide" << endl;
     78        overlayElement_->hide();
     79        overlayElement_->_update();
     80        orxout() << "after the call the element is visible: " << overlayElement_->isVisible() << endl;
    7581    }
    7682
Note: See TracChangeset for help on using the changeset viewer.