material wnd fix

This commit is contained in:
Turanszki Janos
2021-02-07 10:58:17 +01:00
parent e81f90791c
commit f97bfa0d1f
+2 -2
View File
@@ -456,7 +456,7 @@ void MaterialWindow::Create(EditorComponent* editor)
slot.button.Create("");
slot.button.SetPos(XMFLOAT2(x + 122, y));
slot.button.SetSize(XMFLOAT2(260, 20));
slot.button.OnClick([&](wiEventArgs args) {
slot.button.OnClick([this, i, &slot](wiEventArgs args) {
MaterialComponent* material = wiScene::GetScene().materials.GetComponent(entity);
if (material == nullptr)
return;
@@ -496,7 +496,7 @@ void MaterialWindow::Create(EditorComponent* editor)
slot.uvsetField.SetTooltip("uv set number");
slot.uvsetField.SetPos(XMFLOAT2(x + uvset_offset, y));
slot.uvsetField.SetSize(XMFLOAT2(20, 20));
slot.uvsetField.OnInputAccepted([&](wiEventArgs args) {
slot.uvsetField.OnInputAccepted([this, i](wiEventArgs args) {
MaterialComponent* material = wiScene::GetScene().materials.GetComponent(entity);
if (material != nullptr)
{