Exemple #1
0
            private GUILayoutOption CreateRawOption(GUILayoutOptionType type, int index)
            {
                var option = CreateRawOption(type);

                rawOptionIndices[GUILayoutOptionTypeEnum.IndexOfBit(type)] = index;
                return(option);
            }
Exemple #2
0
            public Instance(GUILayoutOptionType types)
            {
                Types = types;
                var typeValues = GUILayoutOptionTypeEnum.ValuesOf(Types);

                rawOptionIndices = new int[typeValues.Select(GUILayoutOptionTypeEnum.IndexOfBit).Max() + 1];
                rawOptions       = typeValues.Select(CreateRawOption).ToArray();
            }
Exemple #3
0
            private int GetRawOptionIndex(GUILayoutOptionType type)
            {
                int typeIndex = GUILayoutOptionTypeEnum.IndexOfBit(type);
                int rawIndex  = rawOptionIndices[typeIndex];

                if (rawIndex == Index.Invalid)
                {
                    throw new ArgumentException("The current instance do not contains specified option type", "type");
                }
                return(rawIndex);
            }