Merge branch 'master' of https://github.com/Attorney-Online-Engineering-Task-Force/Attorney-Online-Client-Remake.git
This commit is contained in:
		
						commit
						fd1ece1ac1
					
				@ -148,15 +148,15 @@ Courtroom::Courtroom(AOApplication *p_ao_app) : QMainWindow()
 | 
			
		||||
 | 
			
		||||
  ui_music_slider = new QSlider(Qt::Horizontal, this);
 | 
			
		||||
  ui_music_slider->setRange(0, 100);
 | 
			
		||||
  ui_music_slider->setValue(0);
 | 
			
		||||
  ui_music_slider->setValue(50);
 | 
			
		||||
 | 
			
		||||
  ui_sfx_slider = new QSlider(Qt::Horizontal, this);
 | 
			
		||||
  ui_sfx_slider->setRange(0, 100);
 | 
			
		||||
  ui_sfx_slider->setValue(0);
 | 
			
		||||
  ui_sfx_slider->setValue(50);
 | 
			
		||||
 | 
			
		||||
  ui_blip_slider = new QSlider(Qt::Horizontal, this);
 | 
			
		||||
  ui_blip_slider->setRange(0, 100);
 | 
			
		||||
  ui_blip_slider->setValue(0);
 | 
			
		||||
  ui_blip_slider->setValue(50);
 | 
			
		||||
 | 
			
		||||
  /////////////char select widgets under here///////////////
 | 
			
		||||
 | 
			
		||||
