started making the loading screen
This commit is contained in:
		
							parent
							
								
									7e666b7cd1
								
							
						
					
					
						commit
						58d98e41be
					
				@ -57,6 +57,8 @@ public:
 | 
				
			|||||||
  int music_list_size = 0;
 | 
					  int music_list_size = 0;
 | 
				
			||||||
  int loaded_music = 0;
 | 
					  int loaded_music = 0;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  //////////////////versioning///////////////
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  int get_release() {return RELEASE;}
 | 
					  int get_release() {return RELEASE;}
 | 
				
			||||||
  int get_major_version() {return MAJOR_VERSION;}
 | 
					  int get_major_version() {return MAJOR_VERSION;}
 | 
				
			||||||
  int get_minor_version() {return MINOR_VERSION;}
 | 
					  int get_minor_version() {return MINOR_VERSION;}
 | 
				
			||||||
 | 
				
			|||||||
							
								
								
									
										21
									
								
								lobby.cpp
									
									
									
									
									
								
							
							
						
						
									
										21
									
								
								lobby.cpp
									
									
									
									
									
								
							@ -28,6 +28,10 @@ Lobby::Lobby(AOApplication *p_ao_app) : QMainWindow()
 | 
				
			|||||||
  ui_chatbox = new QPlainTextEdit(this);
 | 
					  ui_chatbox = new QPlainTextEdit(this);
 | 
				
			||||||
  ui_chatname = new QLineEdit(this);
 | 
					  ui_chatname = new QLineEdit(this);
 | 
				
			||||||
  ui_chatmessage = new QLineEdit(this);
 | 
					  ui_chatmessage = new QLineEdit(this);
 | 
				
			||||||
 | 
					  ui_loading_background = new AOImage(this, ao_app);
 | 
				
			||||||
 | 
					  ui_loading_label = new QLabel(ui_loading_background);
 | 
				
			||||||
 | 
					  ui_progress_bar = new QProgressBar(ui_loading_background);
 | 
				
			||||||
 | 
					  ui_cancel = new AOButton(ui_loading_background, ao_app);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  connect(ui_public_servers, SIGNAL(clicked()), this, SLOT(on_public_servers_clicked()));
 | 
					  connect(ui_public_servers, SIGNAL(clicked()), this, SLOT(on_public_servers_clicked()));
 | 
				
			||||||
  connect(ui_favorites, SIGNAL(clicked()), this, SLOT(on_favorites_clicked()));
 | 
					  connect(ui_favorites, SIGNAL(clicked()), this, SLOT(on_favorites_clicked()));
 | 
				
			||||||
@ -97,6 +101,16 @@ void Lobby::set_widgets()
 | 
				
			|||||||
  ui_chatmessage->setStyleSheet("background-color: rgba(0, 0, 0, 0);"
 | 
					  ui_chatmessage->setStyleSheet("background-color: rgba(0, 0, 0, 0);"
 | 
				
			||||||
                                "selection-background-color: rgba(0, 0, 0, 0);");
 | 
					                                "selection-background-color: rgba(0, 0, 0, 0);");
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  ui_loading_background->set_image("loadingbackground.png");
 | 
				
			||||||
 | 
					  ui_loading_background->resize(m_lobby_width, m_lobby_height);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  set_size_and_pos(ui_loading_label, "loading_label");
 | 
				
			||||||
 | 
					  set_size_and_pos(ui_progress_bar, "progress_bar");
 | 
				
			||||||
 | 
					  set_size_and_pos(ui_cancel, "cancel");
 | 
				
			||||||
 | 
					  ui_cancel->setText("Cancel");
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  ui_loading_background->hide();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
void Lobby::set_size_and_pos(QWidget *p_widget, QString p_identifier)
 | 
					void Lobby::set_size_and_pos(QWidget *p_widget, QString p_identifier)
 | 
				
			||||||
@ -185,11 +199,8 @@ void Lobby::on_connect_released()
 | 
				
			|||||||
{
 | 
					{
 | 
				
			||||||
  ui_connect->set_image("connect.png");
 | 
					  ui_connect->set_image("connect.png");
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  //D3BUG
 | 
					  AOPacket *f_packet = new AOPacket("askchaa#%");
 | 
				
			||||||
  //AOPacket *f_packet = new AOPacket("askchaa#%");
 | 
					  ao_app->send_server_packet(f_packet);
 | 
				
			||||||
  ao_app->construct_courtroom();
 | 
					 | 
				
			||||||
  //ao_app->send_server_packet(f_packet);
 | 
					 | 
				
			||||||
  //D3BUG END
 | 
					 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
void Lobby::on_about_clicked()
 | 
					void Lobby::on_about_clicked()
 | 
				
			||||||
 | 
				
			|||||||
							
								
								
									
										6
									
								
								lobby.h
									
									
									
									
									
								
							
							
						
						
									
										6
									
								
								lobby.h
									
									
									
									
									
								
							@ -10,6 +10,7 @@
 | 
				
			|||||||
#include <QLabel>
 | 
					#include <QLabel>
 | 
				
			||||||
#include <QPlainTextEdit>
 | 
					#include <QPlainTextEdit>
 | 
				
			||||||
#include <QLineEdit>
 | 
					#include <QLineEdit>
 | 
				
			||||||
 | 
					#include <QProgressBar>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
class AOApplication;
 | 
					class AOApplication;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -57,6 +58,11 @@ private:
 | 
				
			|||||||
  QLineEdit *ui_chatname;
 | 
					  QLineEdit *ui_chatname;
 | 
				
			||||||
  QLineEdit *ui_chatmessage;
 | 
					  QLineEdit *ui_chatmessage;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  AOImage *ui_loading_background;
 | 
				
			||||||
 | 
					  QLabel *ui_loading_label;
 | 
				
			||||||
 | 
					  QProgressBar *ui_progress_bar;
 | 
				
			||||||
 | 
					  AOButton *ui_cancel;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  void set_size_and_pos(QWidget *p_widget, QString p_identifier);
 | 
					  void set_size_and_pos(QWidget *p_widget, QString p_identifier);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
private slots:
 | 
					private slots:
 | 
				
			||||||
 | 
				
			|||||||
@ -182,8 +182,22 @@ void AOApplication::server_packet_received(AOPacket *p_packet)
 | 
				
			|||||||
      send_server_packet(f_packet);
 | 
					      send_server_packet(f_packet);
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    else if (loaded_chars >= char_list_size)
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					      if (evidence_list_size == 0)
 | 
				
			||||||
 | 
					        send_server_packet(new AOPacket("AM#0#%"));
 | 
				
			||||||
 | 
					      else
 | 
				
			||||||
 | 
					        send_server_packet(new AOPacket("AE#0#%"));
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
 | 
					  else if (header == "EI"){
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
 | 
					  else if (header == "EM"){
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
		Reference in New Issue
	
	Block a user