mirror of
https://github.com/WerWolv/ImHex.git
synced 2026-04-02 13:37:42 -05:00
feat: Added save editor mode
This commit is contained in:
@@ -28,6 +28,7 @@ namespace hex::plugin::builtin {
|
||||
void handleSettingsResetCommand(const std::vector<std::string> &args);
|
||||
void handleDebugModeCommand(const std::vector<std::string> &args);
|
||||
void handleValidatePluginCommand(const std::vector<std::string> &args);
|
||||
void handleSaveEditorCommand(const std::vector<std::string> &args);
|
||||
|
||||
void registerCommandForwarders();
|
||||
|
||||
|
||||
@@ -54,10 +54,10 @@ namespace hex::plugin::builtin {
|
||||
|
||||
[[nodiscard]] std::pair<Region, bool> getRegionValidity(u64 address) const override;
|
||||
|
||||
private:
|
||||
void convertToMemoryFile();
|
||||
void convertToDirectAccess();
|
||||
|
||||
private:
|
||||
void handleFileChange();
|
||||
|
||||
bool open(bool memoryMapped);
|
||||
|
||||
@@ -0,0 +1,32 @@
|
||||
#pragma once
|
||||
|
||||
#include <hex/ui/view.hpp>
|
||||
#include <content/providers/file_provider.hpp>
|
||||
#include <pl/pattern_language.hpp>
|
||||
#include <ui/pattern_value_editor.hpp>
|
||||
|
||||
namespace hex::plugin::builtin {
|
||||
|
||||
class ViewFullScreenSaveEditor : public View::FullScreen {
|
||||
public:
|
||||
explicit ViewFullScreenSaveEditor(std::string sourceCode);
|
||||
|
||||
void drawContent() override;
|
||||
|
||||
private:
|
||||
void drawFileSelectScreen();
|
||||
void drawSaveEditorScreen();
|
||||
|
||||
private:
|
||||
std::string m_sourceCode;
|
||||
FileProvider m_provider;
|
||||
|
||||
pl::PatternLanguage m_runtime;
|
||||
ui::PatternValueEditor m_saveEditor;
|
||||
|
||||
std::string m_saveEditorName;
|
||||
std::vector<std::string> m_saveEditorAuthors;
|
||||
std::vector<std::string> m_saveEditorDescriptions;
|
||||
};
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user