@ -354,8 +354,10 @@ void Courtroom::set_widgets()
 | 
			
		||||
 | 
			
		||||
  set_size_and_pos(ui_vp_showname, "showname");
 | 
			
		||||
  QFont pt_8 = ui_vp_showname->font();
 | 
			
		||||
  QFont pt_9 = ui_vp_showname->font();
 | 
			
		||||
  QFont pt_10 = ui_vp_showname->font();
 | 
			
		||||
  pt_8.setPointSize(8);
 | 
			
		||||
  pt_9.setPointSize(9);
 | 
			
		||||
  pt_10.setPointSize(10);
 | 
			
		||||
  ui_vp_showname->setFont(pt_8);
 | 
			
		||||
  ui_vp_showname->setStyleSheet("background-color: rgba(0, 0, 0, 0);"
 | 
			
		||||
@ -363,7 +365,11 @@ void Courtroom::set_widgets()
 | 
			
		||||
 | 
			
		||||
  set_size_and_pos(ui_vp_message, "message");
 | 
			
		||||
  ui_vp_message->setReadOnly(true);
 | 
			
		||||
  #if (defined (_WIN32) || defined (_WIN64))
 | 
			
		||||
  ui_vp_message->setFont(pt_10);
 | 
			
		||||
  #else
 | 
			
		||||
  ui_vp_message->setFont(pt_9);
 | 
			
		||||
  #endif
 | 
			
		||||
  ui_vp_message->setStyleSheet("background-color: rgba(0, 0, 0, 0);"
 | 
			
		||||
                               "color: white");
 | 
			
		||||
 | 
			
		||||
@ -384,7 +390,11 @@ void Courtroom::set_widgets()
 | 
			
		||||
  ui_vp_objection->combo_resize(ui_viewport->width(), ui_viewport->height());
 | 
			
		||||
 | 
			
		||||
  set_size_and_pos(ui_ic_chatlog, "ic_chatlog");
 | 
			
		||||
  #if (defined (_WIN32) || defined (_WIN64))
 | 
			
		||||
  ui_ic_chatlog->setFont(pt_10);
 | 
			
		||||
  #else
 | 
			
		||||
  ui_ic_chatlog->setFont(pt_9);
 | 
			
		||||
  #endif
 | 
			
		||||
  ui_ic_chatlog->setStyleSheet("background-color: rgba(0, 0, 0, 0);"
 | 
			
		||||
                               "color: white;");
 | 
			
		||||
 | 
			
		||||
@ -568,6 +578,17 @@ void Courtroom::set_taken(int n_char, bool p_taken)
 | 
			
		||||
  char_list.replace(n_char, f_char);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void Courtroom::done_received()
 | 
			
		||||
{
 | 
			
		||||
  m_cid = -1;
 | 
			
		||||
 | 
			
		||||
  set_char_select_page();
 | 
			
		||||
 | 
			
		||||
  set_mute_list();
 | 
			
		||||
 | 
			
		||||
  show();
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void Courtroom::set_char_select_page()
 | 
			
		||||
{
 | 
			
		||||
  ui_char_select_background->show();
 | 
			
		||||
@ -686,9 +707,9 @@ void Courtroom::enter_courtroom(int p_cid)
 | 
			
		||||
 | 
			
		||||
  list_music();
 | 
			
		||||
 | 
			
		||||
  ui_music_slider->setValue(50);
 | 
			
		||||
  ui_sfx_slider->setValue(50);
 | 
			
		||||
  ui_blip_slider->setValue(50);
 | 
			
		||||
  music_player->set_volume(ui_music_slider->value());
 | 
			
		||||
  sfx_player->set_volume(ui_sfx_slider->value());
 | 
			
		||||
  blip_player->set_volume(ui_blip_slider->value());
 | 
			
		||||
 | 
			
		||||
  testimony_in_progress = false;
 | 
			
		||||
 | 
			
		||||
@ -1685,6 +1706,10 @@ void Courtroom::on_cross_examination_clicked()
 | 
			
		||||
 | 
			
		||||
void Courtroom::on_change_character_clicked()
 | 
			
		||||
{
 | 
			
		||||
  music_player->set_volume(0);
 | 
			
		||||
  sfx_player->set_volume(0);
 | 
			
		||||
  blip_player->set_volume(0);
 | 
			
		||||
 | 
			
		||||
  ui_char_select_background->show();
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@ -46,6 +46,8 @@ public:
 | 
			
		||||
  void set_char_select_page();
 | 
			
		||||
  void set_background(QString p_background);
 | 
			
		||||
 | 
			
		||||
  void done_received();
 | 
			
		||||
 | 
			
		||||
  void set_mute_list();
 | 
			
		||||
 | 
			
		||||
  //sets desk and bg based on pos in chatmessage
 | 
			
		||||
 | 
			
		||||
@ -21,6 +21,7 @@ Lobby::Lobby(AOApplication *p_ao_app) : QMainWindow()
 | 
			
		||||
  ui_refresh = new AOButton(this, ao_app);
 | 
			
		||||
  ui_add_to_fav = new AOButton(this, ao_app);
 | 
			
		||||
  ui_connect = new AOButton(this, ao_app);
 | 
			
		||||
  ui_version = new QLabel(this);
 | 
			
		||||
  ui_about = new AOButton(this, ao_app);
 | 
			
		||||
  ui_server_list = new QListWidget(this);
 | 
			
		||||
  ui_player_count = new QLabel(this);
 | 
			
		||||
@ -75,6 +76,9 @@ void Lobby::set_widgets()
 | 
			
		||||
  ui_connect->set_image("connect.png");
 | 
			
		||||
  set_size_and_pos(ui_connect, "connect");
 | 
			
		||||
 | 
			
		||||
  ui_version->setText("Version: " + ao_app->get_version_string());
 | 
			
		||||
  set_size_and_pos(ui_version, "version");
 | 
			
		||||
 | 
			
		||||
  ui_about->set_image("about.png");
 | 
			
		||||
  set_size_and_pos(ui_about, "about");
 | 
			
		||||
 | 
			
		||||
@ -95,7 +99,7 @@ void Lobby::set_widgets()
 | 
			
		||||
 | 
			
		||||
  set_size_and_pos(ui_chatbox, "chatbox");
 | 
			
		||||
  ui_chatbox->setReadOnly(true);
 | 
			
		||||
  ui_chatbox->setStyleSheet("background-color: rgba(0, 0, 0, 0);");
 | 
			
		||||
  ui_chatbox->setStyleSheet("QPlainTextEdit{background-color: rgba(0, 0, 0, 0);}");
 | 
			
		||||
 | 
			
		||||
  set_size_and_pos(ui_chatname, "chatname");
 | 
			
		||||
  ui_chatname->setStyleSheet("background-color: rgba(0, 0, 0, 0);"
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										1
									
								
								lobby.h
									
									
									
									
									
								
							
							
						
						
									
										1
									
								
								lobby.h
									
									
									
									
									
								
							@ -53,6 +53,7 @@ private:
 | 
			
		||||
  AOButton *ui_add_to_fav;
 | 
			
		||||
  AOButton *ui_connect;
 | 
			
		||||
 | 
			
		||||
  QLabel *ui_version;
 | 
			
		||||
  AOButton *ui_about;
 | 
			
		||||
 | 
			
		||||
  QListWidget *ui_server_list;
 | 
			
		||||
 | 
			
		||||
@ -344,6 +344,9 @@ void AOApplication::server_packet_received(AOPacket *p_packet)
 | 
			
		||||
  }
 | 
			
		||||
  else if (header == "CharsCheck")
 | 
			
		||||
  {
 | 
			
		||||
    if (!courtroom_constructed)
 | 
			
		||||
      goto end;
 | 
			
		||||
 | 
			
		||||
    for (int n_char = 0 ; n_char < f_contents.size() ; ++n_char)
 | 
			
		||||
    {
 | 
			
		||||
      if (f_contents.at(n_char) == "-1")
 | 
			
		||||
@ -425,13 +428,10 @@ void AOApplication::server_packet_received(AOPacket *p_packet)
 | 
			
		||||
    if (!courtroom_constructed)
 | 
			
		||||
      goto end;
 | 
			
		||||
 | 
			
		||||
    w_courtroom->set_char_select_page();
 | 
			
		||||
 | 
			
		||||
    if (lobby_constructed)
 | 
			
		||||
      w_courtroom->append_ms_chatmessage(w_lobby->get_chatlog());
 | 
			
		||||
 | 
			
		||||
    w_courtroom->set_mute_list();
 | 
			
		||||
 | 
			
		||||
    w_courtroom->show();
 | 
			
		||||
    w_courtroom->done_received();
 | 
			
		||||
 | 
			
		||||
    destruct_lobby();
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
		Loading…
	
		Reference in New Issue
	
	Block a user