From dfba8eec907e5ecdc3d436a8cf75aa1514bef2a0 Mon Sep 17 00:00:00 2001 From: Nicolas Mailloux Date: Sun, 27 Mar 2022 23:17:02 -0400 Subject: [PATCH] Add 2048 game in Apps --- apps.cpp | 9 +++++++ apps.h | 1 + apps.ui | 76 +++++++++++++++++++++++++++++++++++++------------------- 3 files changed, 61 insertions(+), 25 deletions(-) diff --git a/apps.cpp b/apps.cpp index 204e680..f4e21ef 100644 --- a/apps.cpp +++ b/apps.cpp @@ -17,6 +17,7 @@ apps::apps(QWidget *parent) : ui->calculatorLaunchBtn->setProperty("type", "borderless"); ui->vncLaunchBtn->setProperty("type", "borderless"); ui->reversiLaunchBtn->setProperty("type", "borderless"); + ui->g2048LaunchBtn->setProperty("type", "borderless"); ui->koboxAppsOpenButton->setStyleSheet("background: lightGrey; font-size: 9pt; padding: 8px"); ui->scribbleLaunchBtn->setStyleSheet("background: lightGrey; font-size: 9pt; padding: 8px"); @@ -26,6 +27,7 @@ apps::apps(QWidget *parent) : ui->calculatorLaunchBtn->setStyleSheet("background: lightGrey; font-size: 9pt; padding: 8px"); ui->vncLaunchBtn->setStyleSheet("background: lightGrey; font-size: 9pt; padding: 8px"); ui->reversiLaunchBtn->setStyleSheet("background: lightGrey; font-size: 9pt; padding: 8px"); + ui->g2048LaunchBtn->setStyleSheet("background: lightGrey; font-size: 9pt; padding: 8px"); // Hiding KoBox apps button and label if X11 isn't enabled/wasn't started if(checkconfig("/external_root/boot/flags/X11_START") == false or checkconfig("/external_root/boot/flags/X11_STARTED") == false) { @@ -137,3 +139,10 @@ void apps::on_reversiLaunchBtn_clicked() process.startDetached("qreversi", QStringList()); qApp->quit(); } + +void apps::on_g2048LaunchBtn_clicked() +{ + QProcess process; + process.startDetached("2048", QStringList()); + qApp->quit(); +} diff --git a/apps.h b/apps.h index 0ea4d7c..7714a2b 100644 --- a/apps.h +++ b/apps.h @@ -30,6 +30,7 @@ private slots: void on_vncLaunchBtn_clicked(); void on_reversiLaunchBtn_clicked(); void refreshScreenNative(); + void on_g2048LaunchBtn_clicked(); private: Ui::apps *ui; diff --git a/apps.ui b/apps.ui index cc11f47..6af18ea 100644 --- a/apps.ui +++ b/apps.ui @@ -56,7 +56,7 @@ 0 - + @@ -70,7 +70,7 @@ - + @@ -84,7 +84,7 @@ - + @@ -110,7 +110,7 @@ - + @@ -124,7 +124,20 @@ - + + + + + 75 + true + + + + Reversi + + + + @@ -150,7 +163,7 @@ - + @@ -163,7 +176,7 @@ - + @@ -178,7 +191,20 @@ - + + + + + 75 + true + + + + Launch + + + + @@ -206,7 +232,7 @@ - + @@ -219,7 +245,7 @@ - + @@ -247,21 +273,8 @@ - - - - - 75 - true - - - - Reversi - - - - - + + 75 @@ -273,6 +286,19 @@ + + + + + 75 + true + + + + 2048 + + +