Use imfilebrowser instead of Window's file browser

This commit is contained in:
WerWolv
2020-11-12 21:20:51 +01:00
parent 6512d22981
commit d88bb877b6
7 changed files with 764 additions and 70 deletions

View File

@@ -8,6 +8,4 @@
namespace hex {
std::optional<std::string> openFileDialog();
}

View File

@@ -7,6 +7,7 @@
#include "views/view.hpp"
#include "imgui_memory_editor.h"
#include "imfilebrowser.h"
#include <tuple>
#include <random>
@@ -30,6 +31,9 @@ namespace hex {
private:
MemoryEditor m_memoryEditor;
ImGui::FileBrowser m_fileBrowser;
prv::Provider* &m_dataProvider;
std::vector<Highlight> &m_highlights;

View File

@@ -10,6 +10,8 @@
#include "views/highlight.hpp"
#include "imfilebrowser.h"
namespace hex {
class ViewPattern : public View {
@@ -26,6 +28,8 @@ namespace hex {
std::vector<Highlight> &m_highlights;
bool m_windowOpen = true;
ImGui::FileBrowser m_fileBrowser;
void setHighlight(u64 offset, size_t size, std::string name, u32 color = 0);
void parsePattern(char *buffer);