mirror of
https://github.com/GrahamKracker/UnityExplorer.git
synced 2025-01-10 19:02:08 +08:00
Revert colorblock changes
This commit is contained in:
parent
0555a644b7
commit
40f698122d
@ -121,23 +121,6 @@ namespace UnityExplorer.Core.Runtime.Il2Cpp
|
|||||||
.Invoke(handle);
|
.Invoke(handle);
|
||||||
}
|
}
|
||||||
|
|
||||||
// ColorBlock set
|
|
||||||
|
|
||||||
public override void SetColorBlockColors(ref ColorBlock colorBlock, Color? normal, Color? highlighted, Color? pressed)
|
|
||||||
{
|
|
||||||
if (normal != null)
|
|
||||||
{
|
|
||||||
colorBlock.m_NormalColor = (Color)normal;
|
|
||||||
colorBlock.m_SelectedColor = (Color)normal;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (highlighted != null)
|
|
||||||
colorBlock.m_HighlightedColor = (Color)highlighted;
|
|
||||||
|
|
||||||
if (pressed != null)
|
|
||||||
colorBlock.m_PressedColor = (Color)pressed;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Custom check for il2cpp input pointer event
|
// Custom check for il2cpp input pointer event
|
||||||
|
|
||||||
public override void CheckInputPointerEvent()
|
public override void CheckInputPointerEvent()
|
||||||
|
@ -108,6 +108,7 @@ namespace UnityExplorer.Core.Runtime.Il2Cpp
|
|||||||
|
|
||||||
Type ret = Type.GetType(name);
|
Type ret = Type.GetType(name);
|
||||||
|
|
||||||
|
// Thanks to Slaynash for this deobfuscation snippet!
|
||||||
if (ret == null)
|
if (ret == null)
|
||||||
{
|
{
|
||||||
string baseName = cppType.FullName;
|
string baseName = cppType.FullName;
|
||||||
|
@ -60,18 +60,6 @@ namespace UnityExplorer.Core.Runtime.Mono
|
|||||||
return scene.rootCount;
|
return scene.rootCount;
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void SetColorBlockColors(ref ColorBlock block, Color? normal, Color? highlighted, Color? pressed)
|
|
||||||
{
|
|
||||||
if (normal != null)
|
|
||||||
block.normalColor = (Color)normal;
|
|
||||||
|
|
||||||
if (highlighted != null)
|
|
||||||
block.highlightedColor = (Color)highlighted;
|
|
||||||
|
|
||||||
if (pressed != null)
|
|
||||||
block.pressedColor = (Color)pressed;
|
|
||||||
}
|
|
||||||
|
|
||||||
public override void CheckInputPointerEvent()
|
public override void CheckInputPointerEvent()
|
||||||
{
|
{
|
||||||
// Not necessary afaik
|
// Not necessary afaik
|
||||||
|
@ -52,8 +52,6 @@ namespace UnityExplorer.Core.Runtime
|
|||||||
|
|
||||||
public abstract int GetRootCount(Scene scene);
|
public abstract int GetRootCount(Scene scene);
|
||||||
|
|
||||||
public abstract void SetColorBlockColors(ref ColorBlock block, Color? normal, Color? highlight, Color? pressed);
|
|
||||||
|
|
||||||
public abstract void CheckInputPointerEvent();
|
public abstract void CheckInputPointerEvent();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -64,7 +64,14 @@ namespace UnityExplorer.UI
|
|||||||
public static void SetColorBlockValues(ref this ColorBlock colorBlock, Color? normal = null, Color? highlighted = null,
|
public static void SetColorBlockValues(ref this ColorBlock colorBlock, Color? normal = null, Color? highlighted = null,
|
||||||
Color? pressed = null)
|
Color? pressed = null)
|
||||||
{
|
{
|
||||||
RuntimeProvider.Instance.SetColorBlockColors(ref colorBlock, normal, highlighted, pressed);
|
if (normal != null)
|
||||||
|
colorBlock.normalColor = (Color)normal;
|
||||||
|
|
||||||
|
if (highlighted != null)
|
||||||
|
colorBlock.highlightedColor = (Color)highlighted;
|
||||||
|
|
||||||
|
if (pressed != null)
|
||||||
|
colorBlock.pressedColor = (Color)pressed;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user