RigsofRods
Soft-body Physics Simulation
source
main
gui
panels
GUI_DirectionArrow.h
Go to the documentation of this file.
1
/*
2
This source file is part of Rigs of Rods
3
Copyright 2005-2012 Pierre-Michel Ricordel
4
Copyright 2007-2012 Thomas Fischer
5
Copyright 2013-2020 Petr Ohlidal
6
7
For more information, see http://www.rigsofrods.org/
8
9
Rigs of Rods is free software: you can redistribute it and/or modify
10
it under the terms of the GNU General Public License version 3, as
11
published by the Free Software Foundation.
12
13
Rigs of Rods is distributed in the hope that it will be useful,
14
but WITHOUT ANY WARRANTY; without even the implied warranty of
15
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16
GNU General Public License for more details.
17
18
You should have received a copy of the GNU General Public License
19
along with Rigs of Rods. If not, see <http://www.gnu.org/licenses/>.
20
*/
21
24
25
#pragma once
26
27
#include "
ForwardDeclarations.h
"
28
29
#include <Ogre.h>
30
#include <Overlay/OgreOverlay.h>
31
#include <Overlay/OgreTextAreaOverlayElement.h>
32
33
namespace
RoR
{
34
namespace
GUI {
35
36
class
DirectionArrow
37
{
38
public
:
39
void
LoadOverlay
();
40
void
CreateArrow
();
41
void
Update
(
RoR::GfxActor
* player);
42
bool
IsVisible
() {
return
m_overlay
->isVisible(); }
43
void
SetVisible
(
bool
value);
44
45
private
:
46
Ogre::SceneNode*
m_node
=
nullptr
;
47
Ogre::Overlay*
m_overlay
=
nullptr
;
48
Ogre::TextAreaOverlayElement*
m_text
=
nullptr
;
49
Ogre::TextAreaOverlayElement*
m_distance_text
=
nullptr
;
50
};
51
52
}
// namespace GUI
53
}
// namespace RoR
ForwardDeclarations.h
Global forward declarations.
RoR::GUI::DirectionArrow::CreateArrow
void CreateArrow()
Must be called again after OGRE scenemanager is cleared.
Definition:
GUI_DirectionArrow.cpp:50
RoR::GUI::DirectionArrow::m_distance_text
Ogre::TextAreaOverlayElement * m_distance_text
Definition:
GUI_DirectionArrow.h:49
RoR::GUI::DirectionArrow::Update
void Update(RoR::GfxActor *player)
Definition:
GUI_DirectionArrow.cpp:66
RoR::GUI::DirectionArrow
Definition:
GUI_DirectionArrow.h:36
RoR::GUI::DirectionArrow::SetVisible
void SetVisible(bool value)
Only effective in main menu, simulation visibility is set in Update()
Definition:
GUI_DirectionArrow.cpp:87
RoR::GUI::DirectionArrow::m_text
Ogre::TextAreaOverlayElement * m_text
Definition:
GUI_DirectionArrow.h:48
RoR::GUI::DirectionArrow::m_node
Ogre::SceneNode * m_node
Definition:
GUI_DirectionArrow.h:46
RoR::GUI::DirectionArrow::LoadOverlay
void LoadOverlay()
Must be called after meshes+overlays were loaded.
Definition:
GUI_DirectionArrow.cpp:38
RoR::GUI::DirectionArrow::m_overlay
Ogre::Overlay * m_overlay
Definition:
GUI_DirectionArrow.h:47
RoR::GfxActor
Definition:
GfxActor.h:52
RoR::GUI::DirectionArrow::IsVisible
bool IsVisible()
Definition:
GUI_DirectionArrow.h:42
RoR
Definition:
AppContext.h:36
Generated by
1.8.17