diff --git a/BUILD.md b/BUILD.md index 878864da..b1513707 100644 --- a/BUILD.md +++ b/BUILD.md @@ -163,6 +163,7 @@ libstdc++-6.dll libwinpthread-1.dll Qt5Core.dll Qt5Gui.dll +Qt5Multimedia.dll Qt5Network.dll Qt5Svg.dll Qt5Widgets.dll diff --git a/CMakeLists.txt b/CMakeLists.txt index ddc0956e..263086b7 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -133,6 +133,7 @@ find_package(Qt5Concurrent REQUIRED) find_package(Qt5Network REQUIRED) find_package(Qt5Test REQUIRED) find_package(Qt5Xml REQUIRED) +find_package(Qt5Multimedia REQUIRED) # The Qt5 cmake files don't provide its install paths, so ask qmake. include(QMakeQuery) diff --git a/launcher/CMakeLists.txt b/launcher/CMakeLists.txt index c6204c09..e3dc0361 100644 --- a/launcher/CMakeLists.txt +++ b/launcher/CMakeLists.txt @@ -598,6 +598,7 @@ SET(LAUNCHER_SOURCES resources/iOS/iOS.qrc resources/flat/flat.qrc resources/documents/documents.qrc + resources/audio/audio.qrc ../${Launcher_Branding_LogoQRC} # Icons @@ -902,6 +903,7 @@ qt5_add_resources(LAUNCHER_RESOURCES resources/iOS/iOS.qrc resources/flat/flat.qrc resources/documents/documents.qrc + resources/audio/audio.qrc ../${Launcher_Branding_LogoQRC} ) @@ -925,6 +927,7 @@ target_link_libraries(Launcher_logic ) target_link_libraries(Launcher_logic Qt5::Core + Qt5::Multimedia Qt5::Xml Qt5::Network Qt5::Concurrent diff --git a/launcher/main.cpp b/launcher/main.cpp index aabb5a06..75e43759 100644 --- a/launcher/main.cpp +++ b/launcher/main.cpp @@ -49,6 +49,7 @@ int main(int argc, char *argv[]) Q_INIT_RESOURCE(OSX); Q_INIT_RESOURCE(iOS); Q_INIT_RESOURCE(flat); + Q_INIT_RESOURCE(audio); return app.exec(); } case Application::Failed: diff --git a/launcher/resources/audio/audio.qrc b/launcher/resources/audio/audio.qrc new file mode 100644 index 00000000..db3f9c59 --- /dev/null +++ b/launcher/resources/audio/audio.qrc @@ -0,0 +1,6 @@ + + + + meow.wav + + diff --git a/launcher/resources/audio/meow.wav b/launcher/resources/audio/meow.wav new file mode 100644 index 00000000..4d91dbcb Binary files /dev/null and b/launcher/resources/audio/meow.wav differ diff --git a/launcher/ui/MainWindow.cpp b/launcher/ui/MainWindow.cpp index 0a747734..aeda9ed5 100644 --- a/launcher/ui/MainWindow.cpp +++ b/launcher/ui/MainWindow.cpp @@ -26,6 +26,8 @@ #include #include +#include + #include #include @@ -1359,6 +1361,10 @@ void MainWindow::onCatToggled(bool state) { setCatBackground(state); APPLICATION->settings()->set("TheCat", state); + if (state) + { + QSound::play(":/audio/meow"); + } } namespace { diff --git a/launcher/ui/dialogs/AboutDialog.cpp b/launcher/ui/dialogs/AboutDialog.cpp index ae51809b..733e74f1 100644 --- a/launcher/ui/dialogs/AboutDialog.cpp +++ b/launcher/ui/dialogs/AboutDialog.cpp @@ -60,7 +60,8 @@ QString getCreditsHtml(QStringList patrons) stream << "

" << patron << "

\n"; } } - + stream << "

" << QObject::tr("Assets", "About Credits") << "

\n"; + stream << "

Cat Meow.wav by kklab5050 on freesound.org

\n"; stream << "\n"; return output; }