From c49ce181c92ca2722c06ee5c3c1bd5d8e134a3d1 Mon Sep 17 00:00:00 2001 From: stonedDiscord <10584181+stonedDiscord@users.noreply.github.com> Date: Thu, 5 Nov 2020 23:17:15 +0100 Subject: [PATCH 1/6] set no maximize flag on lobby --- src/lobby.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/lobby.cpp b/src/lobby.cpp index 093b0f7..a1ee400 100644 --- a/src/lobby.cpp +++ b/src/lobby.cpp @@ -13,6 +13,7 @@ Lobby::Lobby(AOApplication *p_ao_app) : QMainWindow() this->setWindowTitle(tr("Attorney Online 2")); this->setWindowIcon(QIcon(":/logo.png")); + this->setWindowFlags( (this->windowFlags() | Qt::CustomizeWindowHint) & ~Qt::WindowMaximizeButtonHint); ui_background = new AOImage(this, ao_app); ui_public_servers = new AOButton(this, ao_app); From 997462ad54f7e42d0fa1062337287f1492e3b111 Mon Sep 17 00:00:00 2001 From: stonedDiscord <10584181+stonedDiscord@users.noreply.github.com> Date: Thu, 5 Nov 2020 23:17:22 +0100 Subject: [PATCH 2/6] set no maximize flag on courtroom --- src/courtroom.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/courtroom.cpp b/src/courtroom.cpp index a12c95a..cdadfe8 100644 --- a/src/courtroom.cpp +++ b/src/courtroom.cpp @@ -3,6 +3,9 @@ Courtroom::Courtroom(AOApplication *p_ao_app) : QMainWindow() { ao_app = p_ao_app; + + this->setWindowFlags( (this->windowFlags() | Qt::CustomizeWindowHint) & ~Qt::WindowMaximizeButtonHint); + ao_app->initBASS(); qsrand(static_cast(QDateTime::currentMSecsSinceEpoch() / 1000)); From c1dfb4928c880dfe9980e2ff39cdd164e15ceb52 Mon Sep 17 00:00:00 2001 From: stonedDiscord <10584181+stonedDiscord@users.noreply.github.com> Date: Thu, 5 Nov 2020 23:17:30 +0100 Subject: [PATCH 3/6] set no maximize flag on charselect --- src/charselect.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/charselect.cpp b/src/charselect.cpp index 8e0aab5..66223f3 100644 --- a/src/charselect.cpp +++ b/src/charselect.cpp @@ -7,6 +7,8 @@ void Courtroom::construct_char_select() { + this->setWindowFlags( (this->windowFlags() | Qt::CustomizeWindowHint) & ~Qt::WindowMaximizeButtonHint); + ui_char_select_background = new AOImage(this, ao_app); ui_char_buttons = new QWidget(ui_char_select_background); From 0a5e5582a361b57829724c8fbe3f30b435254e6e Mon Sep 17 00:00:00 2001 From: stonedDiscord <10584181+stonedDiscord@users.noreply.github.com> Date: Thu, 5 Nov 2020 23:27:43 +0100 Subject: [PATCH 4/6] stop them from dragging the charselect --- src/charselect.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/charselect.cpp b/src/charselect.cpp index 66223f3..b543934 100644 --- a/src/charselect.cpp +++ b/src/charselect.cpp @@ -74,10 +74,10 @@ void Courtroom::set_char_select() if (f_charselect.width < 0 || f_charselect.height < 0) { qDebug() << "W: did not find char_select width or height in " "courtroom_design.ini!"; - this->resize(714, 668); + this->setFixedSize(714, 668); } else - this->resize(f_charselect.width, f_charselect.height); + this->setFixedSize(f_charselect.width, f_charselect.height); ui_char_select_background->resize(f_charselect.width, f_charselect.height); ui_char_select_background->set_image("charselect_background"); From 1e1ada7437f809ca87827772860c64e8a658602b Mon Sep 17 00:00:00 2001 From: stonedDiscord <10584181+stonedDiscord@users.noreply.github.com> Date: Thu, 5 Nov 2020 23:27:49 +0100 Subject: [PATCH 5/6] stop them from dragging the courtroom --- src/courtroom.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/courtroom.cpp b/src/courtroom.cpp index cdadfe8..300d274 100644 --- a/src/courtroom.cpp +++ b/src/courtroom.cpp @@ -449,13 +449,13 @@ void Courtroom::set_widgets() if (f_courtroom.width < 0 || f_courtroom.height < 0) { qDebug() << "W: did not find courtroom width or height in " << filename; - this->resize(714, 668); + this->setFixedSize(714, 668); } else { m_courtroom_width = f_courtroom.width; m_courtroom_height = f_courtroom.height; - this->resize(f_courtroom.width, f_courtroom.height); + this->setFixedSize(f_courtroom.width, f_courtroom.height); } set_fonts(); From 2dbedf516391c8f432bfc5a2d2749ba054a78e06 Mon Sep 17 00:00:00 2001 From: stonedDiscord <10584181+stonedDiscord@users.noreply.github.com> Date: Thu, 5 Nov 2020 23:27:58 +0100 Subject: [PATCH 6/6] stop them from dragging the lobby --- src/lobby.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lobby.cpp b/src/lobby.cpp index a1ee400..8945d4e 100644 --- a/src/lobby.cpp +++ b/src/lobby.cpp @@ -98,10 +98,10 @@ void Lobby::set_widgets() "Did you download all resources correctly from tiny.cc/getao, " "including the large 'base' folder?")); - this->resize(517, 666); + this->setFixedSize(517, 666); } else { - this->resize(f_lobby.width, f_lobby.height); + this->setFixedSize(f_lobby.width, f_lobby.height); } set_size_and_pos(ui_background, "lobby");