improve UI

This commit is contained in:
CroakFang
2023-07-01 23:21:04 +08:00
parent 1642fabc93
commit 2162a4079b
5 changed files with 1202 additions and 1218 deletions
+1 -1
View File
@@ -325,7 +325,7 @@ public class UmaContainer : MonoBehaviour
dragCollider.attachedRigidbody.isKinematic = true;
dragCollider.transform.position = Vector3.Lerp(dragCollider.transform.position, cam.ScreenToWorldPoint(new Vector3(mousePos.x, mousePos.y, dragdistance)) - dragStartPos, Time.fixedDeltaTime * 4);
//LookAt Mouse when Dragging
TrackTarget.position = Vector3.Lerp(TrackTarget.position, worldPos, Time.fixedDeltaTime * 3);
TrackTarget.position = Vector3.Lerp(TrackTarget.position, dragCollider.transform.position, Time.fixedDeltaTime * 3);
}
else
{
+2 -1
View File
@@ -138,7 +138,8 @@ public enum UIMessageType
Default,
Warning,
Error,
Success
Success,
Close
}
public enum UmaFileType
{
+5
View File
@@ -176,6 +176,11 @@ public class UmaViewerMain : MonoBehaviour
UI.LoadLivePanels();
}
}
if (Config.Instance.WorkMode == WorkMode.Standalone)
{
UI.ShowMessage("Done.", UIMessageType.Close);
}
}
public void OpenUrl(string url)
+4 -3
View File
@@ -1151,7 +1151,7 @@ public class UmaViewerUI : MonoBehaviour
public void AnimationSpeedChange(float val)
{
AnimationSpeedText.text = string.Format("Animation Speed: {0:F2}", val);
AnimationSpeedText.text = string.Format("Speed: {0:F2}", val);
if (!Builder.CurrentUMAContainer || !Builder.CurrentUMAContainer.UmaAnimator) return;
Builder.CurrentUMAContainer.UmaAnimator.speed = val;
Builder.AnimationCameraAnimator.speed = val;
@@ -1274,7 +1274,7 @@ public class UmaViewerUI : MonoBehaviour
}
}
public void ChangeMainPath()
public void ChangeDataPath()
{
var path = StandaloneFileBrowser.OpenFolderPanel("Select Folder", Config.Instance.MainPath, false);
if (path != null && path.Length > 0 && !string.IsNullOrEmpty(path[0]))
@@ -1299,9 +1299,10 @@ public class UmaViewerUI : MonoBehaviour
UIMessageType.Error => string.Format("<color=red>{0}</color>\n", msg),
UIMessageType.Warning => string.Format("<color=yellow>{0}</color>\n", msg),
UIMessageType.Success => string.Format("<color=green>{0}</color>\n", msg),
UIMessageType.Close => string.Format("<color=green>{0}</color>\n", msg),
_ => $"{msg}\n",
};
MessageScrollRect.gameObject.SetActive(true);
MessageScrollRect.gameObject.SetActive(type != UIMessageType.Close);
MessageScrollRect.verticalNormalizedPosition = 0;
}