mirror of
https://github.com/MultiMC/MultiMC5.git
synced 2025-03-14 13:20:59 +00:00
Merge d428ca855a456146971ac730accfb99d6c4e6b58 into 0912669610e3a6d4924edb77e8f24b47617c8364
This commit is contained in:
commit
1093b5df0d
1
BUILD.md
1
BUILD.md
@ -163,6 +163,7 @@ libstdc++-6.dll
|
||||
libwinpthread-1.dll
|
||||
Qt5Core.dll
|
||||
Qt5Gui.dll
|
||||
Qt5Multimedia.dll
|
||||
Qt5Network.dll
|
||||
Qt5Svg.dll
|
||||
Qt5Widgets.dll
|
||||
|
@ -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)
|
||||
|
@ -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
|
||||
|
@ -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:
|
||||
|
6
launcher/resources/audio/audio.qrc
Normal file
6
launcher/resources/audio/audio.qrc
Normal file
@ -0,0 +1,6 @@
|
||||
<!DOCTYPE RCC>
|
||||
<RCC version="1.0">
|
||||
<qresource prefix="/audio">
|
||||
<file alias="meow">meow.wav</file>
|
||||
</qresource>
|
||||
</RCC>
|
BIN
launcher/resources/audio/meow.wav
Normal file
BIN
launcher/resources/audio/meow.wav
Normal file
Binary file not shown.
@ -26,6 +26,8 @@
|
||||
#include <QtCore/QDir>
|
||||
#include <QtCore/QFileInfo>
|
||||
|
||||
#include <QtMultimedia/QSound>
|
||||
|
||||
#include <QtGui/QKeyEvent>
|
||||
|
||||
#include <QtWidgets/QAction>
|
||||
@ -1359,6 +1361,10 @@ void MainWindow::onCatToggled(bool state)
|
||||
{
|
||||
setCatBackground(state);
|
||||
APPLICATION->settings()->set("TheCat", state);
|
||||
if (state)
|
||||
{
|
||||
QSound::play(":/audio/meow");
|
||||
}
|
||||
}
|
||||
|
||||
namespace {
|
||||
|
@ -60,7 +60,8 @@ QString getCreditsHtml(QStringList patrons)
|
||||
stream << "<p>" << patron << "</p>\n";
|
||||
}
|
||||
}
|
||||
|
||||
stream << "<h3>" << QObject::tr("Assets", "About Credits") << "</h3>\n";
|
||||
stream << "<p> Cat Meow.wav <a href='https://freesound.org/people/kklab5050/sounds/120017/'>by kklab5050 on freesound.org</a></p>\n";
|
||||
stream << "</center>\n";
|
||||
return output;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user