TerraForge3D  2.3.1
3D Terrain And Landscape Generator

◆ OnRender()

void RandomNumberNode::OnRender ( )
virtual

Implements NodeEditorNode.

Definition at line 73 of file RandomNumberNode.cpp.

74{
75 DrawHeader("Random Number");
76 inputPins[0]->Render();
77 ImGui::Text("Seed");
78
79 if (!inputPins[0]->IsLinked())
80 {
81 ImGui::PushItemWidth(100);
82 ImGui::DragInt(("##" + std::to_string(inputPins[0]->id)).c_str(), &seed, 0.1f);
83 ImGui::PopItemWidth();
84 }
85
86 ImGui::SameLine();
87 ImGui::Text("Out");
88 outputPins[0]->Render();
89 inputPins[1]->Render();
90 ImGui::Text("Minimum");
91
92 if (!inputPins[1]->IsLinked())
93 {
94 ImGui::PushItemWidth(100);
95 ImGui::DragInt(("##" + std::to_string(inputPins[1]->id)).c_str(), &min, 0.1f);
96 ImGui::PopItemWidth();
97 }
98
99 inputPins[2]->Render();
100 ImGui::Text("Maximum");
101
102 if (!inputPins[2]->IsLinked())
103 {
104 ImGui::PushItemWidth(100);
105 ImGui::DragInt(("##" + std::to_string(inputPins[2]->id)).c_str(), &max, 0.1f);
106 ImGui::PopItemWidth();
107 }
108}