Example #1
0
        private string GetDockNameFromPosEnum(ToolBarInitialPos pos)
        {
            switch (pos)
            {
            case ToolBarInitialPos.Top:
            default:
                return("topSandBarDock");

            case ToolBarInitialPos.Bottom:
                return("bottomSandBarDock");

            case ToolBarInitialPos.Left:
                return("leftSandBarDock");

            case ToolBarInitialPos.Right:
                return("rightSandBarDock");
            }
        }
Example #2
0
        private void CreateToolBar(string name, ToolBarInitialPos initialPos)
        {
            TD.SandBar.ToolBar temp = new TD.SandBar.ToolBar();
            temp.Name                = name;
            temp.Overflow            = ToolBarOverflow.Hide;
            temp.AllowHorizontalDock = true;
            temp.AllowRightToLeft    = true;
            temp.AllowVerticalDock   = true;
            temp.Closable            = false;
            temp.Movable             = true;
            temp.Tearable            = true;
            temp.DockLine            = 2;

            ToolBarDef tbd = new ToolBarDef();

            tbd.NWNToolsetDockName = GetDockNameFromPosEnum(initialPos);
            tbd.toolBar            = temp;

            AllToolbars.Add(name, tbd);
        }
Example #3
0
 private string GetDockNameFromPosEnum(ToolBarInitialPos pos)
 {
     switch (pos)
         {
         case ToolBarInitialPos.Top:
         default:
             return "topSandBarDock";
         case ToolBarInitialPos.Bottom:
             return "bottomSandBarDock";
         case ToolBarInitialPos.Left:
             return "leftSandBarDock";
         case ToolBarInitialPos.Right:
             return "rightSandBarDock";
         }
 }
Example #4
0
        private void CreateToolBar(string name, ToolBarInitialPos initialPos)
        {
            ToolBar temp = new ToolBar();
            temp.Name = name;
            temp.Overflow = ToolBarOverflow.Hide;
            temp.AllowHorizontalDock = true;
            temp.AllowRightToLeft = true;
            temp.AllowVerticalDock = true;
            temp.Closable = false;
            temp.Movable = true;
            temp.Tearable = true;
            temp.DockLine = 2;

            ToolBarDef tbd = new ToolBarDef();
            tbd.NWNToolsetDockName = GetDockNameFromPosEnum(initialPos);
            tbd.toolBar = temp;

            AllToolbars.Add(name, tbd);
        }