Merge pull request #335 from AttorneyOnline/white_space

* set no maximize flag on lobby
* set no maximize flag on courtroom
* set no maximize flag on charselect
* stop them from dragging the charselect
* stop them from dragging the courtroom
* stop them from dragging the lobby

Co-authored-by: stonedDiscord <10584181+stonedDiscord@users.noreply.github.com>
This commit is contained in:
oldmud0 2020-11-10 08:56:45 -06:00 committed by GitHub
commit fe3b16829f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 12 additions and 6 deletions

View File

@ -7,6 +7,8 @@
void Courtroom::construct_char_select() void Courtroom::construct_char_select()
{ {
this->setWindowFlags( (this->windowFlags() | Qt::CustomizeWindowHint) & ~Qt::WindowMaximizeButtonHint);
ui_char_select_background = new AOImage(this, ao_app); ui_char_select_background = new AOImage(this, ao_app);
ui_char_buttons = new QWidget(ui_char_select_background); ui_char_buttons = new QWidget(ui_char_select_background);
@ -72,10 +74,10 @@ void Courtroom::set_char_select()
if (f_charselect.width < 0 || f_charselect.height < 0) { if (f_charselect.width < 0 || f_charselect.height < 0) {
qDebug() << "W: did not find char_select width or height in " qDebug() << "W: did not find char_select width or height in "
"courtroom_design.ini!"; "courtroom_design.ini!";
this->resize(714, 668); this->setFixedSize(714, 668);
} }
else 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->resize(f_charselect.width, f_charselect.height);
ui_char_select_background->set_image("charselect_background"); ui_char_select_background->set_image("charselect_background");

View File

@ -3,6 +3,9 @@
Courtroom::Courtroom(AOApplication *p_ao_app) : QMainWindow() Courtroom::Courtroom(AOApplication *p_ao_app) : QMainWindow()
{ {
ao_app = p_ao_app; ao_app = p_ao_app;
this->setWindowFlags( (this->windowFlags() | Qt::CustomizeWindowHint) & ~Qt::WindowMaximizeButtonHint);
ao_app->initBASS(); ao_app->initBASS();
qsrand(static_cast<uint>(QDateTime::currentMSecsSinceEpoch() / 1000)); qsrand(static_cast<uint>(QDateTime::currentMSecsSinceEpoch() / 1000));
@ -451,13 +454,13 @@ void Courtroom::set_widgets()
if (f_courtroom.width < 0 || f_courtroom.height < 0) { if (f_courtroom.width < 0 || f_courtroom.height < 0) {
qDebug() << "W: did not find courtroom width or height in " << filename; qDebug() << "W: did not find courtroom width or height in " << filename;
this->resize(714, 668); this->setFixedSize(714, 668);
} }
else { else {
m_courtroom_width = f_courtroom.width; m_courtroom_width = f_courtroom.width;
m_courtroom_height = f_courtroom.height; m_courtroom_height = f_courtroom.height;
this->resize(f_courtroom.width, f_courtroom.height); this->setFixedSize(f_courtroom.width, f_courtroom.height);
} }
set_fonts(); set_fonts();

View File

@ -13,6 +13,7 @@ Lobby::Lobby(AOApplication *p_ao_app) : QMainWindow()
this->setWindowTitle(tr("Attorney Online 2")); this->setWindowTitle(tr("Attorney Online 2"));
this->setWindowIcon(QIcon(":/logo.png")); this->setWindowIcon(QIcon(":/logo.png"));
this->setWindowFlags( (this->windowFlags() | Qt::CustomizeWindowHint) & ~Qt::WindowMaximizeButtonHint);
ui_background = new AOImage(this, ao_app); ui_background = new AOImage(this, ao_app);
ui_public_servers = new AOButton(this, ao_app); ui_public_servers = new AOButton(this, ao_app);
@ -97,10 +98,10 @@ void Lobby::set_widgets()
"Did you download all resources correctly from tiny.cc/getao, " "Did you download all resources correctly from tiny.cc/getao, "
"including the large 'base' folder?")); "including the large 'base' folder?"));
this->resize(517, 666); this->setFixedSize(517, 666);
} }
else { else {
this->resize(f_lobby.width, f_lobby.height); this->setFixedSize(f_lobby.width, f_lobby.height);
} }
set_size_and_pos(ui_background, "lobby"); set_size_and_pos(ui_background, "lobby");