feat: Added save editor mode

This commit is contained in:
WerWolv
2025-08-03 13:46:33 +02:00
parent 56d1e2670e
commit ea072296cf
8 changed files with 271 additions and 3 deletions

View File

@@ -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();

View File

@@ -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);

View File

@@ -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;
};
}