tiny little changes

This commit is contained in:
ThatZeoMan 2022-08-18 13:21:24 -05:00
parent 08bce95bb1
commit 852f0afb06
2 changed files with 11 additions and 10 deletions

View file

@ -11,6 +11,13 @@ using HeavenStudio.Games;
namespace HeavenStudio.Properties
{
public class EditInput
{
[Header("Properties")]
public bool editingInputField = false;
}
public class PropManager : MonoBehaviour
{
[Header("Property Prefabs")]
@ -92,11 +99,5 @@ namespace HeavenStudio.Properties
}
}
public class EditInput
{
[Header("Properties")]
public bool editingInputField = false;
}
}
}

View file

@ -61,14 +61,14 @@ namespace HeavenStudio.Properties
inputField.onSelect.AddListener(delegate
{
PropController.instance.EditInput.editingInputField = true;
EditInput.editingInputField = true;
});
inputField.onEndEdit.AddListener(delegate
{
slider.value = Mathf.RoundToInt(System.Convert.ToSingle(System.Convert.ToSingle(inputField.text)));
PropController.instance.properties[propertyName] = (int)slider.value;
PropController.instance.EditInput.editingInputField = false;
EditInput.editingInputField = false;
});
}
else if (type is bool)
@ -113,14 +113,14 @@ namespace HeavenStudio.Properties
inputFieldString.onSelect.AddListener(delegate
{
PropController.instance.EditInput.editingInputField = true;
EditInput.editingInputField = true;
});
inputFieldString.onEndEdit.AddListener(delegate
{
// Debug.Log("setting " + propertyName + " to: " + inputFieldString.text);
PropController.instance.properties[propertyName] = inputFieldString.text;
PropController.instance.EditInput.editingInputField = false;
EditInput.editingInputField = false;
});
}
}