mirror of
https://github.com/antopilo/Nuake.git
synced 2026-01-06 06:09:52 +03:00
Added icons and fixed audio manger crash
This commit is contained in:
60
Editor/Editor.rc
Normal file
60
Editor/Editor.rc
Normal file
@@ -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
|
||||
BIN
Editor/resources/nuake-logo.ico
Normal file
BIN
Editor/resources/nuake-logo.ico
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 401 KiB |
1
Editor/resources/resources.rc
Normal file
1
Editor/resources/resources.rc
Normal file
@@ -0,0 +1 @@
|
||||
appIcon ICON "nuake-logo.ico"
|
||||
@@ -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)
|
||||
|
||||
@@ -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)
|
||||
{
|
||||
|
||||
|
||||
@@ -25,7 +25,7 @@ namespace Nuake
|
||||
const int MAX_VOICE_COUNT = 32;
|
||||
public:
|
||||
AudioManager() = default;
|
||||
~AudioManager() = default;
|
||||
~AudioManager();
|
||||
|
||||
static AudioManager& Get()
|
||||
{
|
||||
|
||||
@@ -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));
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user