From 78be99422ecec29c07f221d0fcb690af5d472fd1 Mon Sep 17 00:00:00 2001 From: Cerapter Date: Tue, 7 Aug 2018 19:41:41 +0200 Subject: CCCC version now displayed ingame. --- aoapplication.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'aoapplication.cpp') diff --git a/aoapplication.cpp b/aoapplication.cpp index 12e540cd..6e95a522 100644 --- a/aoapplication.cpp +++ b/aoapplication.cpp @@ -94,6 +94,14 @@ QString AOApplication::get_version_string() QString::number(MINOR_VERSION); } +QString AOApplication::get_cccc_version_string() +{ + return + QString::number(CCCC_RELEASE) + "." + + QString::number(CCCC_MAJOR_VERSION) + "." + + QString::number(CCCC_MINOR_VERSION); +} + void AOApplication::reload_theme() { current_theme = read_theme(); -- cgit From c85244e38c5444a37d926e1d6284f6bea43341be Mon Sep 17 00:00:00 2001 From: Cerapter Date: Wed, 8 Aug 2018 19:19:53 +0200 Subject: config.ini functioning changed. - Now the program uses the QSettings class to manipulate the `config.ini`. - Support for multiple audio devices and options menu started. --- aoapplication.cpp | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) (limited to 'aoapplication.cpp') diff --git a/aoapplication.cpp b/aoapplication.cpp index 6e95a522..cfa96488 100644 --- a/aoapplication.cpp +++ b/aoapplication.cpp @@ -15,6 +15,9 @@ AOApplication::AOApplication(int &argc, char **argv) : QApplication(argc, argv) discord = new AttorneyOnline::Discord(); QObject::connect(net_manager, SIGNAL(ms_connect_finished(bool, bool)), SLOT(ms_connect_finished(bool, bool))); + + // Create the QSettings class that points to the config.ini. + configini = new QSettings(get_base_path() + "config.ini", QSettings::IniFormat); } AOApplication::~AOApplication() @@ -43,6 +46,25 @@ void AOApplication::construct_lobby() discord->state_lobby(); w_lobby->show(); + + // Change the default audio output device to be the one the user has given + // in his config.ini file for now. + int a = 0; + BASS_DEVICEINFO info; + + for (a = 1; BASS_GetDeviceInfo(a, &info); a++) + { + if (get_audio_output_device() == info.name) + { + BASS_SetDevice(a); + qDebug() << info.name << "was set as the default audio output device."; + break; + } + qDebug() << info.name; + } + + //AOOptionsDialog* test = new AOOptionsDialog(nullptr, this); + //test->exec(); } void AOApplication::destruct_lobby() -- cgit From 913939835a9b7bc141756b70e14880b02a46a791 Mon Sep 17 00:00:00 2001 From: Cerapter Date: Wed, 8 Aug 2018 21:48:00 +0200 Subject: Added a settings menu. - Cannot be called yet ingame. - Allows the setting of all `config.ini` variables. - Allows the setting of callwords. --- aoapplication.cpp | 29 ++++++++++++++++++++++++----- 1 file changed, 24 insertions(+), 5 deletions(-) (limited to 'aoapplication.cpp') diff --git a/aoapplication.cpp b/aoapplication.cpp index cfa96488..b8db52e3 100644 --- a/aoapplication.cpp +++ b/aoapplication.cpp @@ -5,6 +5,8 @@ #include "networkmanager.h" #include "debug_functions.h" +#include "aooptionsdialog.h" + #include #include #include @@ -52,7 +54,7 @@ void AOApplication::construct_lobby() int a = 0; BASS_DEVICEINFO info; - for (a = 1; BASS_GetDeviceInfo(a, &info); a++) + for (a = 0; BASS_GetDeviceInfo(a, &info); a++) { if (get_audio_output_device() == info.name) { @@ -60,11 +62,7 @@ void AOApplication::construct_lobby() qDebug() << info.name << "was set as the default audio output device."; break; } - qDebug() << info.name; } - - //AOOptionsDialog* test = new AOOptionsDialog(nullptr, this); - //test->exec(); } void AOApplication::destruct_lobby() @@ -127,6 +125,20 @@ QString AOApplication::get_cccc_version_string() void AOApplication::reload_theme() { current_theme = read_theme(); + + // This may not be the best place for it, but let's read the audio output device just in case. + int a = 0; + BASS_DEVICEINFO info; + + for (a = 0; BASS_GetDeviceInfo(a, &info); a++) + { + if (get_audio_output_device() == info.name) + { + BASS_SetDevice(a); + qDebug() << info.name << "was set as the default audio output device."; + break; + } + } } void AOApplication::set_favorite_list() @@ -197,3 +209,10 @@ void AOApplication::ms_connect_finished(bool connected, bool will_retry) } } } + +void AOApplication::call_settings_menu() +{ + AOOptionsDialog* settings = new AOOptionsDialog(nullptr, this); + settings->exec(); + delete settings; +} -- cgit From eee682bf0d603b0afe9dc2e41bf971669cea225d Mon Sep 17 00:00:00 2001 From: Cerapter Date: Fri, 17 Aug 2018 01:34:22 +0200 Subject: Fixed an issue with the audio output change not registering. --- aoapplication.cpp | 29 ----------------------------- 1 file changed, 29 deletions(-) (limited to 'aoapplication.cpp') diff --git a/aoapplication.cpp b/aoapplication.cpp index b8db52e3..0133765a 100644 --- a/aoapplication.cpp +++ b/aoapplication.cpp @@ -48,21 +48,6 @@ void AOApplication::construct_lobby() discord->state_lobby(); w_lobby->show(); - - // Change the default audio output device to be the one the user has given - // in his config.ini file for now. - int a = 0; - BASS_DEVICEINFO info; - - for (a = 0; BASS_GetDeviceInfo(a, &info); a++) - { - if (get_audio_output_device() == info.name) - { - BASS_SetDevice(a); - qDebug() << info.name << "was set as the default audio output device."; - break; - } - } } void AOApplication::destruct_lobby() @@ -125,20 +110,6 @@ QString AOApplication::get_cccc_version_string() void AOApplication::reload_theme() { current_theme = read_theme(); - - // This may not be the best place for it, but let's read the audio output device just in case. - int a = 0; - BASS_DEVICEINFO info; - - for (a = 0; BASS_GetDeviceInfo(a, &info); a++) - { - if (get_audio_output_device() == info.name) - { - BASS_SetDevice(a); - qDebug() << info.name << "was set as the default audio output device."; - break; - } - } } void AOApplication::set_favorite_list() -- cgit From feee84588c1caa6307ea8bdfdc030936790eed35 Mon Sep 17 00:00:00 2001 From: Cerapter Date: Sun, 19 Aug 2018 08:37:01 +0200 Subject: Manual option for backup master server. Reimplementation of `7e4be0edd7756220dd8d7fbaaaf3d972db48df5e` from the old origin. --- aoapplication.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'aoapplication.cpp') diff --git a/aoapplication.cpp b/aoapplication.cpp index 0133765a..43af15f7 100644 --- a/aoapplication.cpp +++ b/aoapplication.cpp @@ -13,13 +13,13 @@ AOApplication::AOApplication(int &argc, char **argv) : QApplication(argc, argv) { + // Create the QSettings class that points to the config.ini. + configini = new QSettings(get_base_path() + "config.ini", QSettings::IniFormat); + net_manager = new NetworkManager(this); discord = new AttorneyOnline::Discord(); QObject::connect(net_manager, SIGNAL(ms_connect_finished(bool, bool)), SLOT(ms_connect_finished(bool, bool))); - - // Create the QSettings class that points to the config.ini. - configini = new QSettings(get_base_path() + "config.ini", QSettings::IniFormat); } AOApplication::~AOApplication() -- cgit From 95b8bd72d3aa870c829fb3176a66cc1976a1762d Mon Sep 17 00:00:00 2001 From: Cerapter Date: Sun, 19 Aug 2018 09:17:48 +0200 Subject: Ability to toggle Discord RPC. Reimplementation of `bed0b55e70f13adf772584fc0d31ebfe59597115` from old origin. --- aoapplication.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'aoapplication.cpp') diff --git a/aoapplication.cpp b/aoapplication.cpp index 43af15f7..65dcd543 100644 --- a/aoapplication.cpp +++ b/aoapplication.cpp @@ -45,7 +45,8 @@ void AOApplication::construct_lobby() int y = (screenGeometry.height()-w_lobby->height()) / 2; w_lobby->move(x, y); - discord->state_lobby(); + if (is_discord_enabled()) + discord->state_lobby(); w_lobby->show(); } -- cgit From d314b8dd07f72d94724c3902258dfb2641d3435c Mon Sep 17 00:00:00 2001 From: Cerapter Date: Sun, 19 Aug 2018 09:37:34 +0200 Subject: Moved includes out of the CPP files into the header files. Reimplementation of `30a87d23c9c63bed072b3460e7482075dc530b2c` from the old origin. --- aoapplication.cpp | 4 ---- 1 file changed, 4 deletions(-) (limited to 'aoapplication.cpp') diff --git a/aoapplication.cpp b/aoapplication.cpp index 65dcd543..03679a7d 100644 --- a/aoapplication.cpp +++ b/aoapplication.cpp @@ -7,10 +7,6 @@ #include "aooptionsdialog.h" -#include -#include -#include - AOApplication::AOApplication(int &argc, char **argv) : QApplication(argc, argv) { // Create the QSettings class that points to the config.ini. -- cgit From de8badc9a6e74ca29cbc04ab5438d6eed2eb8984 Mon Sep 17 00:00:00 2001 From: Cerapter Date: Tue, 23 Oct 2018 16:15:15 +0200 Subject: Support for case alerts serverside. - Users can use an ingame button to alert people of cases. --- aoapplication.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'aoapplication.cpp') diff --git a/aoapplication.cpp b/aoapplication.cpp index 03679a7d..67807ff4 100644 --- a/aoapplication.cpp +++ b/aoapplication.cpp @@ -6,6 +6,7 @@ #include "debug_functions.h" #include "aooptionsdialog.h" +#include "aocaseannouncerdialog.h" AOApplication::AOApplication(int &argc, char **argv) : QApplication(argc, argv) { @@ -184,3 +185,11 @@ void AOApplication::call_settings_menu() settings->exec(); delete settings; } + + +void AOApplication::call_announce_menu(Courtroom *court) +{ + AOCaseAnnouncerDialog* announcer = new AOCaseAnnouncerDialog(nullptr, this, court); + announcer->exec(); + delete announcer; +} -- cgit