node: Added arithmetic nodes (add, sub, mul, div, mod)

This commit is contained in:
WerWolv
2021-03-06 14:46:47 +01:00
parent cadd4e5c2b
commit d4265f16eb
5 changed files with 184 additions and 6 deletions

View File

@@ -165,16 +165,16 @@ namespace hex {
}
}
for (const auto &[category, name, function] : ContentRegistry::DataProcessorNode::getEntries()) {
if (category.empty() && name.empty()) {
for (const auto &[unlocalizedCategory, unlocalizedName, function] : ContentRegistry::DataProcessorNode::getEntries()) {
if (unlocalizedCategory.empty() && unlocalizedName.empty()) {
ImGui::Separator();
} else if (category.empty()) {
if (ImGui::MenuItem(name.c_str())) {
} else if (unlocalizedCategory.empty()) {
if (ImGui::MenuItem(LangEntry(unlocalizedName))) {
node = function();
}
} else {
if (ImGui::BeginMenu(category.c_str())) {
if (ImGui::MenuItem(name.c_str())) {
if (ImGui::BeginMenu(LangEntry(unlocalizedCategory))) {
if (ImGui::MenuItem(LangEntry(unlocalizedName))) {
node = function();
}
ImGui::EndMenu();