Browse Source

strange cmake bug

vlod 3 years ago
parent
commit
c668af6d8f

+ 27 - 0
Pika/core/pikaEditor/logWindow.cpp

@@ -0,0 +1,27 @@
+#include "logWindow.h"
+#include <imgui.h>
+
+void pika::LogWindow::init()
+{
+
+
+}
+
+void pika::LogWindow::update(pika::LogManager &logManager)
+{
+	//todo push pop id
+
+
+	if (ImGui::Begin("logs"))
+	{
+
+
+		ImGui::Text("log");
+
+
+
+	}
+	ImGui::End();
+
+
+}

+ 18 - 0
Pika/core/pikaEditor/logWindow.h

@@ -0,0 +1,18 @@
+#pragma once
+#include <logs/log.h>
+
+namespace pika
+{
+
+
+	struct LogWindow
+	{
+
+		void init();
+
+		void update(pika::LogManager &logManager);
+
+
+	};
+
+}

+ 38 - 3
Pika/core/pikaRuntime/pikaMain.cpp

@@ -14,6 +14,7 @@
 #include <runtimeContainer/runtimeContainer.h>
 
 #include <logs/log.h>
+#include <logWindow.h>
 
 int main()
 {
@@ -21,6 +22,10 @@ int main()
 #pragma region log
 	pika::LogManager logs;
 	logs.init("logs.txt");
+
+	pika::LogWindow logWindow;
+	logWindow.init();
+
 #pragma endregion
 
 #pragma region load dll
@@ -61,21 +66,51 @@ int main()
 	while (!window.shouldClose())
 	{
 
-
+	#pragma region reload dll
 		if (dllLoader.reloadDll())
 		{
 			dllLoader.gameplayReload_(window.context);
 		}
+	#pragma endregion
 
+	#pragma region start imgui
+		pika::imguiStartFrame(window.context);
+	#pragma endregion
 
+	#pragma region clear screen
 		glClear(GL_COLOR_BUFFER_BIT);
+	#pragma endregion
+
+	#pragma region editor stuff
+
+		if (ImGui::BeginMenuBar())
+		{
+
+			if (ImGui::BeginMenu("Open..."))
+			{
+
+				ImGui::Text("menu text");
+
+				ImGui::EndMenu();
+			}
+
+
+			ImGui::EndMenuBar();
+		}
+
+		logWindow.update(logs);
+
+	#pragma endregion
+
+	
+
 
-		pika::imguiStartFrame(window.context);
 
-		//gameplayUpdate(context);
 		container.pointer->update(window.input, window.deltaTime, window.windowState);
 
+	#pragma region end imgui frame
 		pika::imguiEndFrame(window.context);
+	#pragma endregion
 
 
 		window.update();

+ 1 - 1
Pika/core/pikaSTD/logs/log.h

@@ -1,4 +1,4 @@
-#pragma region
+#pragma once
 #include <string>
 #include <vector>
 #include <sstream>

+ 1 - 1
Pika/gameplay/containers/pikaGameplay.h

@@ -46,7 +46,7 @@ struct Gameplay : public Container
 
 		//ImGui::SetAllocatorFunctions(userMalloc, userFree);
 
-		ImGui::Begin("test");
+		ImGui::Begin("window from gameplay");
 		ImGui::End();
 	}