mirror of
https://github.com/WerWolv/ImHex.git
synced 2026-03-30 21:05:56 -05:00
Added Data Processor using Nodes (#152)
* Added imnodes * Added basic data processor view. Still needs to be cleaned up * Make sure all attached links get properly removed when a Node is deleted * Cleanup and API exposing * Added data provider overlays and integrate them with the data processor * Optimized data processing * Node UI enhancements * Added support for all themes to the nodes editor * Improved data processor context menus * Fixed data processor context menu showing up everywhere * Make hex editor context menu behave the same as data processor one * Add different node pin types and prevent incompatible ones from being connected * Don't require explicitly marking node as end node * Fixed plugin copying * Added some more nodes
This commit is contained in:
@@ -27,6 +27,12 @@ namespace hex {
|
||||
ImU8 byte;
|
||||
provider->read(off, &byte, sizeof(ImU8));
|
||||
|
||||
for (auto &overlay : SharedData::currentProvider->getOverlays()) {
|
||||
auto overlayAddress = overlay->getAddress();
|
||||
if (off >= overlayAddress && off < overlayAddress + overlay->getSize())
|
||||
byte = overlay->getData()[off - overlayAddress];
|
||||
}
|
||||
|
||||
return byte;
|
||||
};
|
||||
|
||||
@@ -159,7 +165,7 @@ namespace hex {
|
||||
if (dataSize != 0x00) {
|
||||
if (ImGui::Begin("Hex Editor")) {
|
||||
|
||||
if (ImGui::IsMouseClicked(ImGuiMouseButton_Right) && ImGui::IsWindowHovered(ImGuiHoveredFlags_ChildWindows))
|
||||
if (ImGui::IsMouseReleased(ImGuiMouseButton_Right) && ImGui::IsWindowHovered(ImGuiHoveredFlags_ChildWindows))
|
||||
ImGui::OpenPopup("Edit");
|
||||
|
||||
if (ImGui::BeginPopup("Edit")) {
|
||||
|
||||
Reference in New Issue
Block a user