diff --git a/ConsoleAppTest.vcxproj b/ConsoleAppTest.vcxproj
index ac854bf..4990e13 100644
--- a/ConsoleAppTest.vcxproj
+++ b/ConsoleAppTest.vcxproj
@@ -212,6 +212,12 @@
d3d9.lib;$(CoreLibraryDependencies);%(AdditionalDependencies)
+
+
+ .\lib\KCNet-TestDll;%(AdditionalLibraryDirectories)
+ KCNet-TestDll.lib;%(AdditionalDependencies)
+
+
@@ -223,8 +229,10 @@
+
+
@@ -242,8 +250,10 @@
+
+
diff --git a/imgui.ini b/imgui.ini
index dfc7013..708e032 100644
--- a/imgui.ini
+++ b/imgui.ini
@@ -4,8 +4,8 @@ Size=400,400
Collapsed=1
[Window][Dear ImGui Demo]
-Pos=652,43
-Size=550,680
+Pos=638,72
+Size=550,681
[Window][Hello, world!]
Pos=116,183
@@ -35,6 +35,10 @@ Size=499,136
IsChild=1
Size=200,100
+[Window][KCNet ImGui]
+Pos=113,150
+Size=505,566
+
[Table][0x64418101,3]
RefScale=13
Column 0 Width=63
@@ -46,3 +50,65 @@ Column 0 Weight=1.0000
Column 1 Weight=1.0000
Column 2 Weight=1.0000
+[Table][0xC9935533,3]
+Column 0 Weight=1.0000
+Column 1 Weight=1.0000
+Column 2 Weight=1.0000
+
+[Table][0x47600645,3]
+RefScale=13
+Column 0 Width=63
+Column 1 Width=63
+Column 2 Weight=1.0000
+
+[Table][0xDE6957FF,6]
+RefScale=13
+Column 0 Width=63
+Column 1 Width=63
+Column 2 Width=-1
+Column 3 Weight=1.0000
+Column 4 Weight=1.0000
+Column 5 Weight=-1.0000
+
+[Table][0x861D378E,3]
+Column 0 Weight=1.0000
+Column 1 Weight=1.0000
+Column 2 Weight=1.0000
+
+[Table][0x1F146634,3]
+RefScale=13
+Column 0 Width=63
+Column 1 Width=63
+Column 2 Width=63
+
+[Table][0x8DFA6E86,2]
+Column 0 Weight=1.0000
+Column 1 Weight=1.0000
+
+[Table][0xFABAAEF7,2]
+Column 0 Weight=1.0000
+Column 1 Weight=1.0000
+
+[Table][0xA43C3885,3]
+RefScale=13
+Column 0 Width=56
+Column 1 Width=56
+Column 2 Width=56
+
+[Table][0x49F8DCEA,3]
+RefScale=13
+Column 0 Weight=1.0000
+Column 1 Width=84
+Column 2 Width=126
+
+[Table][0x82CBB907,3]
+Column 0 Weight=1.0000
+Column 1 Weight=1.0000
+Column 2 Weight=1.0000
+
+[Table][0x49D11DC0,3]
+RefScale=13
+Column 0 Width=86
+Column 1 Width=86
+Column 2 Width=86
+
diff --git a/test/directx9_test.cpp b/test/directx9_test.cpp
index e05efe0..4825b99 100644
--- a/test/directx9_test.cpp
+++ b/test/directx9_test.cpp
@@ -162,9 +162,9 @@ void DirectX9Test::directX9Test()
// Create application window
//ImGui_ImplWin32_EnableDpiAwareness();
- WNDCLASSEXW wc = { sizeof(wc), CS_CLASSDC, WndProc, 0L, 0L, GetModuleHandle(nullptr), nullptr, nullptr, nullptr, nullptr, L"ImGui Example", nullptr };
+ WNDCLASSEXW wc = { sizeof(wc), CS_CLASSDC, WndProc, 0L, 0L, GetModuleHandle(nullptr), nullptr, nullptr, nullptr, nullptr, L"KCNet ImGui", nullptr };
::RegisterClassExW(&wc);
- HWND hwnd = ::CreateWindowW(wc.lpszClassName, L"Dear ImGui DirectX9 Example", WS_OVERLAPPEDWINDOW, 100, 100, 1280, 800, nullptr, nullptr, wc.hInstance, nullptr);
+ HWND hwnd = ::CreateWindowW(wc.lpszClassName, L"KCNet ImGui", WS_OVERLAPPEDWINDOW, 100, 100, 1280, 800, nullptr, nullptr, wc.hInstance, nullptr);
// Initialize Direct3D
if (!CreateDeviceD3D(hwnd))
diff --git a/util/text_file_functions.cpp b/util/text_file_functions.cpp
index 6f2ca88..c6f2da4 100644
--- a/util/text_file_functions.cpp
+++ b/util/text_file_functions.cpp
@@ -3,6 +3,10 @@
#include
#include "text_file_functions.h"
+// Add in ImGui for output text file to screen.
+#include "imgui.h"
+#include "imgui_impl_dx9.h"
+
// Checking if the file exists breaks without this
// https://stackoverflow.com/questions/19321804/this-function-or-variable-may-be-unsafe-visual-studio
#pragma warning(disable : 4996) //_CRT_SECURE_NO_WARNINGS
@@ -56,12 +60,38 @@ void TextFileFunctions::readTextFile(std::string file)
#define _TEST
#endif
+// This works
+// Some code from Google AI:///
+void TextFileFunctions::outputTextFileContents(const char* filePath) {
+ std::ifstream myfile(filePath);
+
+ if (myfile.is_open())
+ {
+ std::string line;
+ std::string content;
+
+ // Output file contents
+ while (std::getline(myfile, line))
+ {
+ content += line + "\n";
+ }
+ // Close the file
+ myfile.close();
+
+ ImGui::Text("\"%s\" File contents: \n%s", filePath, &content);
+ //ImGui::InputTextMultiline();
+ }
+ else
+ {
+ ImGui::Text("Error opening file %s", filePath);
+ }
+}
+
// Add test function for this, I need to figure out how to return an array like this.
#ifdef _TEST
+// This prints the text file output to the console but spams it, I probably won't use this much.
void TextFileFunctions::printTextOutput(std::string file)
{
- //std::string line;
- //std::string line[1000];
std::string line;
std::ifstream myfile(file);
@@ -72,7 +102,8 @@ void TextFileFunctions::printTextOutput(std::string file)
{
while (std::getline(myfile, line))
{
- std::cout << line << '\n';
+ // Disabled for now
+ //std::cout << line << '\n';
//return line;
}
diff --git a/util/text_file_functions.h b/util/text_file_functions.h
index b7ca6a3..68a28c1 100644
--- a/util/text_file_functions.h
+++ b/util/text_file_functions.h
@@ -5,4 +5,7 @@ public:
static void readTextFile(std::string file);
//static std::string printTextOutput(std::string file);
static void printTextOutput(std::string file);
+
+ static void outputTextFileContents(const char* filePath);
+
};