Add support for setting disabled color on ColoBlock

This commit is contained in:
Sinai
2021-04-10 20:15:03 +10:00
parent a5a07a0a23
commit a1c2dfbe50
3 changed files with 20 additions and 3 deletions

View File

@ -86,7 +86,8 @@ namespace UnityExplorer.Core.Runtime.Mono
return scene.rootCount;
}
public override void SetColorBlock(Selectable selectable, Color? normal = null, Color? highlighted = null, Color? pressed = null)
public override void SetColorBlock(Selectable selectable, Color? normal = null, Color? highlighted = null, Color? pressed = null,
Color? disabled = null)
{
var colors = selectable.colors;
@ -99,6 +100,9 @@ namespace UnityExplorer.Core.Runtime.Mono
if (pressed != null)
colors.pressedColor = (Color)pressed;
if (disabled != null)
colors.disabledColor = (Color)disabled;
SetColorBlock(selectable, colors);
}