Exemplo n.º 1
0
    public RollTableView(TreeViewState state, MultiColumnHeader multicolumnHeader, RollTableModel model)
        : base(state, multicolumnHeader, model)
    {
        Assert.AreEqual(m_SortOptions.Length, Enum.GetValues(typeof(MyColumns)).Length,
                        "Ensure number of sort options are in sync with number of MyColumns enum values");

        // Custom setup
        rowHeight = kRowHeights;
        columnIndexForTreeFoldouts    = 1;
        showAlternatingRowBackgrounds = true;
        showBorder           = true;
        customFoldoutYOffset =
            (kRowHeights - EditorGUIUtility.singleLineHeight) *
            0.5f; // center foldout in the row since we also center content. See RowGUI
        extraSpaceBeforeIconAndLabel      = kToggleWidth;
        multicolumnHeader.sortingChanged += OnSortingChanged;

        Reload();
    }
Exemplo n.º 2
0
 protected void Init(RollTableModel model)
 {
     base.Init(model);
     //treeChanged += RecalcDropChance;
 }
Exemplo n.º 3
0
 public RollTableView(TreeViewState state, RollTableModel model) : base(state, model)
 {
     showBorder = true;
     showAlternatingRowBackgrounds = true;
     Init(model);
 }