RigsofRods
Soft-body Physics Simulation
GUI_NodeBeamUtils.h
Go to the documentation of this file.
1 /*
2  This source file is part of Rigs of Rods
3  Copyright 2016-2020 Petr Ohlidal
4 
5  For more information, see http://www.rigsofrods.org/
6 
7  Rigs of Rods is free software: you can redistribute it and/or modify
8  it under the terms of the GNU General Public License version 3, as
9  published by the Free Software Foundation.
10 
11  Rigs of Rods 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
14  GNU General Public License for more details.
15 
16  You should have received a copy of the GNU General Public License
17  along with Rigs of Rods. If not, see <http://www.gnu.org/licenses/>.
18 */
19 
20 #pragma once
21 
22 #include "Application.h"
23 #include "OgreImGui.h"
24 
25 namespace RoR {
26 namespace GUI {
27 
29 {
30 public:
31  void Draw();
32 
33  void SetVisible(bool visible);
34  bool IsVisible() const { return m_is_visible; }
35  bool IsHovered() const { return IsVisible() && m_is_hovered; }
36 
37 private:
38  bool m_is_visible = false;
39  bool m_is_hovered = false;
40  bool m_is_searching = false;
41 
42  const ImVec4 GRAY_HINT_TEXT = ImVec4(0.62f, 0.62f, 0.61f, 1.f);
43 };
44 
45 } // namespace GUI
46 } // namespace RoR
RoR::GUI::NodeBeamUtils::GRAY_HINT_TEXT
const ImVec4 GRAY_HINT_TEXT
Definition: GUI_NodeBeamUtils.h:42
RoR::GUI::NodeBeamUtils::m_is_visible
bool m_is_visible
Definition: GUI_NodeBeamUtils.h:38
RoR::GUI::NodeBeamUtils::m_is_searching
bool m_is_searching
Definition: GUI_NodeBeamUtils.h:40
OgreImGui.h
RoR::GUI::NodeBeamUtils::m_is_hovered
bool m_is_hovered
Definition: GUI_NodeBeamUtils.h:39
Application.h
Central state/object manager and communications hub.
RoR::GUI::NodeBeamUtils
Definition: GUI_NodeBeamUtils.h:28
RoR::GUI::NodeBeamUtils::IsHovered
bool IsHovered() const
Definition: GUI_NodeBeamUtils.h:35
RoR::GUI::NodeBeamUtils::SetVisible
void SetVisible(bool visible)
Definition: GUI_NodeBeamUtils.cpp:188
RoR::GUI::NodeBeamUtils::IsVisible
bool IsVisible() const
Definition: GUI_NodeBeamUtils.h:34
RoR
Definition: AppContext.h:36
RoR::GUI::NodeBeamUtils::Draw
void Draw()
Definition: GUI_NodeBeamUtils.cpp:32