Skip to content

Commit

Permalink
Add 'Run Archive' to Archive menu + some minor tweaks
Browse files Browse the repository at this point in the history
It needs to be in a menu so that the shortcut key can work.

Also changed the Run dialog title to show the name of the archive being run (or 'Run Map' when running from the map editor)
  • Loading branch information
sirjuddington committed Jul 6, 2023
1 parent 5acabfb commit 0775947
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
5 changes: 4 additions & 1 deletion src/MainEditor/UI/ArchivePanel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -692,8 +692,11 @@ void ArchivePanel::addMenus() const
auto menu_scripts = new wxMenu();
#ifndef NO_LUA
scriptmanager::populateEditorScriptMenu(menu_scripts, scriptmanager::ScriptType::Archive, "arch_script");
#endif
menu_archive->AppendSubMenu(menu_scripts, "&Run Script");
#endif

menu_archive->AppendSeparator();
SAction::fromId("arch_run")->addToMenu(menu_archive, true, "Run");
}
if (!menu_entry)
{
Expand Down
6 changes: 5 additions & 1 deletion src/UI/Dialogs/RunDialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -188,8 +188,12 @@ class RunConfigDialog : public wxDialog
RunDialog::RunDialog(wxWindow* parent, Archive* archive, bool show_start_3d_cb, bool run_map) :
SDialog(parent, "Run", "run", 500, 400), run_map_{ run_map }
{
// Set dialog icon
// Set dialog icon + title
wxutil::setWindowIcon(this, "run");
if (run_map)
SetTitle("Run Map");
if (archive)
SetTitle(wxString::Format("Run Archive - %s", archive->filename(false)));

// Setup sizer
auto sizer = new wxBoxSizer(wxVERTICAL);
Expand Down

0 comments on commit 0775947

Please sign in to comment.