implemented text color change
This commit is contained in:
parent
2b7189f470
commit
1243662c9c
@ -43,8 +43,11 @@ public:
|
|||||||
|
|
||||||
unsigned int s_decryptor = 5;
|
unsigned int s_decryptor = 5;
|
||||||
bool encryption_needed = true;
|
bool encryption_needed = true;
|
||||||
|
//T0D0: make this obsolete and break into smaller bools
|
||||||
bool ao2_features = false;
|
bool ao2_features = false;
|
||||||
|
|
||||||
|
bool yellow_text_enabled = false;
|
||||||
|
|
||||||
///////////////loading info///////////////////
|
///////////////loading info///////////////////
|
||||||
|
|
||||||
//player number, it's hardly used but might be needed for some old servers
|
//player number, it's hardly used but might be needed for some old servers
|
||||||
|
@ -120,6 +120,13 @@ Courtroom::Courtroom(AOApplication *p_ao_app) : QMainWindow()
|
|||||||
ui_prosecution_minus = new AOButton(this, ao_app);
|
ui_prosecution_minus = new AOButton(this, ao_app);
|
||||||
|
|
||||||
ui_text_color = new QComboBox(this);
|
ui_text_color = new QComboBox(this);
|
||||||
|
ui_text_color->addItem("White");
|
||||||
|
ui_text_color->addItem("Green");
|
||||||
|
ui_text_color->addItem("Red");
|
||||||
|
ui_text_color->addItem("Orange");
|
||||||
|
ui_text_color->addItem("Blue");
|
||||||
|
if (ao_app->yellow_text_enabled)
|
||||||
|
ui_text_color->addItem("Yellow");
|
||||||
|
|
||||||
ui_music_slider = new QSlider(Qt::Horizontal, this);
|
ui_music_slider = new QSlider(Qt::Horizontal, this);
|
||||||
ui_music_slider->setRange(0, 100);
|
ui_music_slider->setRange(0, 100);
|
||||||
@ -214,6 +221,8 @@ Courtroom::Courtroom(AOApplication *p_ao_app) : QMainWindow()
|
|||||||
connect(ui_prosecution_minus, SIGNAL(clicked()), this, SLOT(on_prosecution_minus_clicked()));
|
connect(ui_prosecution_minus, SIGNAL(clicked()), this, SLOT(on_prosecution_minus_clicked()));
|
||||||
connect(ui_prosecution_plus, SIGNAL(clicked()), this, SLOT(on_prosecution_plus_clicked()));
|
connect(ui_prosecution_plus, SIGNAL(clicked()), this, SLOT(on_prosecution_plus_clicked()));
|
||||||
|
|
||||||
|
connect(ui_text_color, SIGNAL(currentIndexChanged(int)), this, SLOT(on_text_color_changed(int)));
|
||||||
|
|
||||||
connect(ui_ooc_toggle, SIGNAL(clicked()), this, SLOT(on_ooc_toggle_clicked()));
|
connect(ui_ooc_toggle, SIGNAL(clicked()), this, SLOT(on_ooc_toggle_clicked()));
|
||||||
|
|
||||||
connect(ui_music_search, SIGNAL(textChanged(QString)), this, SLOT(on_music_search_edited(QString)));
|
connect(ui_music_search, SIGNAL(textChanged(QString)), this, SLOT(on_music_search_edited(QString)));
|
||||||
@ -1415,6 +1424,11 @@ void Courtroom::on_prosecution_plus_clicked()
|
|||||||
ao_app->send_server_packet(new AOPacket("HP#2#" + QString::number(f_state) + "#%"));
|
ao_app->send_server_packet(new AOPacket("HP#2#" + QString::number(f_state) + "#%"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void Courtroom::on_text_color_changed(int p_color)
|
||||||
|
{
|
||||||
|
text_color = p_color;
|
||||||
|
}
|
||||||
|
|
||||||
void Courtroom::on_witness_testimony_clicked()
|
void Courtroom::on_witness_testimony_clicked()
|
||||||
{
|
{
|
||||||
ao_app->send_server_packet(new AOPacket("RT#testimony1#%"));
|
ao_app->send_server_packet(new AOPacket("RT#testimony1#%"));
|
||||||
|
@ -285,6 +285,8 @@ private slots:
|
|||||||
void on_prosecution_minus_clicked();
|
void on_prosecution_minus_clicked();
|
||||||
void on_prosecution_plus_clicked();
|
void on_prosecution_plus_clicked();
|
||||||
|
|
||||||
|
void on_text_color_changed(int p_color);
|
||||||
|
|
||||||
void on_ooc_toggle_clicked();
|
void on_ooc_toggle_clicked();
|
||||||
|
|
||||||
void on_witness_testimony_clicked();
|
void on_witness_testimony_clicked();
|
||||||
|
@ -107,6 +107,10 @@ void AOApplication::server_packet_received(AOPacket *p_packet)
|
|||||||
if (f_contents.size() < 2)
|
if (f_contents.size() < 2)
|
||||||
goto end;
|
goto end;
|
||||||
|
|
||||||
|
ao2_features = false;
|
||||||
|
yellow_text_enabled = false;
|
||||||
|
encryption_needed = true;
|
||||||
|
|
||||||
//T0D0: store server version
|
//T0D0: store server version
|
||||||
}
|
}
|
||||||
else if (header == "CT")
|
else if (header == "CT")
|
||||||
|
Loading…
Reference in New Issue
Block a user