Exemplo n.º 1
0
            // constructor
            // @params: item icon, optional text
            public PieMenuSlice(Object menuItem, Texture2D iconTexture, UI2D.Shared.GetFont font, string displayText)
            {
                int textWidth = 80;

                Debug.Assert(iconTexture != null || font != null);
                this.menuItem  = menuItem;
                this.texture   = iconTexture;
                this.font      = font;
                this.label     = displayText;
                this.textBlob  = new TextBlob(font, displayText, textWidth);
                this.sliceType = PieSelector.SliceType.single;
            }
Exemplo n.º 2
0
 public PieMenuSlice(PieRecipeItem recipe)
 {
     this.menuItem = recipe.menuItem;
     this.texture  = recipe.texture;
     this.font     = recipe.font;
     this.label    = recipe.label;
     if (recipe.subList == null || recipe.subList.Count == 0)
     {
         this.sliceType = PieSelector.SliceType.single;
     }
     else
     {
         this.sliceType = PieSelector.SliceType.group;
     }
 }
Exemplo n.º 3
0
 public RenderPieSlice(float innerRadius, float outerRadius, float arcLength, PieSelector.SliceType sliceType)
     : base(innerRadius, outerRadius, arcLength, sliceType)
 {
     CreateGeometry(BokuGame.bokuGame.GraphicsDevice);
 }
Exemplo n.º 4
0
            private RenderPieSlice BuildPieSlice(PieSelector.SliceType type, float arcLen, float innnerRad, float outerRad)
            {
                RenderPieSlice pieSlice = new RenderPieSlice(innnerRad, outerRad, arcLen, type);

                return(pieSlice);
            }