1
0
mirror of https://github.com/originalnicodr/CinematicUnityExplorer.git synced 2026-10-10 21:13:15 +08:00

Inverted favorite buttons on the Animator and fixed the default freecam move speed input to display the correct initial speed.

This commit is contained in:
originalnicodr
2024-02-26 21:30:52 -03:00
parent bc22099845
commit 3e6350541b
2 changed files with 7 additions and 7 deletions
+5 -5
View File
@@ -107,7 +107,7 @@ namespace UnityExplorer.UI.Panels
return;
animatorDropdown.value = animatorDropdown.value == 0 ? animatorDropdown.options.Count - 1 : animatorDropdown.value - 1;
favAnimation.ButtonText.text = animatorPlayer.IsAnimationFaved(animatorPlayer.overridingAnimation) ? "☆" : "★";
favAnimation.ButtonText.text = animatorPlayer.IsAnimationFaved(animatorPlayer.overridingAnimation) ? "★" : "☆";
};
GameObject overridingAnimationObj = UIFactory.CreateDropdown(UIRoot, $"Animations_Dropdown", out animatorDropdown, null, 14, (idx) => {
@@ -115,7 +115,7 @@ namespace UnityExplorer.UI.Panels
return;
animatorPlayer.overridingAnimation = idx < animatorDropdown.options.Count ? animatorPlayer.animations.Find(a => a.name == animatorDropdown.options[idx].text) : animatorPlayer.overridingAnimation;
favAnimation.ButtonText.text = animatorPlayer.IsAnimationFaved(animatorPlayer.overridingAnimation) ? "☆" : "★";
favAnimation.ButtonText.text = animatorPlayer.IsAnimationFaved(animatorPlayer.overridingAnimation) ? "★": "☆";
}
);
@@ -128,10 +128,10 @@ namespace UnityExplorer.UI.Panels
return;
animatorDropdown.value = animatorDropdown.value == animatorDropdown.options.Count - 1 ? 0 : animatorDropdown.value + 1;
favAnimation.ButtonText.text = animatorPlayer.IsAnimationFaved(animatorPlayer.overridingAnimation) ? "☆" : "★";
favAnimation.ButtonText.text = animatorPlayer.IsAnimationFaved(animatorPlayer.overridingAnimation) ? "★" : "☆";
};
favAnimation = UIFactory.CreateButton(UIRoot, "FavAnimation", "★", new Color(0.05f, 0.05f, 0.05f));
favAnimation = UIFactory.CreateButton(UIRoot, "FavAnimation", "☆", new Color(0.05f, 0.05f, 0.05f));
UIFactory.SetLayoutElement(favAnimation.Component.gameObject, minHeight: 25, minWidth: 25);
favAnimation.OnClick += () => {
if (animatorPlayer.animator.wrappedObject == null || animatorDropdown == null)
@@ -145,7 +145,7 @@ namespace UnityExplorer.UI.Panels
animatorPlayer.UnfavAnimation(animatorPlayer.overridingAnimation);
}
favAnimation.ButtonText.text = !isAnimationFaved ? "☆" : "★";
favAnimation.ButtonText.text = !isAnimationFaved ? "★" : "☆";
//UpdateDropdownOptions();
};
+2 -2
View File
@@ -286,7 +286,7 @@ namespace UnityExplorer.UI.Panels
AddSpacer(5);
GameObject nearCameraClipGroup = AddInputField("NearClipPlane", "Near clip plane:", "0", out nearClipPlaneInput, NearClipInput_OnEndEdit);
moveSpeedInput.Text = nearClipPlaneValue.ToString();
nearClipPlaneInput.Text = nearClipPlaneValue.ToString();
GameObject nearClipObj = UIFactory.CreateSlider(nearCameraClipGroup, "Camera near plane clip", out nearClipPlaneSlider);
UIFactory.SetLayoutElement(nearClipObj, minHeight: 25, minWidth: 250, flexibleWidth: 0);
@@ -306,7 +306,7 @@ namespace UnityExplorer.UI.Panels
AddSpacer(5);
GameObject farCameraClipGroup = AddInputField("FearClipPlane", "Far clip plane:", "0", out farClipPlaneInput, FarClipInput_OnEndEdit);
moveSpeedInput.Text = farClipPlaneValue.ToString();
farClipPlaneInput.Text = farClipPlaneValue.ToString();
GameObject farClipObj = UIFactory.CreateSlider(farCameraClipGroup, "Camera far plane clip", out farClipPlaneSlider);
UIFactory.SetLayoutElement(farClipObj, minHeight: 25, minWidth: 250, flexibleWidth: 0);