mirror of
https://github.com/sinai-dev/UnityExplorer.git
synced 2025-06-26 10:03:10 +08:00
Add support for setting disabled color on ColoBlock
This commit is contained in:
@ -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);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user