mirror of
https://github.com/WerWolv/ImHex.git
synced 2026-03-30 21:05:56 -05:00
nodes: Added primitive saving and loading mechanism
Not fully integrated yet. Also doesn't yet save any node settings, just nodes and links
This commit is contained in:
@@ -160,7 +160,13 @@ namespace hex {
|
||||
|
||||
template<hex::derived_from<dp::Node> T, typename ... Args>
|
||||
static void add(std::string_view unlocalizedCategory, std::string_view unlocalizedName, Args&& ... args) {
|
||||
add(Entry{ unlocalizedCategory.data(), unlocalizedName.data(), [args...]{ return new T(std::forward<Args>(args)...); } });
|
||||
add(Entry{ unlocalizedCategory.data(), unlocalizedName.data(),
|
||||
[args..., name = std::string(unlocalizedName)]{
|
||||
auto node = new T(std::forward<Args>(args)...);
|
||||
node->setUnlocalizedName(name);
|
||||
return node;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
static void addSeparator();
|
||||
|
||||
Reference in New Issue
Block a user