Skip to content

Commit

Permalink
[editor] moved MenuBar to root since it's not a widget anymore (rathe…
Browse files Browse the repository at this point in the history
…r a static chunk of code)
  • Loading branch information
PanosK92 committed Dec 19, 2024
1 parent 2279b79 commit 0634d81
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 26 deletions.
8 changes: 4 additions & 4 deletions editor/Editor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

//= INCLUDES ====================================
#include "Editor.h"
#include "EditorWindow.h"
#include "EditorWindows.h"
#include "MenuBar.h"
#include "Core/Engine.h"
#include "Core/Settings.h"
#include "ImGui/ImGuiExtension.h"
Expand All @@ -30,7 +31,6 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#include "Widgets/AssetBrowser.h"
#include "Widgets/Console.h"
#include "Widgets/Style.h"
#include "Widgets/MenuBar.h"
#include "Widgets/ProgressDialog.h"
#include "Widgets/Properties.h"
#include "Widgets/Viewport.h"
Expand Down Expand Up @@ -111,7 +111,7 @@ Editor::Editor(const vector<string>& args)
// register imgui as a third party library (will show up in the about window)
Spartan::Settings::RegisterThirdPartyLib("ImGui", IMGUI_VERSION, "https://github.com/ocornut/imgui");

EditorWindow::Initialize(this);
EditorWindows::Initialize(this);
}

Editor::~Editor()
Expand Down Expand Up @@ -159,7 +159,7 @@ void Editor::Tick()
ImGui::End();

// various windows that don't belnog to a certain widget
EditorWindow::Tick();
EditorWindows::Tick();
}
}

Expand Down
10 changes: 5 additions & 5 deletions editor/EditorWindow.cpp → editor/EditorWindows.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/

//= INLUCDES ====================
#include "EditorWindow.h"
#include "EditorWindows.h"
#include "ImGui/Source/imgui.h"
#include "ImGui/ImGuiExtension.h"
#include "Core/FileSystem.h"
Expand Down Expand Up @@ -509,7 +509,7 @@ namespace
}
}

void EditorWindow::Initialize(Editor* editor_in)
void EditorWindows::Initialize(Editor* editor_in)
{
editor = editor_in;

Expand All @@ -521,7 +521,7 @@ void EditorWindow::Initialize(Editor* editor_in)
default_worlds::visible = default_worlds::downloaded;
}

void EditorWindow::Tick()
void EditorWindows::Tick()
{
// visibility
{
Expand Down Expand Up @@ -552,12 +552,12 @@ void EditorWindow::Tick()
}
}

bool* EditorWindow::GetVisiblityWindowAbout()
bool* EditorWindows::GetVisiblityWindowAbout()
{
return &about::visible;
}

bool* EditorWindow::GetVisiblityWindowShortcuts()
bool* EditorWindows::GetVisiblityWindowShortcuts()
{
return &shortcuts::visible;
}
2 changes: 1 addition & 1 deletion editor/EditorWindow.h → editor/EditorWindows.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

class Editor;

class EditorWindow
class EditorWindows
{
public:
static void Initialize(Editor* editor);
Expand Down
32 changes: 16 additions & 16 deletions editor/Widgets/MenuBar.cpp → editor/MenuBar.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,22 +21,22 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

//= INCLUDES =====================
#include "MenuBar.h"
#include "../EditorWindow.h"
#include "Profiler.h"
#include "ShaderEditor.h"
#include "RenderOptions.h"
#include "TextureViewer.h"
#include "ResourceViewer.h"
#include "AssetBrowser.h"
#include "Console.h"
#include "Properties.h"
#include "Viewport.h"
#include "WorldViewer.h"
#include "../Widgets/FileDialog.h"
#include "EditorWindows.h"
#include "Widgets/Profiler.h"
#include "Widgets/ShaderEditor.h"
#include "Widgets/RenderOptions.h"
#include "Widgets/TextureViewer.h"
#include "Widgets/ResourceViewer.h"
#include "Widgets/AssetBrowser.h"
#include "Widgets/Console.h"
#include "Widgets/Properties.h"
#include "Widgets/Viewport.h"
#include "Widgets/WorldViewer.h"
#include "Widgets/FileDialog.h"
#include "Widgets/Style.h"
#include "Engine.h"
#include "Profiling/RenderDoc.h"
#include <Debugging.h>
#include "Style.h"
#include "Debugging.h"
//================================

//= NAMESPACES =====
Expand Down Expand Up @@ -155,7 +155,7 @@ namespace
{
if (ImGui::BeginMenu("View"))
{
if (ImGui::MenuItem("Shortcuts & Input Reference", "Ctrl+P", EditorWindow::GetVisiblityWindowShortcuts()))
if (ImGui::MenuItem("Shortcuts & Input Reference", "Ctrl+P", EditorWindows::GetVisiblityWindowShortcuts()))
{

}
Expand Down Expand Up @@ -193,7 +193,7 @@ namespace
{
if (ImGui::BeginMenu("Help"))
{
ImGui::MenuItem("About", nullptr, EditorWindow::GetVisiblityWindowAbout());
ImGui::MenuItem("About", nullptr, EditorWindows::GetVisiblityWindowAbout());

if (ImGui::MenuItem("Sponsor", nullptr, nullptr))
{
Expand Down
File renamed without changes.

0 comments on commit 0634d81

Please sign in to comment.