Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: code/branches/Dialog_HS16/src/modules/overlays/hud/HUDDialogue.cc @ 11317

Last change on this file since 11317 was 11317, checked in by dmoritz, 7 years ago

Picture added

File size: 1.2 KB
RevLine 
[11292]1
2
3#include "HUDDialogue.h"
4
5#include "core/XMLPort.h"
6
7#include <OgreCamera.h>
8#include <OgreFontManager.h>
9#include <OgreOverlayManager.h>
10#include <OgreTextAreaOverlayElement.h>
11#include <OgrePanelOverlayElement.h>
[11317]12#include "core/CoreIncludes.h"
[11292]13
14namespace orxonox
15{
16
17         RegisterClass (HUDDialogue);
18
19         HUDDialogue::HUDDialogue(Context* context) :
20        OrxonoxOverlay(context)
21    {
22        RegisterObject(HUDDialogue);
[11317]23        }     
24    void HUDDialogue::updateTarget(std::string portrait)
25    {
26        overlayElementIcon_ = static_cast<Ogre::PanelOverlayElement* >(Ogre::OverlayManager::getSingleton().createOverlayElement("Panel", "Dialogue" + getUniqueNumberString()));
[11292]27        overlayElementIcon_->setPosition(0.0f,0.0f);
28        overlayElementIcon_->setDimensions(1.0f,1.0f);
[11317]29        this->background_->addChild(overlayElementIcon_);     
[11292]30
[11317]31        overlayElementIcon_->setMaterialName(portrait);
32        this->setVisible(true);
33        portraitTimer.setTimer(2.9f,false,createExecutor(createFunctor(&HUDDialogue::invisible, this)));
34    }
35    void HUDDialogue::invisible()
[11292]36    {
[11317]37        this->setVisible(false);
38        Ogre::OverlayManager::getSingleton().destroyOverlayElement(this->overlayElementIcon_);
[11292]39    }
40         HUDDialogue::~HUDDialogue()
41         {
42
43
44         }
45}
Note: See TracBrowser for help on using the repository browser.