Example #1
0
        private void GUI_DrawCell_Color(CellType cellType)
        {
            Texture2D presetTexture = GUIHelper.GenerateTexture2D(cellType.GetColor());

            GUIStyle guiStyle = new GUIStyle();

            guiStyle.normal.background = presetTexture;

            // draw color of cell
            GUILayout.Box(presetTexture, guiStyle, GUILayout.Width(cellButtonSize), GUILayout.Height(cellButtonSize));

            Rect boxRect = GUILayoutUtility.GetLastRect();

            ProcessPresetEventClick(boxRect, cellType);
        }