Stop supporting the DRO way (we will make a .bat file or utility that does it for you automatically instead!)
Add an option to enable/disable stickers Make stickers actually respect the custom chatbox setting properly
This commit is contained in:
parent
5063880530
commit
63128fea13
@ -228,6 +228,9 @@ public:
|
|||||||
// for settings.
|
// for settings.
|
||||||
bool is_customchat_enabled();
|
bool is_customchat_enabled();
|
||||||
|
|
||||||
|
// Returns the value of characer sticker (avatar) setting
|
||||||
|
bool is_sticker_enabled();
|
||||||
|
|
||||||
// Returns the value of whether continuous playback should be used
|
// Returns the value of whether continuous playback should be used
|
||||||
// from the config.ini.
|
// from the config.ini.
|
||||||
bool is_continuous_enabled();
|
bool is_continuous_enabled();
|
||||||
|
@ -108,6 +108,9 @@ private:
|
|||||||
QLabel *ui_customchat_lbl;
|
QLabel *ui_customchat_lbl;
|
||||||
QCheckBox *ui_customchat_cb;
|
QCheckBox *ui_customchat_cb;
|
||||||
|
|
||||||
|
QLabel *ui_sticker_lbl;
|
||||||
|
QCheckBox *ui_sticker_cb;
|
||||||
|
|
||||||
QLabel *ui_continuous_lbl;
|
QLabel *ui_continuous_lbl;
|
||||||
QCheckBox *ui_continuous_cb;
|
QCheckBox *ui_continuous_cb;
|
||||||
|
|
||||||
|
@ -240,12 +240,11 @@ void InterfaceLayer::load_image(QString p_filename, QString p_miscname)
|
|||||||
|
|
||||||
void StickerLayer::load_image(QString p_charname)
|
void StickerLayer::load_image(QString p_charname)
|
||||||
{
|
{
|
||||||
QString p_miscname = ao_app->get_chat(p_charname);
|
QString p_miscname;
|
||||||
|
if (ao_app->is_customchat_enabled())
|
||||||
|
p_miscname = ao_app->get_chat(p_charname);
|
||||||
transform_mode = ao_app->get_misc_scaling(p_miscname);
|
transform_mode = ao_app->get_misc_scaling(p_miscname);
|
||||||
QString final_image = ao_app->get_image("sticker/" + p_charname, ao_app->current_theme, ao_app->get_subtheme(), ao_app->default_theme, p_miscname);
|
QString final_image = ao_app->get_image("sticker/" + p_charname, ao_app->current_theme, ao_app->get_subtheme(), ao_app->default_theme, p_miscname);
|
||||||
if (!file_exists((final_image)))
|
|
||||||
final_image = ao_app->get_image_suffix(
|
|
||||||
ao_app->get_character_path(p_charname, "showname")), // Scuffed DRO way
|
|
||||||
start_playback(final_image);
|
start_playback(final_image);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -485,6 +485,19 @@ AOOptionsDialog::AOOptionsDialog(QWidget *parent, AOApplication *p_ao_app)
|
|||||||
|
|
||||||
ui_gameplay_form->setWidget(row, QFormLayout::FieldRole, ui_customchat_cb);
|
ui_gameplay_form->setWidget(row, QFormLayout::FieldRole, ui_customchat_cb);
|
||||||
|
|
||||||
|
row += 1;
|
||||||
|
ui_sticker_lbl = new QLabel(ui_form_layout_widget);
|
||||||
|
ui_sticker_lbl->setText(tr("Stickers:"));
|
||||||
|
ui_sticker_lbl->setToolTip(
|
||||||
|
tr("Turn this on to allow characters to define their own "
|
||||||
|
"stickers (unique images that show up over the chatbox - like avatars or shownames)."));
|
||||||
|
|
||||||
|
ui_gameplay_form->setWidget(row, QFormLayout::LabelRole, ui_sticker_lbl);
|
||||||
|
|
||||||
|
ui_sticker_cb = new QCheckBox(ui_form_layout_widget);
|
||||||
|
|
||||||
|
ui_gameplay_form->setWidget(row, QFormLayout::FieldRole, ui_sticker_cb);
|
||||||
|
|
||||||
row += 1;
|
row += 1;
|
||||||
ui_continuous_lbl = new QLabel(ui_form_layout_widget);
|
ui_continuous_lbl = new QLabel(ui_form_layout_widget);
|
||||||
ui_continuous_lbl->setText(tr("Continuous Playback:"));
|
ui_continuous_lbl->setText(tr("Continuous Playback:"));
|
||||||
@ -909,6 +922,7 @@ void AOOptionsDialog::update_values() {
|
|||||||
ui_stickyeffects_cb->setChecked(ao_app->is_stickyeffects_enabled());
|
ui_stickyeffects_cb->setChecked(ao_app->is_stickyeffects_enabled());
|
||||||
ui_stickypres_cb->setChecked(ao_app->is_stickypres_enabled());
|
ui_stickypres_cb->setChecked(ao_app->is_stickypres_enabled());
|
||||||
ui_customchat_cb->setChecked(ao_app->is_customchat_enabled());
|
ui_customchat_cb->setChecked(ao_app->is_customchat_enabled());
|
||||||
|
ui_sticker_cb->setChecked(ao_app->is_sticker_enabled());
|
||||||
ui_continuous_cb->setChecked(ao_app->is_continuous_enabled());
|
ui_continuous_cb->setChecked(ao_app->is_continuous_enabled());
|
||||||
ui_category_stop_cb->setChecked(ao_app->is_category_stop_enabled());
|
ui_category_stop_cb->setChecked(ao_app->is_category_stop_enabled());
|
||||||
ui_blank_blips_cb->setChecked(ao_app->get_blank_blip());
|
ui_blank_blips_cb->setChecked(ao_app->get_blank_blip());
|
||||||
|
@ -3209,7 +3209,8 @@ void Courtroom::start_chat_ticking()
|
|||||||
ui_vp_chatbox->show();
|
ui_vp_chatbox->show();
|
||||||
ui_vp_message->show();
|
ui_vp_message->show();
|
||||||
|
|
||||||
ui_vp_sticker->load_image(m_chatmessage[CHAR_NAME]);
|
if (ao_app->is_sticker_enabled())
|
||||||
|
ui_vp_sticker->load_image(m_chatmessage[CHAR_NAME]);
|
||||||
|
|
||||||
if (m_chatmessage[ADDITIVE] != "1") {
|
if (m_chatmessage[ADDITIVE] != "1") {
|
||||||
ui_vp_message->clear();
|
ui_vp_message->clear();
|
||||||
|
@ -981,6 +981,12 @@ bool AOApplication::is_customchat_enabled()
|
|||||||
return result.startsWith("true");
|
return result.startsWith("true");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool AOApplication::is_sticker_enabled()
|
||||||
|
{
|
||||||
|
QString result = configini->value("sticker", "true").value<QString>();
|
||||||
|
return result.startsWith("true");
|
||||||
|
}
|
||||||
|
|
||||||
bool AOApplication::is_continuous_enabled()
|
bool AOApplication::is_continuous_enabled()
|
||||||
{
|
{
|
||||||
QString result = configini->value("continuous_playback", "true").value<QString>();
|
QString result = configini->value("continuous_playback", "true").value<QString>();
|
||||||
|
Loading…
Reference in New Issue
Block a user