diff --git a/aegisub/src/command/command.h b/aegisub/src/command/command.h index db9d4dd36..008fe805a 100644 --- a/aegisub/src/command/command.h +++ b/aegisub/src/command/command.h @@ -79,8 +79,11 @@ namespace cmd { /// This command's name may change based on the state of the project COMMAND_DYNAMIC_NAME = 8, + /// This command's help string may change + COMMAND_DYNAMIC_HELP = 16, + /// This command's icon may change based on the state of the project - COMMAND_DYNAMIC_ICON = 16 + COMMAND_DYNAMIC_ICON = 32 }; /// Holds an individual Command @@ -93,7 +96,7 @@ namespace cmd { /// Plain string for display purposes; should normally be the same as StrMenu /// but without accelerators virtual wxString StrDisplay(const agi::Context *) const=0; - /// Short help string descripting the command purpose. + /// Short help string describing what the command does virtual wxString StrHelp() const=0; /// Get this command's type flags diff --git a/aegisub/src/menu.cpp b/aegisub/src/menu.cpp index 646d0de38..914d88e6b 100644 --- a/aegisub/src/menu.cpp +++ b/aegisub/src/menu.cpp @@ -148,6 +148,8 @@ class CommandManager { int flags = c->Type(); if (flags & cmd::COMMAND_DYNAMIC_NAME) UpdateItemName(item); + if (flags & cmd::COMMAND_DYNAMIC_HELP) + item.second->SetHelp(c->StrHelp()); if (flags & cmd::COMMAND_VALIDATE) item.second->Enable(c->Validate(context)); if (flags & cmd::COMMAND_RADIO || flags & cmd::COMMAND_TOGGLE) {