parent
cb6b74b269
commit
1e71d8afc0
@ -122,6 +122,7 @@
|
|||||||
"hex.builtin.menu.file.clear_recent": "Clear",
|
"hex.builtin.menu.file.clear_recent": "Clear",
|
||||||
"hex.builtin.menu.file.close": "Close",
|
"hex.builtin.menu.file.close": "Close",
|
||||||
"hex.builtin.menu.file.create_file": "New File...",
|
"hex.builtin.menu.file.create_file": "New File...",
|
||||||
|
"hex.builtin.menu.edit.disassemble_range": "Disassemble selection",
|
||||||
"hex.builtin.menu.file.export": "Export...",
|
"hex.builtin.menu.file.export": "Export...",
|
||||||
"hex.builtin.menu.file.export.as_language": "Text Formatted Bytes",
|
"hex.builtin.menu.file.export.as_language": "Text Formatted Bytes",
|
||||||
"hex.builtin.menu.file.export.as_language.popup.export_error": "Failed to export bytes to the file!",
|
"hex.builtin.menu.file.export.as_language.popup.export_error": "Failed to export bytes to the file!",
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
#include "content/views/view_disassembler.hpp"
|
#include "content/views/view_disassembler.hpp"
|
||||||
|
#include "hex/api/content_registry.hpp"
|
||||||
|
|
||||||
#include <hex/providers/provider.hpp>
|
#include <hex/providers/provider.hpp>
|
||||||
#include <hex/helpers/fmt.hpp>
|
#include <hex/helpers/fmt.hpp>
|
||||||
@ -16,6 +17,18 @@ namespace hex::plugin::disasm {
|
|||||||
EventProviderDeleted::subscribe(this, [this](const auto*) {
|
EventProviderDeleted::subscribe(this, [this](const auto*) {
|
||||||
m_disassembly.clear();
|
m_disassembly.clear();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
ContentRegistry::Interface::addMenuItem({ "hex.builtin.menu.edit", "hex.builtin.menu.edit.disassemble_range" }, ICON_VS_DEBUG_LINE_BY_LINE, 3100, CTRLCMD + SHIFT + Keys::D, [this] {
|
||||||
|
ImGui::SetWindowFocus(this->getName().c_str());
|
||||||
|
this->getWindowOpenState() = true;
|
||||||
|
|
||||||
|
m_range = ui::RegionType::Region;
|
||||||
|
m_codeRegion = ImHexApi::HexEditor::getSelection()->getRegion();
|
||||||
|
|
||||||
|
this->disassemble();
|
||||||
|
}, [this]{
|
||||||
|
return ImHexApi::HexEditor::isSelectionValid() && !this->m_disassemblerTask.isRunning();
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
ViewDisassembler::~ViewDisassembler() {
|
ViewDisassembler::~ViewDisassembler() {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user