The connect button is disabled until you get an FL package from a server.
This commit is contained in:
parent
bed38e0b7f
commit
fc72ff4234
@ -48,6 +48,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();
|
||||
}
|
||||
|
||||
@ -311,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);
|
||||
}
|
||||
|
||||
@ -371,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()
|
||||
{
|
||||
|
||||
|
1
lobby.h
1
lobby.h
@ -37,6 +37,7 @@ public:
|
||||
void hide_loading_overlay(){ui_loading_background->hide();}
|
||||
QString get_chatlog();
|
||||
int get_selected_server();
|
||||
void enable_connect_button();
|
||||
|
||||
void set_loading_value(int p_value);
|
||||
|
||||
|
@ -206,6 +206,8 @@ void AOApplication::server_packet_received(AOPacket *p_packet)
|
||||
arup_enabled = true;
|
||||
if (f_packet.contains("modcall_reason",Qt::CaseInsensitive))
|
||||
modcall_reason_enabled = true;
|
||||
|
||||
w_lobby->enable_connect_button();
|
||||
}
|
||||
else if (header == "PN")
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user