private GUILayoutOption CreateRawOption(GUILayoutOptionType type, int index) { var option = CreateRawOption(type); rawOptionIndices[GUILayoutOptionTypeEnum.IndexOfBit(type)] = index; return(option); }
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(); }
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); }