Rigs of Rods 2023.09
Soft-body Physics Simulation
All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
Loading...
Searching...
No Matches
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
33namespace RoR {
34namespace GUI {
35
37{
38public:
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
45private:
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
Global forward declarations.
Ogre::TextAreaOverlayElement * m_text
void Update(RoR::GfxActor *player)
Ogre::TextAreaOverlayElement * m_distance_text
void CreateArrow()
Must be called again after OGRE scenemanager is cleared.
void SetVisible(bool value)
Only effective in main menu, simulation visibility is set in Update()
void LoadOverlay()
Must be called after meshes+overlays were loaded.