forked from Unity-Technologies/UnityCsReference
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Unity 2017.2.0b1 C# reference source code
- Loading branch information
Unity Technologies
committed
Jun 29, 2017
1 parent
6811906
commit 69bc09e
Showing
225 changed files
with
9,662 additions
and
2,400 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
// Unity C# reference source | ||
// Copyright (c) Unity Technologies. For terms of use, see | ||
// https://unity3d.com/legal/licenses/Unity_Reference_Only_License | ||
|
||
using System; | ||
|
||
namespace UnityEditor.Accessibility | ||
{ | ||
internal enum ColorBlindCondition | ||
{ | ||
Default, | ||
Deuteranopia, | ||
Protanopia, | ||
Tritanopia, | ||
} | ||
|
||
// NOTE: The preferences in this class are currently only exposed via a context menu in the ProfilerWindow | ||
// these toggles need to instead be moved to e.g., the Preferences menu before they are used elsewhere | ||
internal static class UserAccessiblitySettings | ||
{ | ||
static UserAccessiblitySettings() | ||
{ | ||
s_ColorBlindCondition = (ColorBlindCondition)EditorPrefs.GetInt(k_ColorBlindConditionPrefKey, (int)ColorBlindCondition.Default); | ||
} | ||
|
||
private const string k_ColorBlindConditionPrefKey = "AccessibilityColorBlindCondition"; | ||
|
||
public static ColorBlindCondition colorBlindCondition | ||
{ | ||
get { return s_ColorBlindCondition; } | ||
set | ||
{ | ||
if (s_ColorBlindCondition != value) | ||
{ | ||
s_ColorBlindCondition = value; | ||
EditorPrefs.SetInt(k_ColorBlindConditionPrefKey, (int)value); | ||
if (colorBlindConditionChanged != null) | ||
colorBlindConditionChanged(); | ||
} | ||
} | ||
} | ||
private static ColorBlindCondition s_ColorBlindCondition; | ||
|
||
public static Action colorBlindConditionChanged; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.