update UI
This commit is contained in:
+2390
-32
File diff suppressed because it is too large
Load Diff
@@ -70,6 +70,7 @@ public class CharaEntry
|
|||||||
public string Name;
|
public string Name;
|
||||||
public Sprite Icon;
|
public Sprite Icon;
|
||||||
public int Id;
|
public int Id;
|
||||||
|
public string ThemeColor;
|
||||||
}
|
}
|
||||||
|
|
||||||
[System.Serializable]
|
[System.Serializable]
|
||||||
|
|||||||
@@ -57,9 +57,10 @@ public class UmaViewerMain : MonoBehaviour
|
|||||||
{
|
{
|
||||||
Characters.Add(new CharaEntry()
|
Characters.Add(new CharaEntry()
|
||||||
{
|
{
|
||||||
Name = enNames.ContainsKey(id)? enNames[id] : item["charaname"].ToString(),
|
Name = enNames.ContainsKey(id) ? enNames[id] : item["charaname"].ToString(),
|
||||||
Icon = UmaViewerBuilder.Instance.LoadCharaIcon(id.ToString()),
|
Icon = UmaViewerBuilder.Instance.LoadCharaIcon(id.ToString()),
|
||||||
Id = id
|
Id = id,
|
||||||
|
ThemeColor = "#"+item["ui_nameplate_color_1"].ToString()
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -438,8 +438,16 @@ public class UmaViewerUI : MonoBehaviour
|
|||||||
{
|
{
|
||||||
var container = Instantiate(UmaContainerPrefab, LiveCharaSoundList.content).GetComponent<UmaUIContainer>();
|
var container = Instantiate(UmaContainerPrefab, LiveCharaSoundList.content).GetComponent<UmaUIContainer>();
|
||||||
string[] split = Path.GetFileNameWithoutExtension(entry.Name).Split('_');
|
string[] split = Path.GetFileNameWithoutExtension(entry.Name).Split('_');
|
||||||
string name = split[split.Length - 2] + getCharaName(split[split.Length - 2]) + " " + split[split.Length - 1];
|
string name = $"{ split[split.Length - 2]} {getCharaName(split[split.Length - 2])}";
|
||||||
container.Name = name;
|
container.Name = name;
|
||||||
|
|
||||||
|
var icon = Main.Characters.Find(a => a.Id.ToString().Equals(split[split.Length - 2]));
|
||||||
|
if (icon != null)
|
||||||
|
{
|
||||||
|
container.Image.sprite = icon.Icon;
|
||||||
|
container.Image.enabled = true;
|
||||||
|
}
|
||||||
|
|
||||||
container.Button.onClick.AddListener(() => {
|
container.Button.onClick.AddListener(() => {
|
||||||
HighlightChildImage(LiveCharaSoundList.content, container.GetComponent<Image>());
|
HighlightChildImage(LiveCharaSoundList.content, container.GetComponent<Image>());
|
||||||
if (isCriware)
|
if (isCriware)
|
||||||
|
|||||||
@@ -360,6 +360,8 @@ namespace Gallop
|
|||||||
MouthMorphs.ForEach(morph =>
|
MouthMorphs.ForEach(morph =>
|
||||||
{
|
{
|
||||||
morph.weight = morph.locator.transform.localPosition.x * -100;
|
morph.weight = morph.locator.transform.localPosition.x * -100;
|
||||||
|
if (morph.weight < 0)
|
||||||
|
morph.weight = -morph.weight;
|
||||||
});
|
});
|
||||||
|
|
||||||
EyeMorphs.ForEach(morph =>
|
EyeMorphs.ForEach(morph =>
|
||||||
|
|||||||
Reference in New Issue
Block a user