Divide Framework 0.1
A free and open-source 3D Framework under heavy development
Loading...
Searching...
No Matches
MenuBar.h
Go to the documentation of this file.
1/*
2Copyright (c) 2018 DIVIDE-Studio
3Copyright (c) 2009 Ionut Cava
4
5This file is part of DIVIDE Framework.
6
7Permission is hereby granted, free of charge, to any person obtaining a copy
8of this software
9and associated documentation files (the "Software"), to deal in the Software
10without restriction,
11including without limitation the rights to use, copy, modify, merge, publish,
12distribute, sublicense,
13and/or sell copies of the Software, and to permit persons to whom the
14Software is furnished to do so,
15subject to the following conditions:
16
17The above copyright notice and this permission notice shall be included in
18all copies or substantial portions of the Software.
19
20THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
21IMPLIED,
22INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
23PARTICULAR PURPOSE AND NONINFRINGEMENT.
24IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
25DAMAGES OR OTHER LIABILITY,
26WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR
27IN CONNECTION WITH THE SOFTWARE
28OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
29
30*/
31
32#pragma once
33#ifndef DVD_EDITOR_MENU_BAR_H_
34#define DVD_EDITOR_MENU_BAR_H_
35
38
40
41namespace Divide
42{
43 struct SceneEntry;
44
45 class Texture;
46
48 enum class DebugObject : U8 {
49 SPONZA = 0,
50 COUNT
51 };
52
53 public:
54 explicit MenuBar(PlatformContext& context, bool mainMenu);
55 void draw();
56
57 protected:
58 void drawFileMenu(bool modifierPressed);
59 void drawEditMenu(bool modifierPressed) const;
60 void drawProjectMenu(bool modifierPressed) const;
61 void drawObjectMenu(bool modifierPressed);
62 void drawToolsMenu(bool modifierPressed);
63 void drawWindowsMenu(bool modifierPressed) const;
64 void drawPostFXMenu(bool modifierPressed) const;
65 void drawDebugMenu(bool modifierPressed);
66 void drawHelpMenu(bool modifierPressed) const;
67 void spawnDebugObject(DebugObject object, bool modifierPressed) const;
68
69 void saveAndDrawModalPopup( const SceneEntry& targetScene );
70
71 protected:
72 bool _isMainMenu = true;
73 bool _quitPopup = false;
74 bool _restartPopup = false;
75 bool _newScenePopup = false;
76 bool _saveSceneAsPopup = false;
77 bool _closePopup = false;
78 bool _savePopup = false;
81
82 string _errorMsg = "";
84
87 };
88
90} //namespace Divide
91
92#endif //DVD_EDITOR_MENU_BAR_H_
#define FWD_DECLARE_MANAGED_CLASS(T)
void drawHelpMenu(bool modifierPressed) const
Definition: MenuBar.cpp:1290
void drawToolsMenu(bool modifierPressed)
Definition: MenuBar.cpp:835
void spawnDebugObject(DebugObject object, bool modifierPressed) const
Definition: MenuBar.cpp:1307
string _errorMsg
Definition: MenuBar.h:82
void drawObjectMenu(bool modifierPressed)
Definition: MenuBar.cpp:782
bool _savePopup
Definition: MenuBar.h:78
bool _quitPopup
Definition: MenuBar.h:73
void drawPostFXMenu(bool modifierPressed) const
Definition: MenuBar.cpp:902
void drawWindowsMenu(bool modifierPressed) const
Definition: MenuBar.cpp:889
ImGuiFs::Dialog _sceneSaveDialog
Definition: MenuBar.h:86
void drawDebugMenu(bool modifierPressed)
Definition: MenuBar.cpp:928
SceneNodeType _newPrimitiveType
Definition: MenuBar.h:79
void drawEditMenu(bool modifierPressed) const
Definition: MenuBar.cpp:732
bool _isMainMenu
Definition: MenuBar.h:72
void saveAndDrawModalPopup(const SceneEntry &targetScene)
Definition: MenuBar.cpp:502
DebugObject _debugObject
Definition: MenuBar.h:80
bool _saveSceneAsPopup
Definition: MenuBar.h:76
bool _newScenePopup
Definition: MenuBar.h:75
bool _restartPopup
Definition: MenuBar.h:74
void drawProjectMenu(bool modifierPressed) const
Definition: MenuBar.cpp:771
bool _closePopup
Definition: MenuBar.h:77
ImGuiFs::Dialog _sceneOpenDialog
Definition: MenuBar.h:85
vector< Handle< Texture > > _previewTextures
Definition: MenuBar.h:83
void drawFileMenu(bool modifierPressed)
Definition: MenuBar.cpp:530
PlatformContext & context() noexcept
Handle console commands that start with a forward slash.
Definition: AIProcessor.cpp:7
uint8_t U8
SceneNodeType
ToDo: Move particle emitter to components (it will make them way more dynamic) - Ionut.
Definition: SceneNodeFwd.h:47
eastl::vector< Type > vector
Definition: Vector.h:42
Definition: Scene.h:112