From 4c8bf57268c09c298edc3f3695e4a2ede84643ac Mon Sep 17 00:00:00 2001 From: Crystalwarrior Date: Thu, 12 Mar 2020 18:34:51 +0300 Subject: [PATCH] VERSION 2.8.3 BABYYYYYYYY Add "KFO" to version display in lobby so it's even clearer this is a custom client Add a settings button to the Lobby screen --- Attorney_Online.pro | 2 +- include/aoapplication.h | 2 +- include/lobby.h | 3 +++ src/aoapplication.cpp | 2 +- src/lobby.cpp | 12 ++++++++++++ 5 files changed, 18 insertions(+), 3 deletions(-) diff --git a/Attorney_Online.pro b/Attorney_Online.pro index cb6727f..81a3304 100644 --- a/Attorney_Online.pro +++ b/Attorney_Online.pro @@ -3,7 +3,7 @@ QT += core gui widgets network TARGET = Attorney_Online TEMPLATE = app -VERSION = 2.8.2.0 +VERSION = 2.8.3.0 INCLUDEPATH += $$PWD/include DESTDIR = $$PWD/bin diff --git a/include/aoapplication.h b/include/aoapplication.h index 3ed7046..8b520bc 100644 --- a/include/aoapplication.h +++ b/include/aoapplication.h @@ -416,7 +416,7 @@ public: private: const int RELEASE = 2; const int MAJOR_VERSION = 8; - const int MINOR_VERSION = 2; + const int MINOR_VERSION = 3; QString current_theme = "default"; diff --git a/include/lobby.h b/include/lobby.h index 10a7c1d..a969f86 100644 --- a/include/lobby.h +++ b/include/lobby.h @@ -65,6 +65,8 @@ private: QLabel *ui_version; AOButton *ui_about; + AOButton *ui_settings; + QTreeWidget *ui_server_list; QLineEdit *ui_server_search; @@ -96,6 +98,7 @@ private slots: void on_connect_pressed(); void on_connect_released(); void on_about_clicked(); + void on_settings_clicked(); void on_server_list_clicked(QTreeWidgetItem* p_item, int column); void on_server_list_doubleclicked(QTreeWidgetItem* p_item, int column); void on_server_search_edited(QString p_text); diff --git a/src/aoapplication.cpp b/src/aoapplication.cpp index 6213acd..9c3d1cd 100644 --- a/src/aoapplication.cpp +++ b/src/aoapplication.cpp @@ -93,7 +93,7 @@ void AOApplication::destruct_courtroom() QString AOApplication::get_version_string() { - return + return "KFO" + QString::number(RELEASE) + "." + QString::number(MAJOR_VERSION) + "." + QString::number(MINOR_VERSION); diff --git a/src/lobby.cpp b/src/lobby.cpp index caa0915..1c355a5 100644 --- a/src/lobby.cpp +++ b/src/lobby.cpp @@ -20,6 +20,7 @@ Lobby::Lobby(AOApplication *p_ao_app) : QMainWindow() ui_connect = new AOButton(this, ao_app); ui_version = new QLabel(this); ui_about = new AOButton(this, ao_app); + ui_settings = new AOButton(this, ao_app); ui_server_list = new QTreeWidget(this); ui_server_list->setHeaderLabels({"#", "Name"});//, "Players"}); @@ -55,6 +56,7 @@ Lobby::Lobby(AOApplication *p_ao_app) : QMainWindow() connect(ui_connect, SIGNAL(pressed()), this, SLOT(on_connect_pressed())); connect(ui_connect, SIGNAL(released()), this, SLOT(on_connect_released())); connect(ui_about, SIGNAL(clicked()), this, SLOT(on_about_clicked())); + connect(ui_settings, SIGNAL(clicked()), this, SLOT(on_settings_clicked())); connect(ui_server_list, SIGNAL(itemClicked(QTreeWidgetItem*, int)), this, SLOT(on_server_list_clicked(QTreeWidgetItem*, int))); connect(ui_server_list, SIGNAL(itemDoubleClicked(QTreeWidgetItem*, int)), this, SLOT(on_server_list_doubleclicked(QTreeWidgetItem*, int))); connect(ui_server_search, SIGNAL(textChanged(QString)), this, SLOT(on_server_search_edited(QString))); @@ -117,6 +119,11 @@ void Lobby::set_widgets() set_size_and_pos(ui_about, "about"); ui_about->set_image("about"); + set_size_and_pos(ui_settings, "settings"); + ui_settings->setText(tr("Settings")); + ui_settings->set_image("settings"); + ui_settings->setToolTip(tr("Allows you to change various aspects of the client.")); + set_size_and_pos(ui_server_list, "server_list"); ui_server_list->setStyleSheet("background-color: rgba(0, 0, 0, 0);" "font: bold;"); @@ -366,6 +373,11 @@ void Lobby::on_about_clicked() QMessageBox::about(this, "About", msg); } +void Lobby::on_settings_clicked() +{ + ao_app->call_settings_menu(); +} + //clicked on an item in the serverlist void Lobby::on_server_list_clicked(QTreeWidgetItem* p_item, int column) {