Tactics: Western Philosophers Vs. Musicians  0.12
A turn-based tactical game combining rules and gameplay elements inspired by Final Fantasy Tactics and the Mayfair Exponential Game System. Unlike most games of this type, motion is in full, grid-less 3D.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
GObjectTextDisplay.h
Go to the documentation of this file.
1 // Copyright (C) 2013-2014 Dylan Blair
3 //
4 // email: dblair@alumni.cs.utexas.edu
5 //
6 // This library is free software; you can redistribute it and/or
7 // modify it under the terms of the GNU Lesser General Public
8 // License as published by the Free Software Foundation; either
9 // version 2.1 of the License, or (at your option) any later version.
10 //
11 // This library is distributed in the hope that it will be useful,
12 // but WITHOUT ANY WARRANTY; without even the implied warranty of
13 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 // Lesser General Public License for more details.
15 //
16 // You should have received a copy of the GNU Lesser General Public
17 // License along with this library; if not, write to the Free Software
18 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20 
21 #ifndef GOBJECT_TEXT_DISPLAY_H
22 #define GOBJECT_TEXT_DISPLAY_H
23 
24 #include "GUtils.h"
25 
26 namespace OpenSkyNet {
27  namespace Graphics {
32  public:
33  ObjectTextDisplay(const Ogre::MovableObject* p, const Ogre::Camera* cam, const Ogre::ColourValue& color);
34 
35  virtual ~ObjectTextDisplay();
36 
37  void enable(bool enable);
38 
39  inline const Ogre::String& getText() { return m_text; }
40  void setText(const Ogre::String& text);
41 
42  void update();
43  protected:
44  static int s_count;
45 
46  const Ogre::MovableObject* m_p;
47  const Ogre::Camera* m_c;
48  bool m_enabled;
49  Ogre::Overlay* m_pOverlay;
50  Ogre::OverlayElement* m_pText;
51  Ogre::OverlayContainer* m_pContainer;
52  Ogre::String m_text;
53  };
54  }
55 }
56 
57 #endif //GOBJECT_TEXT_DISPLAY_H
void setText(const Ogre::String &text)
Definition: GObjectTextDisplay.cpp:65
Definition: GObjectTextDisplay.h:31
Ogre::Overlay * m_pOverlay
Definition: GObjectTextDisplay.h:49
ObjectTextDisplay(const Ogre::MovableObject *p, const Ogre::Camera *cam, const Ogre::ColourValue &color)
Definition: GObjectTextDisplay.cpp:8
bool m_enabled
Definition: GObjectTextDisplay.h:48
Ogre::String m_text
Definition: GObjectTextDisplay.h:52
void update()
Definition: GObjectTextDisplay.cpp:70
const Ogre::String & getText()
Definition: GObjectTextDisplay.h:39
Ogre::OverlayElement * m_pText
Definition: GObjectTextDisplay.h:50
void enable(bool enable)
Definition: GObjectTextDisplay.cpp:57
Ogre::OverlayContainer * m_pContainer
Definition: GObjectTextDisplay.h:51
virtual ~ObjectTextDisplay()
Definition: GObjectTextDisplay.cpp:43
const Ogre::MovableObject * m_p
Definition: GObjectTextDisplay.h:46
static int s_count
Definition: GObjectTextDisplay.h:44
const Ogre::Camera * m_c
Definition: GObjectTextDisplay.h:47