mirror of
https://github.com/WerWolv/ImHex.git
synced 2026-04-01 21:17:44 -05:00
Allow most modal popups to be closed with escape
This commit is contained in:
@@ -14,7 +14,7 @@ namespace hex {
|
||||
ContentRegistry::CommandPaletteCommands::add(
|
||||
ContentRegistry::CommandPaletteCommands::Type::SymbolCommand,
|
||||
"#", "Calculator",
|
||||
[](std::string input) {
|
||||
[](auto input) {
|
||||
MathEvaluator evaluator;
|
||||
evaluator.registerStandardVariables();
|
||||
evaluator.registerStandardFunctions();
|
||||
@@ -31,6 +31,18 @@ namespace hex {
|
||||
return hex::format("#%s = ???", input.data());
|
||||
});
|
||||
|
||||
ContentRegistry::CommandPaletteCommands::add(
|
||||
ContentRegistry::CommandPaletteCommands::Type::KeywordCommand,
|
||||
"/bm", "Create Bookmark",
|
||||
[](auto input) {
|
||||
Bookmark bookmark;
|
||||
bookmark.name.resize(64);
|
||||
std::strncpy(bookmark.name.data(), input.c_str(), bookmark.name.size());
|
||||
|
||||
View::postEvent(Events::AddBookmark, &bookmark);
|
||||
return "";
|
||||
});
|
||||
|
||||
this->m_lastResults = this->getCommandResults("");
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user