aboutsummaryrefslogtreecommitdiff
path: root/lobby.cpp
diff options
context:
space:
mode:
authoroldmud0 <oldmud0@users.noreply.github.com>2018-12-15 11:02:12 -0600
committerGitHub <noreply@github.com>2018-12-15 11:02:12 -0600
commitde6877409714417c8fb29d66d1ae1ef098b82644 (patch)
treedb79ef284b2223daa1bee48056a96a81310945bf /lobby.cpp
parent3ef743da7b8071e0dc4b1189cbe131f65f11b5de (diff)
parent6d1ea9d81fc02fbc481d93af549003db954aa1f7 (diff)
Merge pull request #33 from AttorneyOnline/mega-merge
AOV/Case Cafe feature parity
Diffstat (limited to 'lobby.cpp')
-rw-r--r--lobby.cpp43
1 files changed, 24 insertions, 19 deletions
diff --git a/lobby.cpp b/lobby.cpp
index c0dbf0c3..5158a1fb 100644
--- a/lobby.cpp
+++ b/lobby.cpp
@@ -5,14 +5,12 @@
#include "networkmanager.h"
#include "aosfxplayer.h"
-#include <QDebug>
-#include <QScrollBar>
-
Lobby::Lobby(AOApplication *p_ao_app) : QMainWindow()
{
ao_app = p_ao_app;
this->setWindowTitle("Attorney Online 2");
+ this->setWindowIcon(QIcon(":/logo.png"));
ui_background = new AOImage(this, ao_app);
ui_public_servers = new AOButton(this, ao_app);
@@ -52,6 +50,8 @@ Lobby::Lobby(AOApplication *p_ao_app) : QMainWindow()
connect(ui_chatmessage, SIGNAL(returnPressed()), this, SLOT(on_chatfield_return_pressed()));
connect(ui_cancel, SIGNAL(clicked()), ao_app, SLOT(loading_cancelled()));
+ ui_connect->setEnabled(false);
+
set_widgets();
}
@@ -265,21 +265,19 @@ void Lobby::on_connect_released()
void Lobby::on_about_clicked()
{
- call_notice("Attorney Online 2 is built using Qt 5.7\n\n"
- "Lead development:\n"
- "OmniTroid\n\n"
- "stonedDiscord\n"
- "longbyte1\n"
- "Supporting development:\n"
- "Fiercy\n\n"
- "UI design:\n"
- "Ruekasu\n"
- "Draxirch\n\n"
- "Special thanks:\n"
- "Unishred\n"
- "Argoneus\n"
- "Noevain\n"
- "Cronnicossy");
+ QString msg = tr("<h2>Attorney Online %1</h2>"
+ "The courtroom drama simulator"
+ "<p><b>Source code:</b> "
+ "<a href='https://github.com/AttorneyOnline/AO2-Client'>"
+ "https://github.com/AttorneyOnline/AO2-Client</a>"
+ "<p><b>Major development:</b><br>"
+ "OmniTroid, stonedDiscord, longbyte1, gameboyprinter, Cerapter"
+ "<p><b>Special thanks:</b><br>"
+ "Remy, Iamgoofball, Hibiki, Qubrick (webAO), Ruekasu (UI design), "
+ "Draxirch (UI design), Unishred, Argoneus (tsuserver), Fiercy, "
+ "Noevain, Cronnicossy")
+ .arg(ao_app->get_version_string());
+ QMessageBox::about(this, "About", msg);
}
void Lobby::on_server_list_clicked(QModelIndex p_model)
@@ -315,6 +313,8 @@ void Lobby::on_server_list_clicked(QModelIndex p_model)
ui_player_count->setText("Offline");
+ ui_connect->setEnabled(false);
+
ao_app->net_manager->connect_to_server(f_server);
}
@@ -361,7 +361,7 @@ void Lobby::list_favorites()
void Lobby::append_chatmessage(QString f_name, QString f_message)
{
- ui_chatbox->append_chatmessage(f_name, f_message);
+ ui_chatbox->append_chatmessage(f_name, f_message, ao_app->get_color("ooc_default_color", "courtroom_design.ini").name());
}
void Lobby::append_error(QString f_message)
@@ -375,6 +375,11 @@ void Lobby::set_player_count(int players_online, int max_players)
ui_player_count->setText(f_string);
}
+void Lobby::enable_connect_button()
+{
+ ui_connect->setEnabled(true);
+}
+
Lobby::~Lobby()
{