P4 -> GitHub sync.
This commit is contained in:
max
2020-11-01 03:54:32 +01:00
parent e6b8bcef3c
commit 1165a4e4a8
124 changed files with 15569 additions and 3 deletions

View File

@ -0,0 +1,47 @@
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
);
}
}
}

View File

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: cfd2b97d613d4f04f8b3b11e66ad23e2
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,30 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
namespace TextureCombiner
{
public class CombineOptions : Options
{
[SerializeField]
private Toggle autoCombineToggle = null;
private void OnEnable()
{
autoCombineToggle.isOn = PlayerPrefs.GetInt("autoCombine", 1) != 0;
}
protected override void OnDisable()
{
PlayerPrefs.SetInt("autoCombine", autoCombineToggle.isOn ? 1 : 0);
base.OnDisable();
}
public bool GetAutoCombine()
{
return autoCombineToggle.isOn;
}
}
}

View File

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: d2d913ba40069e249affef31f3f9ed72
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,30 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
namespace TextureCombiner
{
public class SaveOptions : Options
{
[SerializeField]
private InputField inputFieldName = null;
private void OnEnable()
{
inputFieldName.text = PlayerPrefs.GetString("outputName", "_RMAH");
}
protected override void OnDisable()
{
PlayerPrefs.SetString("outputName", inputFieldName.text);
base.OnDisable();
}
public string GetOutputName()
{
return inputFieldName.text + ".png";
}
}
}

View File

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: f3d24c2bb90ddd24fa229a7f3429b868
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,48 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
namespace TextureCombiner
{
public class SizeOptions : Options
{
public int width = 512;
public int height = 512;
[SerializeField]
private InputField inputFieldWidth = null;
[SerializeField]
private InputField inputFieldHeight = null;
private void OnEnable()
{
width = PlayerPrefs.GetInt("width", 512);
height = PlayerPrefs.GetInt("height", 512);
inputFieldWidth.text = width.ToString();
inputFieldHeight.text = height.ToString();
inputFieldWidth.onValueChanged.AddListener(UpdateWidth);
inputFieldHeight.onValueChanged.AddListener(UpdateHeight);
}
protected override void OnDisable()
{
PlayerPrefs.SetInt("width", width);
PlayerPrefs.SetInt("height", height);
base.OnDisable();
}
private void UpdateWidth(string _width)
{
int.TryParse(_width, out width);
}
private void UpdateHeight(string _height)
{
int.TryParse(_height, out height);
}
}
}

View File

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 8eaea5168b73e1a4790b4a86e6bc5aac
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant: