diff --git a/GUIManager.cpp b/GUIManager.cpp index 3d1776a4..6c95a260 100644 --- a/GUIManager.cpp +++ b/GUIManager.cpp @@ -222,7 +222,7 @@ namespace ed */ ImGui::Columns(4); ImGui::SetColumnWidth(0, (5*(TOOLBAR_HEIGHT) + 5*2*ImGui::GetStyle().FramePadding.x) * Settings::Instance().DPIScale); - ImGui::SetColumnWidth(1, (5*(TOOLBAR_HEIGHT) + 5*2*ImGui::GetStyle().FramePadding.x) * Settings::Instance().DPIScale); + ImGui::SetColumnWidth(1, (6*(TOOLBAR_HEIGHT) + 6*2*ImGui::GetStyle().FramePadding.x) * Settings::Instance().DPIScale); ImGui::SetColumnWidth(2, (4*(TOOLBAR_HEIGHT) + 4*2*ImGui::GetStyle().FramePadding.x) * Settings::Instance().DPIScale); ImGui::PushFont(m_iconFontLarge); ImGui::PushStyleColor(ImGuiCol_Button, ImVec4(0, 0, 0, 0)); @@ -244,7 +244,7 @@ namespace ed } m_tooltip("Save project"); ImGui::SameLine(); - if (ImGui::Button(UI_ICON_FILE_FILE)) { // EMPTY PROJECT + if (ImGui::Button(UI_ICON_FILE_FILE)) { // EMPTY PROJECT m_selectedTemplate = "?empty"; m_isNewProjectPopupOpened = true; } @@ -290,6 +290,9 @@ namespace ed ImGui::SameLine(); if (ImGui::Button(UI_ICON_CUBE)) this->CreateNewCubemap(); m_tooltip("New cubemap"); + ImGui::SameLine(); + if (ImGui::Button(UI_ICON_FILE_TEXT)) this->CreateNewBuffer(); + m_tooltip("New buffer"); ImGui::NextColumn(); if (ImGui::Button(UI_ICON_REFRESH)) { // REBUILD PROJECT @@ -793,7 +796,8 @@ namespace ed ImGui::SetNextWindowSize(ImVec2(270 * Settings::Instance().DPIScale, 150 * Settings::Instance().DPIScale), ImGuiCond_Once); if (ImGui::BeginPopupModal("About##main_about")) { ImGui::TextWrapped("(C) 2019 dfranx"); - ImGui::TextWrapped("Version 1.0"); + ImGui::TextWrapped("Version 1.1.4"); + ImGui::TextWrapped("Internal version: %d", UpdateChecker::MyVersion); ImGui::NewLine(); ImGui::TextWrapped("This app is open sourced: "); ImGui::SameLine(); @@ -989,6 +993,7 @@ namespace ed ImGui::EndPopup(); } + // update notification if (m_isUpdateNotificationOpened) { const float DISTANCE = 15.0f; ImGuiIO& io = ImGui::GetIO(); @@ -1002,7 +1007,10 @@ namespace ed ImGui::PushStyleColor(ImGuiCol_Text, windowClr); if (ImGui::Begin("##updateNotification", &m_isUpdateNotificationOpened, ImGuiWindowFlags_NoMove | ImGuiWindowFlags_NoTitleBar | ImGuiWindowFlags_NoDecoration | ImGuiWindowFlags_AlwaysAutoResize | ImGuiWindowFlags_NoSavedSettings | ImGuiWindowFlags_NoFocusOnAppearing | ImGuiWindowFlags_NoNav)) { - ImGui::Text("A new version of SHADERed is available! Download now!"); + if (ImGui::IsWindowHovered()) + m_updateNotifyClock.restart(); + + ImGui::Text("A new version of SHADERed is available!"); ImGui::SameLine(); if (ImGui::Button("UPDATE")) { #if defined(__APPLE__) @@ -1012,6 +1020,7 @@ namespace ed #elif defined(_WIN32) ShellExecuteW(NULL, L"open", L"https://github.com/dfranx/SHADERed/releases", NULL, NULL, SW_SHOWNORMAL); #endif + m_isUpdateNotificationOpened = false; } } ImGui::PopStyleColor(2); diff --git a/Objects/UpdateChecker.h b/Objects/UpdateChecker.h index d70b3a44..11b07500 100644 --- a/Objects/UpdateChecker.h +++ b/Objects/UpdateChecker.h @@ -7,7 +7,7 @@ namespace ed class UpdateChecker { public: - static const int MyVersion = 1; + static const int MyVersion = 2; UpdateChecker(); ~UpdateChecker(); diff --git a/TODO.md b/TODO.md index d7685854..f2270806 100644 --- a/TODO.md +++ b/TODO.md @@ -8,7 +8,6 @@ List of features I want to implement: - "Export as DirectX/OpenGL application" option (.cpp file) - compute shaders - render your shader to a video file - - buffers read from file or built using in-app buffer editor - pixel inspector - audio shaders - debugger diff --git a/bin/data/settings.ini b/bin/data/settings.ini index 251422f8..e73ef856 100644 --- a/bin/data/settings.ini +++ b/bin/data/settings.ini @@ -29,7 +29,7 @@ gizmosnaptrans=0 gizmosnapscale=0 gizmosnaprota=0 propertypick=1 -statusbar=1 +statusbar=0 fpslimit=-1 fpslimitwholeapp=0 fpslimitlostfocus=0 @@ -41,7 +41,7 @@ whitespace=0 highlightline=1 linenumbers=1 horizscroll=1 -statusbar=1 +statusbar=0 autobrace=1 smartindent=1 insertspace=0 diff --git a/bin/data/shortcuts.kb b/bin/data/shortcuts.kb index a10b54f1..89af912c 100644 --- a/bin/data/shortcuts.kb +++ b/bin/data/shortcuts.kb @@ -34,6 +34,7 @@ Preview.ToggleStatusbar CTRL SHIFT F3 Preview.Unselect CTRL SHIFT Delete Project.New CTRL N N Project.NewAudio CTRL N A +Project.NewBuffer CTRL N B Project.NewCubeMap CTRL N C Project.NewRenderTexture CTRL N R Project.NewShaderPass CTRL N P diff --git a/bin/data/workspace.dat b/bin/data/workspace.dat index 7764fe09..be2fa938 100644 --- a/bin/data/workspace.dat +++ b/bin/data/workspace.dat @@ -10,37 +10,37 @@ Collapsed=0 [Window][Pinned] Pos=0,469 -Size=355,546 +Size=287,546 Collapsed=0 DockId=0x00000004,1 [Window][Preview] -Pos=357,22 -Size=1493,813 +Pos=289,22 +Size=1561,813 Collapsed=0 DockId=0x00000014,0 [Window][Output] -Pos=357,837 -Size=1493,178 +Pos=289,837 +Size=1561,178 Collapsed=0 DockId=0x00000006,0 [Window][Objects] Pos=0,22 -Size=355,445 +Size=287,445 Collapsed=0 DockId=0x00000003,1 [Window][Pipeline] Pos=0,22 -Size=355,445 +Size=287,445 Collapsed=0 DockId=0x00000003,0 [Window][Properties] Pos=0,469 -Size=355,546 +Size=287,546 Collapsed=0 DockId=0x00000004,0 @@ -50,14 +50,14 @@ Size=1170,690 Collapsed=0 [Window][###code_viewVS0] -Pos=357,22 -Size=636,560 +Pos=289,22 +Size=665,560 Collapsed=0 DockId=0x00000009,0 [Window][###code_viewPS0] -Pos=357,584 -Size=636,431 +Pos=289,22 +Size=665,993 Collapsed=0 DockId=0x0000000A,0 @@ -104,10 +104,10 @@ DockId=0x00000017,0 [Docking][Data] DockSpace ID=0x160B189F Pos=0,22 Size=1850,993 Split=X - DockNode ID=0x00000001 Parent=0x160B189F SizeRef=355,997 Split=Y SelectedTab=0xC89E3217 - DockNode ID=0x00000003 Parent=0x00000001 SizeRef=239,445 SelectedTab=0x7DA7F56F + DockNode ID=0x00000001 Parent=0x160B189F SizeRef=287,997 Split=Y SelectedTab=0xC89E3217 + DockNode ID=0x00000003 Parent=0x00000001 SizeRef=239,445 SelectedTab=0x848ABB8F DockNode ID=0x00000004 Parent=0x00000001 SizeRef=239,546 SelectedTab=0xC89E3217 - DockNode ID=0x00000002 Parent=0x160B189F SizeRef=1493,997 Split=X + DockNode ID=0x00000002 Parent=0x160B189F SizeRef=1561,997 Split=X DockNode ID=0x00000007 Parent=0x00000002 SizeRef=636,915 Split=Y SelectedTab=0xF34EBBA5 DockNode ID=0x00000009 Parent=0x00000007 SizeRef=399,561 SelectedTab=0xF7C3C717 DockNode ID=0x0000000A Parent=0x00000007 SizeRef=399,432 SelectedTab=0xF34EBBA5