コード例 #1
0
ファイル: ColoredKeyBind.cs プロジェクト: wx8829110/WUYANZZZ
 /// <summary>
 ///     Gets the width of the MenuKeyBind
 /// </summary>
 /// <returns>The <see cref="int" /></returns>
 public override int Width()
 {
     return(ColoredUtilities.CalcWidthItem(this.Component)
            + (int)
            (MenuSettings.ContainerHeight + ColoredUtilities.CalcWidthText("[" + this.Component.Key + "]")
             + MenuSettings.ContainerTextOffset));
 }
コード例 #2
0
ファイル: ColoredList.cs プロジェクト: chienhao10/TwLS.SDK
 /// <summary>
 ///     Gets the width of the MenuList
 /// </summary>
 /// <returns>The <see cref="int" /></returns>
 public override int Width()
 {
     return(ColoredUtilities.CalcWidthItem(this.Component) + this.Component.MaxStringWidth + (2 * TextSpacing)
            + this.dropDownButtonWidth);
 }
コード例 #3
0
ファイル: ColoredSlider.cs プロジェクト: wx8829110/WUYANZZZ
 /// <summary>
 ///     Calculates the width of this component
 /// </summary>
 /// <returns>
 ///     The width.
 /// </returns>
 public override int Width()
 {
     return(ColoredUtilities.CalcWidthItem(this.Component) + 100);
 }
コード例 #4
0
 /// <summary>
 ///     Gets the width of a <see cref="MenuColor" />
 /// </summary>
 /// <returns>The <see cref="int" /></returns>
 public override int Width()
 {
     return(ColoredUtilities.CalcWidthItem(this.Component) + MenuSettings.ContainerHeight);
 }
コード例 #5
0
 /// <summary>
 ///     Gets the width of the <see cref="MenuButton" />
 /// </summary>
 /// <returns>
 ///     The <see cref="int" />.
 /// </returns>
 public override int Width()
 {
     return(ColoredUtilities.CalcWidthItem(this.Component) + (2 * TextGap)
            + MenuSettings.Font.MeasureText(MenuManager.Instance.Sprite, this.Component.ButtonText, 0).Width);
 }