fix: Move visualizer drawer to correct library
This commit is contained in:
parent
72822d03aa
commit
caae5c9711
@ -49,7 +49,6 @@ set(LIBIMHEX_SOURCES
|
|||||||
source/ui/view.cpp
|
source/ui/view.cpp
|
||||||
source/ui/popup.cpp
|
source/ui/popup.cpp
|
||||||
source/ui/toast.cpp
|
source/ui/toast.cpp
|
||||||
source/ui/visualizer_drawer.cpp
|
|
||||||
|
|
||||||
source/subcommands/subcommands.cpp
|
source/subcommands/subcommands.cpp
|
||||||
)
|
)
|
||||||
|
@ -1,15 +1,12 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include <hex/ui/view.hpp>
|
#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/content_registry.hpp>
|
||||||
#include <hex/api/task_manager.hpp>
|
#include <hex/api/task_manager.hpp>
|
||||||
|
|
||||||
#include <wolv/io/file.hpp>
|
|
||||||
|
|
||||||
#include <bit>
|
#include <bit>
|
||||||
#include <cstdio>
|
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
namespace hex::plugin::builtin {
|
namespace hex::plugin::builtin {
|
||||||
|
@ -1,5 +1,4 @@
|
|||||||
#include "content/views/view_data_inspector.hpp"
|
#include "content/views/view_data_inspector.hpp"
|
||||||
#include "ui/pattern_drawer.hpp"
|
|
||||||
|
|
||||||
#include <hex/api/achievement_manager.hpp>
|
#include <hex/api/achievement_manager.hpp>
|
||||||
#include <hex/providers/provider.hpp>
|
#include <hex/providers/provider.hpp>
|
||||||
@ -8,8 +7,8 @@
|
|||||||
|
|
||||||
#include <fonts/codicons_font.h>
|
#include <fonts/codicons_font.h>
|
||||||
#include <hex/ui/imgui_imhex_extensions.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/pattern_language.hpp>
|
||||||
#include <pl/patterns/pattern.hpp>
|
#include <pl/patterns/pattern.hpp>
|
||||||
@ -183,10 +182,9 @@ namespace hex::plugin::builtin {
|
|||||||
continue;
|
continue;
|
||||||
|
|
||||||
// Set up the editing function if a write formatter is available
|
// Set up the editing function if a write formatter is available
|
||||||
auto formatWriteFunction = pattern->getWriteFormatterFunction();
|
|
||||||
std::optional<ContentRegistry::DataInspector::impl::EditingFunction> editingFunction;
|
std::optional<ContentRegistry::DataInspector::impl::EditingFunction> editingFunction;
|
||||||
if (!formatWriteFunction.empty()) {
|
if (!pattern->getWriteFormatterFunction().empty()) {
|
||||||
editingFunction = [formatWriteFunction, &pattern](const std::string &value,
|
editingFunction = [&pattern](const std::string &value,
|
||||||
std::endian) -> std::vector<u8> {
|
std::endian) -> std::vector<u8> {
|
||||||
try {
|
try {
|
||||||
pattern->setValue(value);
|
pattern->setValue(value);
|
||||||
|
@ -10,6 +10,7 @@ add_imhex_plugin(
|
|||||||
|
|
||||||
source/ui/hex_editor.cpp
|
source/ui/hex_editor.cpp
|
||||||
source/ui/pattern_drawer.cpp
|
source/ui/pattern_drawer.cpp
|
||||||
|
source/ui/visualizer_drawer.cpp
|
||||||
INCLUDES
|
INCLUDES
|
||||||
include
|
include
|
||||||
LIBRARIES
|
LIBRARIES
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
#include <hex/api/task_manager.hpp>
|
#include <hex/api/task_manager.hpp>
|
||||||
#include <hex/api/content_registry.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/patterns/pattern.hpp>
|
||||||
#include <pl/pattern_visitor.hpp>
|
#include <pl/pattern_visitor.hpp>
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
|
#include <ui/visualizer_drawer.hpp>
|
||||||
|
|
||||||
#include "hex/ui/visualizer_drawer.hpp"
|
|
||||||
#include "imgui.h"
|
#include "imgui.h"
|
||||||
|
|
||||||
namespace hex::ui {
|
namespace hex::ui {
|
Loading…
Reference in New Issue
Block a user