176{
177 DrawHeader(name);
178
179 if(!useMultipleOpins)
180 {
181 ImGui::Text("Output");
182 outputPins[0]->Render();
183 ImGui::NewLine();
184 }
185 else
186 {
187 for(int i = 0 ; i < oPinStrs.size() ; i++)
188 {
189 ImGui::Text(oPinStrs[i].data());
190 outputPins[i]->Render();
191 ImGui::NewLine();
192 }
193 }
194
195 int j = 0;
196
197 if(!useArrayParams)
198 {
199 for(auto ¶ms: params)
200 {
201 inputPins[j]->Render();
202 ImGui::Text(params.second.c_str());
203 j++;
204 }
205 }
206 else
207 {
208 for(int k = 0 ; k < paramCount ; k++)
209 {
210 j = 0;
211 for(auto ¶m: params)
212 {
213 inputPins[k + j]->Render();
214 ImGui::Text((param.second + " #" + STR(k)).c_str());
215 j++;
216 }
217 }
218 }
219
220 ImGui::PushItemWidth(100);
221 int i = 0;
222
223 for(auto &it : sharedDataTemplate)
224 {
225 if(i > 31)
226 {
227 break;
228 }
229
230 ImGui::PushID(i);
231
232 if(it.type == "float")
233 {
234 if(ImGui::DragFloat(it.text.data(), &fData[i], 0.01f))
235 {
236 SetSharedMemoryItem(sharedData, i, fData[i]);
237 }
238 }
239
240 else if(it.type == "bool")
241 {
242 if(ImGui::Checkbox(it.text.data(), &bData[i]))
243 {
244 SetSharedMemoryItem(sharedData, i, bData[i] ? 1.0f : 0.0f);
245 }
246 }
247
248 ImGui::PopID();
249 i++;
250 }
251
252 ImGui::PopItemWidth();
253}