From 70d400f205952912cbfa0a13cd8c84687ef06baa Mon Sep 17 00:00:00 2001 From: Petr Mrázek Date: Sun, 5 Dec 2021 23:26:04 +0100 Subject: NOISSUE party hat for a party cat On the 30th of November, it's been 10 years since the first (documented) release of MultiMC. Party hats for everyone :) --- launcher/resources/backgrounds/backgrounds.qrc | 1 + launcher/resources/backgrounds/cattiversary.png | Bin 0 -> 99736 bytes launcher/resources/sources/burfcat_hat.png | Bin 0 -> 15813 bytes launcher/ui/MainWindow.cpp | 12 +++++++++++- 4 files changed, 12 insertions(+), 1 deletion(-) create mode 100644 launcher/resources/backgrounds/cattiversary.png create mode 100644 launcher/resources/sources/burfcat_hat.png (limited to 'launcher') diff --git a/launcher/resources/backgrounds/backgrounds.qrc b/launcher/resources/backgrounds/backgrounds.qrc index 83505635..52921512 100644 --- a/launcher/resources/backgrounds/backgrounds.qrc +++ b/launcher/resources/backgrounds/backgrounds.qrc @@ -3,5 +3,6 @@ catbgrnd2.png catmas.png + cattiversary.png diff --git a/launcher/resources/backgrounds/cattiversary.png b/launcher/resources/backgrounds/cattiversary.png new file mode 100644 index 00000000..09a36566 Binary files /dev/null and b/launcher/resources/backgrounds/cattiversary.png differ diff --git a/launcher/resources/sources/burfcat_hat.png b/launcher/resources/sources/burfcat_hat.png new file mode 100644 index 00000000..a378c1fb Binary files /dev/null and b/launcher/resources/sources/burfcat_hat.png differ diff --git a/launcher/ui/MainWindow.cpp b/launcher/ui/MainWindow.cpp index 95d9ae5d..ac539fdc 100644 --- a/launcher/ui/MainWindow.cpp +++ b/launcher/ui/MainWindow.cpp @@ -1322,8 +1322,18 @@ void MainWindow::setCatBackground(bool enabled) if (enabled) { QDateTime now = QDateTime::currentDateTime(); + QDateTime birthday(QDate(now.date().year(), 11, 30), QTime(0, 0)); QDateTime xmas(QDate(now.date().year(), 12, 25), QTime(0, 0)); - QString cat = (non_stupid_abs(now.daysTo(xmas)) <= 4) ? "catmas" : "kitteh"; + QString cat; + if(non_stupid_abs(now.daysTo(xmas)) <= 4) { + cat = "catmas"; + } + else if (non_stupid_abs(now.daysTo(birthday)) <= 12) { + cat = "cattiversary"; + } + else { + cat = "kitteh"; + } view->setStyleSheet(QString(R"( InstanceView { -- cgit