1
0
mirror of synced 2025-01-07 12:11:37 +01:00

fix: Move visualizer drawer to correct library

This commit is contained in:
WerWolv 2024-11-29 17:37:02 +01:00
parent 72822d03aa
commit caae5c9711
7 changed files with 8 additions and 13 deletions

View File

@ -49,7 +49,6 @@ set(LIBIMHEX_SOURCES
source/ui/view.cpp
source/ui/popup.cpp
source/ui/toast.cpp
source/ui/visualizer_drawer.cpp
source/subcommands/subcommands.cpp
)

View File

@ -1,15 +1,12 @@
#pragma once
#include <hex/ui/view.hpp>
#include <hex/ui/visualizer_drawer.hpp>
#include <ui/visualizer_drawer.hpp>
#include <hex/api/content_registry.hpp>
#include <hex/api/task_manager.hpp>
#include <wolv/io/file.hpp>
#include <bit>
#include <cstdio>
#include <string>
namespace hex::plugin::builtin {

View File

@ -1,5 +1,4 @@
#include "content/views/view_data_inspector.hpp"
#include "ui/pattern_drawer.hpp"
#include <hex/api/achievement_manager.hpp>
#include <hex/providers/provider.hpp>
@ -8,8 +7,8 @@
#include <fonts/codicons_font.h>
#include <hex/ui/imgui_imhex_extensions.h>
#include <hex/ui/visualizer_drawer.hpp>
#include <ui/pattern_drawer.hpp>
#include <ui/visualizer_drawer.hpp>
#include <pl/pattern_language.hpp>
#include <pl/patterns/pattern.hpp>
@ -183,10 +182,9 @@ namespace hex::plugin::builtin {
continue;
// Set up the editing function if a write formatter is available
auto formatWriteFunction = pattern->getWriteFormatterFunction();
std::optional<ContentRegistry::DataInspector::impl::EditingFunction> editingFunction;
if (!formatWriteFunction.empty()) {
editingFunction = [formatWriteFunction, &pattern](const std::string &value,
if (!pattern->getWriteFormatterFunction().empty()) {
editingFunction = [&pattern](const std::string &value,
std::endian) -> std::vector<u8> {
try {
pattern->setValue(value);

View File

@ -10,6 +10,7 @@ add_imhex_plugin(
source/ui/hex_editor.cpp
source/ui/pattern_drawer.cpp
source/ui/visualizer_drawer.cpp
INCLUDES
include
LIBRARIES

View File

@ -2,7 +2,7 @@
#include <hex/api/task_manager.hpp>
#include <hex/api/content_registry.hpp>
#include <hex/ui/visualizer_drawer.hpp>
#include <ui/visualizer_drawer.hpp>
#include <pl/patterns/pattern.hpp>
#include <pl/pattern_visitor.hpp>

View File

@ -1,5 +1,5 @@
#include <ui/visualizer_drawer.hpp>
#include "hex/ui/visualizer_drawer.hpp"
#include "imgui.h"
namespace hex::ui {