Maintenance
- ImGui ini file handling and .gitignore - Minor maintenance
This commit is contained in:
parent
8e39b82642
commit
9701b08cc3
9 changed files with 56 additions and 90 deletions
6
.gitignore
vendored
6
.gitignore
vendored
|
@ -19,4 +19,8 @@ Makefile
|
|||
|
||||
**/Engine.txt
|
||||
**/GLAD.txt
|
||||
**/Sandbox.txt
|
||||
**/Sandbox.txt
|
||||
|
||||
**/Logs/**
|
||||
**.ini
|
||||
!**/default_gui_layout.ini
|
|
@ -14,8 +14,7 @@
|
|||
#define LT_VERSION "0.7.5b"
|
||||
///*** [ CHANGE_LOG ] ***///
|
||||
// --------------------------------------------------------------------
|
||||
// Note: change log starts from 2021-07-21, the starting version is 0.7.0a,
|
||||
// I came up with that version because of:
|
||||
// Note: change log starts from 2021-07-21, the starting version is 0.7.0a:
|
||||
// projects: 'Engine', 'Sandbox', 'Mirror' [+0.3]
|
||||
// graphics apis: 'OpenGL', 'DirectX11' [+0.2]
|
||||
// platforms: 'Windows', 'Linux' [+0.2]
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
|
||||
// LOGGER MACROS //
|
||||
|
||||
#define LT_LOG_FILE_LOCATION "Log.txt";
|
||||
#define LT_LOG_FILE_LOCATION "Logs/Logger.txt";
|
||||
|
||||
// #todo: log function signature
|
||||
// File
|
||||
|
|
|
@ -28,6 +28,12 @@ namespace Light {
|
|||
io.ConfigFlags |= ImGuiBackendFlags_PlatformHasViewports;
|
||||
io.ConfigFlags |= ImGuiBackendFlags_RendererHasViewports;
|
||||
|
||||
// #todo: handle this in a better way
|
||||
if(std::filesystem::exists("user_gui_layout.ini"))
|
||||
io.IniFilename = "user_gui_layout.ini";
|
||||
else
|
||||
io.IniFilename = "default_gui_layout.ini";
|
||||
|
||||
// style
|
||||
ImGui::StyleColorsDark();
|
||||
|
||||
|
@ -38,6 +44,12 @@ namespace Light {
|
|||
|
||||
dxUserInterface::~dxUserInterface()
|
||||
{
|
||||
// #todo: handle this in a better way
|
||||
ImGuiIO& io = ImGui::GetIO();
|
||||
|
||||
if (io.IniFilename == "default_gui_layout.ini")
|
||||
io.IniFilename = "user_gui_layout.ini";
|
||||
|
||||
ImGui_ImplDX11_Shutdown();
|
||||
ImGui_ImplWin32_Shutdown();
|
||||
ImGui::DestroyContext();
|
||||
|
|
|
@ -25,6 +25,12 @@ namespace Light {
|
|||
io.ConfigFlags |= ImGuiBackendFlags_PlatformHasViewports;
|
||||
io.ConfigFlags |= ImGuiBackendFlags_RendererHasViewports;
|
||||
|
||||
// #todo: handle this in a better way
|
||||
if (std::filesystem::exists("user_gui_layout.ini"))
|
||||
io.IniFilename = "user_gui_layout.ini";
|
||||
else
|
||||
io.IniFilename = "default_gui_layout.ini";
|
||||
|
||||
// style color
|
||||
ImGui::StyleColorsDark();
|
||||
|
||||
|
@ -35,6 +41,12 @@ namespace Light {
|
|||
|
||||
glUserInterface::~glUserInterface()
|
||||
{
|
||||
// #todo: handle this in a better way
|
||||
ImGuiIO& io = ImGui::GetIO();
|
||||
|
||||
if (io.IniFilename == "default_gui_layout.ini")
|
||||
io.IniFilename = "user_gui_layout.ini";
|
||||
|
||||
ImGui_ImplOpenGL3_Shutdown();
|
||||
ImGui_ImplGlfw_Shutdown();
|
||||
ImGui::DestroyContext();
|
||||
|
|
22
Mirror/default_gui_layout.ini
Normal file
22
Mirror/default_gui_layout.ini
Normal file
|
@ -0,0 +1,22 @@
|
|||
[Window][Debug##Default]
|
||||
ViewportPos=484,507
|
||||
ViewportId=0x9F5F46A1
|
||||
Size=400,400
|
||||
Collapsed=1
|
||||
|
||||
[Window][Dear ImGui Demo]
|
||||
Pos=86,24
|
||||
Size=247,278
|
||||
Collapsed=1
|
||||
|
||||
[Window][GameView]
|
||||
Pos=203,64
|
||||
Size=563,512
|
||||
Collapsed=1
|
||||
|
||||
[Window][DockSpace Demo]
|
||||
Size=1594,811
|
||||
Collapsed=1
|
||||
|
||||
[Docking][Data]
|
||||
|
|
@ -9,11 +9,11 @@ class Mirror : public Light::Application
|
|||
public:
|
||||
Mirror()
|
||||
{
|
||||
LT_CLIENT_TRACE("Sandbox::Sandbox");
|
||||
LT_CLIENT_TRACE("Mirror::Mirror");
|
||||
|
||||
// Set window properties
|
||||
Light::WindowProperties properties;
|
||||
properties.title = "Sandbox";
|
||||
properties.title = "Mirror";
|
||||
properties.size = glm::uvec2(800u, 600u);
|
||||
properties.vsync = true;
|
||||
|
||||
|
@ -25,7 +25,7 @@ public:
|
|||
|
||||
~Mirror()
|
||||
{
|
||||
LT_CLIENT_TRACE("Sandbox::~Sandbox");
|
||||
LT_CLIENT_TRACE("Mirror::~Mirror");
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
@ -1,83 +0,0 @@
|
|||
[Window][Debug##Default]
|
||||
Pos=60,-18
|
||||
Size=400,400
|
||||
Collapsed=0
|
||||
|
||||
[Window][Dear ImGui Demo]
|
||||
Pos=-4,0
|
||||
Size=529,418
|
||||
Collapsed=0
|
||||
|
||||
[Window][Dear ImGui Metrics/Debugger]
|
||||
Pos=-1,859
|
||||
Size=359,115
|
||||
Collapsed=0
|
||||
|
||||
[Table][0xC9935533,3]
|
||||
Column 0 Weight=1.0000
|
||||
Column 1 Weight=1.0000
|
||||
Column 2 Weight=1.0000
|
||||
|
||||
[Table][0x64418101,3]
|
||||
RefScale=13
|
||||
Column 0 Width=63
|
||||
Column 1 Width=63
|
||||
Column 2 Width=63
|
||||
|
||||
[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
|
||||
|
Loading…
Add table
Reference in a new issue