mirror of
https://github.com/maxartz15/TextureCombiner.git
synced 2024-11-09 23:22:55 +01:00
1165a4e4a8
P4 -> GitHub sync.
47 lines
1.2 KiB
C#
47 lines
1.2 KiB
C#
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
using UnityEngine.UI;
|
|
|
|
namespace TextureCombiner
|
|
{
|
|
public class AddOptions : Options
|
|
{
|
|
[SerializeField]
|
|
private Slider inputFieldR = null;
|
|
[SerializeField]
|
|
private Slider inputFieldG = null;
|
|
[SerializeField]
|
|
private Slider inputFieldB = null;
|
|
[SerializeField]
|
|
private Slider inputFieldA = null;
|
|
|
|
private void OnEnable()
|
|
{
|
|
inputFieldR.value = PlayerPrefs.GetFloat("addR", 0);
|
|
inputFieldG.value = PlayerPrefs.GetFloat("addG", 0);
|
|
inputFieldB.value = PlayerPrefs.GetFloat("addB", 0);
|
|
inputFieldA.value = PlayerPrefs.GetFloat("addA", 0);
|
|
}
|
|
|
|
protected override void OnDisable()
|
|
{
|
|
PlayerPrefs.SetFloat("addR", inputFieldR.value);
|
|
PlayerPrefs.SetFloat("addG", inputFieldG.value);
|
|
PlayerPrefs.SetFloat("addB", inputFieldB.value);
|
|
PlayerPrefs.SetFloat("addA", inputFieldA.value);
|
|
|
|
base.OnDisable();
|
|
}
|
|
|
|
public Vector4 GetAddValues()
|
|
{
|
|
return new Vector4(
|
|
inputFieldR.value,
|
|
inputFieldG.value,
|
|
inputFieldB.value,
|
|
inputFieldA.value
|
|
);
|
|
}
|
|
}
|
|
} |