193{
194 DrawHeader("Texture");
195 inputPins[0]->Render();
196 ImGui::Text("X");
197 ImGui::SameLine();
198 ImGui::Dummy(ImVec2(150, 10));
199 ImGui::SameLine();
200 ImGui::Text("R");
201 outputPins[0]->Render();
202 inputPins[1]->Render();
203 ImGui::Text("Y");
204 ImGui::SameLine();
205 ImGui::Dummy(ImVec2(150, 10));
206 ImGui::SameLine();
207 ImGui::Text("G");
208 outputPins[1]->Render();
209 inputPins[2]->Render();
210
211 if (inputPins[2]->IsLinked())
212 {
213 ImGui::Text("Scale");
214 }
215
216 else
217 {
218 ImGui::PushItemWidth(100);
219 ImGui::DragFloat(("##" + std::to_string(inputPins[1]->id)).c_str(), &scale, 0.01f);
220 ImGui::PopItemWidth();
221 }
222
223 ImGui::SameLine();
224 ImGui::Dummy(ImVec2(60, 10));
225 ImGui::SameLine();
226 ImGui::Text("B");
227 outputPins[2]->Render();
228 ImGui::NewLine();
229 ImGui::Checkbox(("Auto Tiled##tild" + std::to_string(id)).c_str(), &autoTiled);
230 ImGui::Checkbox(("Inverse Texture##tinv" + std::to_string(id)).c_str(), &inv);
231 ImGui::Checkbox(("Scale -1 To 1##tnpsc" + std::to_string(id)).c_str(), &npScale);
232
233
234 ImGui::PushItemWidth(100);
235 if(!autoTiled)
236 {
237 ImGui::DragFloat(("Num Tiles##nmtl" + std::to_string(id)).c_str(), &numTiles, 0.01f);
238 }
239 ImGui::DragFloat2(("Position##posi" + std::to_string(id)).c_str(), posi, 0.01f);
240 ImGui::PopItemWidth();
241 ImGui::DragFloat(("Rotation##rota" + std::to_string(id)).c_str(), &rota, 0.1f);
242 ImGui::NewLine();
243
244 if (ImGui::ImageButton((ImTextureID)texture->GetRendererID(), ImVec2(200, 200)))
245 {
246 ChangeTexture();
247 }
248
249 if (ImGui::Button(MAKE_IMGUI_LABEL(id, "Change Texture")))
250 {
251 ChangeTexture();
252 }
253}