@@ -381,6 +381,20 @@ AOOptionsDialog::AOOptionsDialog(QWidget *parent, AOApplication *p_ao_app)
381381 ui_gameplay_form->setWidget (row, QFormLayout::FieldRole,
382382 ui_language_combobox);
383383
384+ row += 1 ;
385+ ui_scaling_label = new QLabel (ui_form_layout_widget);
386+ ui_scaling_label->setText (tr (" Scaling:" ));
387+ ui_scaling_label->setToolTip (
388+ tr (" Sets the default scaling method, if there is not one already defined "
389+ " specifically for the character." ));
390+ ui_gameplay_form->setWidget (row, QFormLayout::LabelRole, ui_scaling_label);
391+
392+ ui_scaling_combobox = new QComboBox (ui_form_layout_widget);
393+ // Corresponds with Qt::TransformationMode enum. Please don't change the order.
394+ ui_scaling_combobox->addItem (tr (" Pixel" ), " fast" );
395+ ui_scaling_combobox->addItem (tr (" Smooth" ), " smooth" );
396+ ui_gameplay_form->setWidget (row, QFormLayout::FieldRole, ui_scaling_combobox);
397+
384398 row += 1 ;
385399 ui_shake_lbl = new QLabel (ui_form_layout_widget);
386400 ui_shake_lbl->setText (tr (" Allow Screenshake:" ));
@@ -896,6 +910,9 @@ void AOOptionsDialog::update_values() {
896910 break ;
897911 }
898912 }
913+ Qt::TransformationMode scaling = ao_app->get_scaling (ao_app->get_default_scaling ());
914+ ui_scaling_combobox->setCurrentIndex (scaling);
915+
899916 // Let's fill the callwords text edit with the already present callwords.
900917 ui_callwords_textbox->document ()->clear ();
901918 foreach (QString callword, ao_app->get_call_words ()) {
@@ -973,6 +990,7 @@ void AOOptionsDialog::save_pressed()
973990 configini->setValue (" master" , ui_ms_textbox->text ());
974991 configini->setValue (" discord" , ui_discord_cb->isChecked ());
975992 configini->setValue (" language" , ui_language_combobox->currentText ().left (2 ));
993+ configini->setValue (" default_scaling" , ui_scaling_combobox->currentData ());
976994 configini->setValue (" shake" , ui_shake_cb->isChecked ());
977995 configini->setValue (" effects" , ui_effects_cb->isChecked ());
978996 configini->setValue (" framenetwork" , ui_framenetwork_cb->isChecked ());
0 commit comments