diff --git a/Editor/Editor.rc b/Editor/Editor.rc new file mode 100644 index 00000000..f628c9e0 --- /dev/null +++ b/Editor/Editor.rc @@ -0,0 +1,60 @@ +// Microsoft Visual C++ generated resource script. +// + +#include "resource1.h" + +#define APSTUDIO_READONLY_SYMBOLS +///////////////////////////////////////////////////////////////////////////// +// +// Generated from the TEXTINCLUDE 2 resource. +// +#include "winres.h" + +///////////////////////////////////////////////////////////////////////////// +#undef APSTUDIO_READONLY_SYMBOLS + +///////////////////////////////////////////////////////////////////////////// +// English (United States) resources + +#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) +LANGUAGE 9, 1 + +#ifdef APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// TEXTINCLUDE +// + +1 TEXTINCLUDE +BEGIN + "resource1.h\0" +END + +2 TEXTINCLUDE +BEGIN + "#include ""winres.h""\r\n" + "\0" +END + +3 TEXTINCLUDE +BEGIN + "\r\n" + "\0" +END + +#endif // APSTUDIO_INVOKED + +#endif // English (United States) resources +///////////////////////////////////////////////////////////////////////////// + + + +#ifndef APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// Generated from the TEXTINCLUDE 3 resource. +// + + +///////////////////////////////////////////////////////////////////////////// +#endif // not APSTUDIO_INVOKED diff --git a/Editor/resources/nuake-logo.ico b/Editor/resources/nuake-logo.ico new file mode 100644 index 00000000..69f33804 Binary files /dev/null and b/Editor/resources/nuake-logo.ico differ diff --git a/Editor/resources/resources.rc b/Editor/resources/resources.rc new file mode 100644 index 00000000..0df9f6a3 --- /dev/null +++ b/Editor/resources/resources.rc @@ -0,0 +1 @@ +appIcon ICON "nuake-logo.ico" \ No newline at end of file diff --git a/Editor/src/Windows/EditorInterface.cpp b/Editor/src/Windows/EditorInterface.cpp index 23514384..dff77ffa 100644 --- a/Editor/src/Windows/EditorInterface.cpp +++ b/Editor/src/Windows/EditorInterface.cpp @@ -1479,6 +1479,7 @@ namespace Nuake { if (m_ShowImGuiDemo) ImGui::ShowDemoWindow(); + /* if (ImGui::Begin("Toolbar", 0, ImGuiWindowFlags_NoScrollbar | ImGuiDockNodeFlags_AutoHideTabBar | ImGuiWindowFlags_NoDecoration)) { float availWidth = ImGui::GetContentRegionAvailWidth(); @@ -1506,6 +1507,7 @@ namespace Nuake { } } ImGui::End(); + */ } void EditorInterface::Update(float ts) diff --git a/Nuake/src/Audio/AudioManager.cpp b/Nuake/src/Audio/AudioManager.cpp index 3edf8fce..d29ada24 100644 --- a/Nuake/src/Audio/AudioManager.cpp +++ b/Nuake/src/Audio/AudioManager.cpp @@ -15,6 +15,15 @@ namespace Nuake _audioThread = std::thread(&AudioManager::AudioThreadLoop, this); } + AudioManager::~AudioManager() + { + Deinitialize(); + + _audioThreadRunning = false; + _audioThread.join(); + } + + void AudioManager::Deinitialize() { _soloud->deinit(); @@ -27,9 +36,6 @@ namespace Nuake void AudioManager::AudioThreadLoop() { - SoLoud::Speech speech; - speech.setText("Nuake"); - _soloud->play(speech); while(_audioThreadRunning) { diff --git a/Nuake/src/Audio/AudioManager.h b/Nuake/src/Audio/AudioManager.h index 27553b6e..a60ab612 100644 --- a/Nuake/src/Audio/AudioManager.h +++ b/Nuake/src/Audio/AudioManager.h @@ -25,7 +25,7 @@ namespace Nuake const int MAX_VOICE_COUNT = 32; public: AudioManager() = default; - ~AudioManager() = default; + ~AudioManager(); static AudioManager& Get() { diff --git a/Nuake/src/Window.cpp b/Nuake/src/Window.cpp index 3a4e853c..102b9d0c 100644 --- a/Nuake/src/Window.cpp +++ b/Nuake/src/Window.cpp @@ -115,12 +115,18 @@ namespace Nuake { { // Create window m_Window = glfwCreateWindow(m_Width, m_Height, m_Title.c_str(), NULL, NULL); + if (!m_Window) { Logger::Log("Window creation failed.", CRITICAL); return -1; } + GLFWimage images[1]; + images[0].pixels = stbi_load("resources/Images/nuake-logo.png", &images[0].width, &images[0].height, 0, 4); //rgba channels + glfwSetWindowIcon(m_Window, 1, images); + stbi_image_free(images[0].pixels); + glfwMakeContextCurrent(m_Window); Logger::Log((char*)glGetString(GL_VERSION)); diff --git a/premake5.lua b/premake5.lua index 967246a5..98745469 100644 --- a/premake5.lua +++ b/premake5.lua @@ -93,7 +93,9 @@ project "Editor" files { "%{prj.name}/**.h", - "%{prj.name}/**.cpp" + "%{prj.name}/**.cpp", + "%{prj.name}/resources/*.rc", + "%{prj.name}/resources/**.ico" } includedirs