Blowbox 2017
A 3D Game Engine by Riko Ophorst using DirectX 12
debug_menu.h
1 #pragma once
2 
3 #include "util/vector.h"
4 #include "util/utility.h"
5 #include "util/weak_ptr.h"
6 #include "core/debug/debug_window.h"
7 
8 namespace blowbox
9 {
17  class DebugMenu
18  {
19  public:
20  DebugMenu();
21  ~DebugMenu();
22 
24  void RenderMenu();
25 
27  void RenderWindows();
28 
34  void AddDebugWindow(int priority, WeakPtr<DebugWindow> debug_window);
35  private:
37 
38  protected:
41  {
47  inline bool operator() (const Pair<int, WeakPtr<DebugWindow>>& a, const Pair<int, WeakPtr<DebugWindow>>& b)
48  {
49  return (a.first < b.first);
50  }
51  };
52  };
53 }
eastl::vector< T > Vector
Typedef for wrapping the EASTL vector.
Definition: vector.h:14
void AddDebugWindow(int priority, WeakPtr< DebugWindow > debug_window)
Adds a debug window to the DebugMenu.
Definition: debug_menu.cc:45
Compares the priorities for DebugWindows.
Definition: debug_menu.h:40
void RenderMenu()
Renders the entire main menu bar.
Definition: debug_menu.cc:22
eastl::weak_ptr< T > WeakPtr
Typedef for wrapping the EASTL weak_ptr.
Definition: weak_ptr.h:14
Vector< Pair< int, WeakPtr< DebugWindow > > > debug_windows_
All debug windows that have been added to the DebugMenu.
Definition: debug_menu.h:36
The main Blowbox namespace.
Definition: image.cc:8
Manages all debug windows and operates the main menu bar.
Definition: debug_menu.h:17
void RenderWindows()
Renders all DebugWindows that have subscribed to the DebugMenu.
Definition: debug_menu.cc:36
bool operator()(const Pair< int, WeakPtr< DebugWindow >> &a, const Pair< int, WeakPtr< DebugWindow >> &b)
Compares the priorities for DebugWindows.
Definition: debug_menu.h:47
eastl::pair< T1, T2 > Pair
Typedef for wrapping the EASTL pair.
Definition: utility.h:14