21
21
#include < Interfaces/RendererInterface.hpp>
22
22
#include < Interfaces/WindowInterface.hpp>
23
23
24
+ #include < Components/Instance.hpp>
25
+
24
26
#define _NET_WM_STATE_ADD 1
25
27
26
28
UImGui::WindowInternal::WindowInternal () noexcept
@@ -42,7 +44,7 @@ bool& UImGui::WindowInternal::resized() noexcept
42
44
43
45
void UImGui::WindowInternal::saveConfig (bool bSaveKeybindings) noexcept
44
46
{
45
- std::ofstream fout (UIMGUI_CONFIG_DIR " Core/Window.yaml" );
47
+ std::ofstream fout (UImGui::internalGlobal. instance -> initInfo . configDir + " Core/Window.yaml" );
46
48
{
47
49
YAML::Emitter out;
48
50
out << YAML::BeginMap;
@@ -86,7 +88,7 @@ void UImGui::WindowInternal::saveConfig(bool bSaveKeybindings) noexcept
86
88
}
87
89
out << YAML::EndSeq << YAML::EndMap;
88
90
89
- fout = std::ofstream (UIMGUI_CONFIG_DIR " Core/Keybindings.yaml" );
91
+ fout = std::ofstream (UImGui::internalGlobal. instance -> initInfo . configDir + " Core/Keybindings.yaml" );
90
92
fout << out.c_str ();
91
93
fout.close ();
92
94
}
@@ -299,7 +301,7 @@ void UImGui::WindowInternal::openConfig()
299
301
300
302
try
301
303
{
302
- out = YAML::LoadFile (UIMGUI_CONFIG_DIR " Core/Window.yaml" );
304
+ out = YAML::LoadFile (UImGui::internalGlobal. instance -> initInfo . configDir + " Core/Window.yaml" );
303
305
}
304
306
catch (YAML::BadFile&)
305
307
{
@@ -329,7 +331,7 @@ void UImGui::WindowInternal::openConfig()
329
331
330
332
try
331
333
{
332
- out = YAML::LoadFile (UIMGUI_CONFIG_DIR " Core/Keybindings.yaml" );
334
+ out = YAML::LoadFile (UImGui::internalGlobal. instance -> initInfo . configDir + " Core/Keybindings.yaml" );
333
335
}
334
336
catch (YAML::BadFile&)
335
337
{
@@ -373,7 +375,7 @@ finish_inner_loop:;
373
375
void UImGui::WindowInternal::setIcon (UImGui::String name) noexcept
374
376
{
375
377
GLFWimage images[1 ];
376
- images[0 ].pixels = stbi_load ((UImGui::FString (UIMGUI_CONTENT_DIR) + name).c_str (), &images[0 ].width , &images[0 ].height , nullptr , 4 );
378
+ images[0 ].pixels = stbi_load ((UImGui::internalGlobal. instance -> initInfo . contentDir + name).c_str (), &images[0 ].width , &images[0 ].height , nullptr , 4 );
377
379
glfwSetWindowIcon (windowMain, 1 , images);
378
380
stbi_image_free (images[0 ].pixels );
379
381
}
0 commit comments