scrolling is ALMOST ALMOST functional

This commit is contained in:
streitixy 2024-01-31 00:48:47 -03:00
parent 003db7cf46
commit d0c23abb80
4 changed files with 39 additions and 32 deletions

View file

@ -106,14 +106,14 @@ Material:
- _WeightBold: 0.75 - _WeightBold: 0.75
- _WeightNormal: 0 - _WeightNormal: 0
m_Colors: m_Colors:
- _ClipRect: {r: -10, g: -10, b: 10, a: 10} - _ClipRect: {r: -10, g: -10, b: -10, a: 10}
- _Color: {r: 0.6959069, g: 1, b: 0, a: 1} - _Color: {r: 0.6959069, g: 1, b: 0, a: 1}
- _EnvMatrixRotation: {r: 0, g: 0, b: 0, a: 0} - _EnvMatrixRotation: {r: 0, g: 0, b: 0, a: 0}
- _FaceColor: {r: 1, g: 1, b: 1, a: 1} - _FaceColor: {r: 1, g: 1, b: 1, a: 1}
- _GlowColor: {r: 0, g: 1, b: 0, a: 0.5} - _GlowColor: {r: 0, g: 1, b: 0, a: 0.5}
- _MaskCoord: {r: 0, g: 0, b: 32767, a: 32767} - _MaskCoord: {r: 0, g: 0, b: 32767, a: 32767}
- _MaskEdgeColor: {r: 1, g: 1, b: 1, a: 1} - _MaskEdgeColor: {r: 1, g: 1, b: 1, a: 1}
- _OutlineColor: {r: 0.44716978, g: 0.50570476, b: 1, a: 1} - _OutlineColor: {r: 0, g: 0.106383085, b: 1, a: 1}
- _ReflectFaceColor: {r: 0, g: 0, b: 0, a: 1} - _ReflectFaceColor: {r: 0, g: 0, b: 0, a: 1}
- _ReflectOutlineColor: {r: 0, g: 0, b: 0, a: 1} - _ReflectOutlineColor: {r: 0, g: 0, b: 0, a: 1}
- _SpecColor: {r: 0, g: 0, b: 0, a: 1} - _SpecColor: {r: 0, g: 0, b: 0, a: 1}

View file

@ -121,7 +121,7 @@ RectTransform:
m_ConstrainProportionsScale: 0 m_ConstrainProportionsScale: 0
m_Children: [] m_Children: []
m_Father: {fileID: 8473313144218655437} m_Father: {fileID: 8473313144218655437}
m_RootOrder: 3 m_RootOrder: 8
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5} m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5} m_AnchorMax: {x: 0.5, y: 0.5}
@ -547,7 +547,7 @@ RectTransform:
m_ConstrainProportionsScale: 0 m_ConstrainProportionsScale: 0
m_Children: [] m_Children: []
m_Father: {fileID: 8473313144218655437} m_Father: {fileID: 8473313144218655437}
m_RootOrder: 5 m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5} m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5} m_AnchorMax: {x: 0.5, y: 0.5}
@ -805,7 +805,7 @@ RectTransform:
m_ConstrainProportionsScale: 0 m_ConstrainProportionsScale: 0
m_Children: [] m_Children: []
m_Father: {fileID: 8473313144218655437} m_Father: {fileID: 8473313144218655437}
m_RootOrder: 9 m_RootOrder: 4
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5} m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5} m_AnchorMax: {x: 0.5, y: 0.5}
@ -1599,7 +1599,7 @@ RectTransform:
m_ConstrainProportionsScale: 0 m_ConstrainProportionsScale: 0
m_Children: [] m_Children: []
m_Father: {fileID: 8473313144218655437} m_Father: {fileID: 8473313144218655437}
m_RootOrder: 1 m_RootOrder: 6
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5} m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5} m_AnchorMax: {x: 0.5, y: 0.5}
@ -3858,7 +3858,7 @@ RectTransform:
m_ConstrainProportionsScale: 0 m_ConstrainProportionsScale: 0
m_Children: [] m_Children: []
m_Father: {fileID: 8473313144218655437} m_Father: {fileID: 8473313144218655437}
m_RootOrder: 7 m_RootOrder: 2
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5} m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5} m_AnchorMax: {x: 0.5, y: 0.5}
@ -4727,7 +4727,7 @@ RectTransform:
m_ConstrainProportionsScale: 0 m_ConstrainProportionsScale: 0
m_Children: [] m_Children: []
m_Father: {fileID: 8473313144218655437} m_Father: {fileID: 8473313144218655437}
m_RootOrder: 6 m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5} m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5} m_AnchorMax: {x: 0.5, y: 0.5}
@ -6599,7 +6599,7 @@ RectTransform:
m_ConstrainProportionsScale: 0 m_ConstrainProportionsScale: 0
m_Children: [] m_Children: []
m_Father: {fileID: 8473313144218655437} m_Father: {fileID: 8473313144218655437}
m_RootOrder: 8 m_RootOrder: 3
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5} m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5} m_AnchorMax: {x: 0.5, y: 0.5}
@ -6856,16 +6856,16 @@ Transform:
m_LocalScale: {x: 1, y: 1, z: 1} m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0 m_ConstrainProportionsScale: 0
m_Children: m_Children:
- {fileID: 7025149057808423635}
- {fileID: 2141123856096727070}
- {fileID: 3994050857099161038}
- {fileID: 7213038528357793729}
- {fileID: 8940577750127081622}
- {fileID: 4047535352605853715} - {fileID: 4047535352605853715}
- {fileID: 7818624704435488497} - {fileID: 7818624704435488497}
- {fileID: 8932810661823305770} - {fileID: 8932810661823305770}
- {fileID: 4389590328865582082} - {fileID: 4389590328865582082}
- {fileID: 3859919625309255425} - {fileID: 3859919625309255425}
- {fileID: 7025149057808423635}
- {fileID: 2141123856096727070}
- {fileID: 3994050857099161038}
- {fileID: 7213038528357793729}
- {fileID: 8940577750127081622}
- {fileID: 8387568492357112863} - {fileID: 8387568492357112863}
- {fileID: 298275253940792191} - {fileID: 298275253940792191}
- {fileID: 8867001238483373209} - {fileID: 8867001238483373209}
@ -7939,7 +7939,7 @@ RectTransform:
m_ConstrainProportionsScale: 0 m_ConstrainProportionsScale: 0
m_Children: [] m_Children: []
m_Father: {fileID: 8473313144218655437} m_Father: {fileID: 8473313144218655437}
m_RootOrder: 4 m_RootOrder: 9
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5} m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5} m_AnchorMax: {x: 0.5, y: 0.5}
@ -8986,7 +8986,7 @@ RectTransform:
m_ConstrainProportionsScale: 0 m_ConstrainProportionsScale: 0
m_Children: [] m_Children: []
m_Father: {fileID: 8473313144218655437} m_Father: {fileID: 8473313144218655437}
m_RootOrder: 2 m_RootOrder: 7
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5} m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5} m_AnchorMax: {x: 0.5, y: 0.5}
@ -9393,7 +9393,7 @@ RectTransform:
m_ConstrainProportionsScale: 0 m_ConstrainProportionsScale: 0
m_Children: [] m_Children: []
m_Father: {fileID: 8473313144218655437} m_Father: {fileID: 8473313144218655437}
m_RootOrder: 0 m_RootOrder: 5
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5} m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5} m_AnchorMax: {x: 0.5, y: 0.5}

