aboutsummaryrefslogtreecommitdiff
path: root/src/aooptionsdialog.cpp
diff options
context:
space:
mode:
authorCrystalwarrior <Varsash@Gmail.com>2022-07-31 21:05:09 +0300
committerGitHub <noreply@github.com>2022-07-31 13:05:09 -0500
commitb9aa2039d3eccf00985b1ffb91465f571006b896 (patch)
treed4fc6fff45242611144988c246034fcfc023179b /src/aooptionsdialog.cpp
parentdd8eee7eede02b71b86864b533eed4102f0c584e (diff)
Add "edit" and "open folder" actions for dropdowns (#776)
* Add "edit" and "open folder" actions for dropdowns: - CharSelect char button with "edit char.ini," "open this char folder" - pos dropdown with "open this background" - text color dropdown with "open chat_config.ini" - evidence button with "open evidence folder" - sound list with "open sounds folder" - music list with "open music folder" - theme list with "open themes folder" * Implement "Play <sfx_name>" for the Play action, and only show it if the sfx is not "0" or "1" or "-" Co-authored-by: stonedDiscord <Tukz@gmx.de> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: oldmud0 <oldmud0@users.noreply.github.com>
Diffstat (limited to 'src/aooptionsdialog.cpp')
-rw-r--r--src/aooptionsdialog.cpp17
1 files changed, 16 insertions, 1 deletions
diff --git a/src/aooptionsdialog.cpp b/src/aooptionsdialog.cpp
index 679a674d..e25b4653 100644
--- a/src/aooptionsdialog.cpp
+++ b/src/aooptionsdialog.cpp
@@ -120,7 +120,6 @@ AOOptionsDialog::AOOptionsDialog(QWidget *parent, AOApplication *p_ao_app)
ui_gameplay_form->setWidget(row, QFormLayout::FieldRole, ui_subtheme_combobox);
row += 1;
-
ui_theme_reload_button = new QPushButton(ui_form_layout_widget);
ui_theme_reload_button->setText(tr("Reload Theme"));
ui_theme_reload_button->setToolTip(
@@ -130,6 +129,22 @@ AOOptionsDialog::AOOptionsDialog(QWidget *parent, AOApplication *p_ao_app)
&AOOptionsDialog::on_reload_theme_clicked);
row += 1;
+ ui_theme_folder_button = new QPushButton(ui_form_layout_widget);
+ ui_theme_folder_button->setText(tr("Open Theme Folder"));
+ ui_theme_folder_button->setToolTip(
+ tr("Open the theme folder of the currently selected theme."));
+ ui_gameplay_form->setWidget(row, QFormLayout::FieldRole, ui_theme_folder_button);
+ connect(ui_theme_folder_button, &QPushButton::clicked, this,
+ [=] {
+ QString p_path = ao_app->get_real_path(ao_app->get_theme_path("", ui_theme_combobox->itemText(ui_theme_combobox->currentIndex())));
+ if (!dir_exists(p_path)) {
+ return;
+ }
+ QDesktopServices::openUrl(QUrl::fromLocalFile(p_path));
+ }
+ );
+
+ row += 1;
ui_animated_theme_lbl = new QLabel(ui_form_layout_widget);
ui_animated_theme_lbl->setText(tr("Animated Theme:"));
ui_animated_theme_lbl->setToolTip(