Exemplo n.º 1
0
        private static void DrawCoil(string label, DeviceCoil coil)
        {
            var labelPos = EditorGUILayout.GetControlRect();

            labelPos.height = 18;
            var switchPos = new Rect((float)(labelPos.x + (double)EditorGUIUtility.labelWidth - 20.0), labelPos.y, labelPos.height, labelPos.height);

            GUI.Label(labelPos, label);
            GUI.DrawTexture(switchPos, Icons.Bolt(IconSize.Small, coil.IsEnabled ? IconColor.Orange : IconColor.Gray));
        }
 protected override Texture2D StatusIcon(bool status) => Icons.Bolt(IconSize.Small, status ? IconColor.Orange : IconColor.Gray);