View file

@ -415,7 +415,7 @@ namespace HeavenStudio.Games
} }
public void ShowText(string text1, string text2, string text3, string text4, string text5, int font) public void ShowText(string text1, string text2, string text3, string text4, string text5, int font)
{ { Text6.GetComponent<TextMeshPro>().SetMask(0, new Vector4(-10f, -10f, -10f, 10));
if (font == 0) if (font == 0)
{ {
Text1.GetComponent<TextMeshPro>().font = RodinDB; Text1.GetComponent<TextMeshPro>().font = RodinDB;
@ -455,9 +455,10 @@ namespace HeavenStudio.Games
if (text1 is not "" || text1 is not "Type r| for red text, g| for green text and y| for yellow text. These can be used multiple times in a single line"){ if (text1 is not "" || text1 is not "Type r| for red text, g| for green text and y| for yellow text. These can be used multiple times in a single line."){
text1 = ChangeColor(text1); text1 = ChangeColor(text1);
Text1.text = text1; Text1.text = text1;
;
Text6.text = text1; Text6.text = text1;
} }
@ -508,23 +509,27 @@ namespace HeavenStudio.Games
} }
} }
IEnumerator scroll(float startVal, float endVal, float seconds)
{
float currentVal = startVal;
for (float t= 0.0f; t<1.0f;t+= Time.deltaTime / seconds)
{
var coords = new Vector4(-10f, -10f, Mathf.Lerp(currentVal, endVal, t), -10f);
Text6.GetComponent<TextMeshPro>().SetMask(0,coords);
yield return null;
}
}
public void ScrollText(bool text1, bool text2, bool text3, bool text4, bool text5, float length) public void ScrollText(bool text1, bool text2, bool text3, bool text4, bool text5, float length)
{ RectTransform rectTransform = Text6.GetComponent<RectTransform>();
if (rectTransform != null)
{ {
// Set Left and Top using anchoredPosition StartCoroutine(scroll(-10f, -7f, 5f));
rectTransform.anchoredPosition = new Vector2(-10, -10);
// Calculate the Right and Bottom based on Left and Top
float width = -10f - 9.5f; // Right - Left
float height = 10 - (-10); // Top - Bottom
// Set sizeDelta based on calculated values
rectTransform.sizeDelta = new Vector2(width, height);
} }
}
public void Bop(double beat, double length, bool bop, bool auto)
public void Bop(double beat, double length, bool bop, bool auto)
{ {
} }

View file

@ -288,5 +288,7 @@ MonoBehaviour:
- Assets/Scripts/Games/MonkeyWatch/BalloonHandler.cs - Assets/Scripts/Games/MonkeyWatch/BalloonHandler.cs
- Assets/Scripts/Games/MonkeyWatch/WatchMonkey.cs - Assets/Scripts/Games/MonkeyWatch/WatchMonkey.cs
- Assets/Scripts/Games/BonOdori/BonOdori.cs - Assets/Scripts/Games/BonOdori/BonOdori.cs
- Assets/Scripts/Games/MannequinFactory/MannequinFactory.cs
- Assets/Scripts/Games/MannequinFactory/MannequinHead.cs
PathsToSkipImportEvent: [] PathsToSkipImportEvent: []
PathsToIgnoreOverwriteSettingOnAttribute: [] PathsToIgnoreOverwriteSettingOnAttribute: []