コード例 #1
0
 /// <summary>
 /// Initializes a new instance of the <see cref="Texture"/> class.
 /// </summary>
 /// <param name="renderer">Renderer to use.</param>
 public Texture(Renderer.Base renderer)
 {
     m_Renderer = renderer;
     Width      = 4;
     Height     = 4;
     Failed     = false;
 }
コード例 #2
0
        /// <summary>
        /// Renders the currently visible tooltip.
        /// </summary>
        /// <param name="skin"></param>
        public static void RenderToolTip(Skin.Base skin)
        {
            if (null == g_ToolTip)
            {
                return;
            }

            Renderer.Base render = skin.Renderer;

            Point     oldRenderOffset = render.RenderOffset;
            Point     mousePos        = Input.InputHandler.MousePosition;
            Rectangle bounds          = g_ToolTip.ToolTip.Bounds;

            Rectangle offset = Util.FloatRect(mousePos.X - bounds.Width * 0.5f, mousePos.Y - bounds.Height - 10,
                                              bounds.Width, bounds.Height);

            offset = Util.ClampRectToRect(offset, g_ToolTip.GetCanvas().Bounds);

            //Calculate offset on screen bounds
            render.AddRenderOffset(offset);
            render.EndClip();

            skin.DrawToolTip(g_ToolTip.ToolTip);
            g_ToolTip.ToolTip.DoRender(skin);

            render.RenderOffset = oldRenderOffset;
        }
コード例 #3
0
ファイル: Texture.cs プロジェクト: jcsnider/GWEN.Net-Unity
 /// <summary>
 /// Initializes a new instance of the <see cref="Texture"/> class.
 /// </summary>
 /// <param name="renderer">Renderer to use.</param>
 public Texture(Renderer.Base renderer)
 {
     m_Renderer = renderer;
     Width = 4;
     Height = 4;
     Failed = false;
 }
コード例 #4
0
 /// <summary>
 /// Initializes a new instance of the <see cref="Font"/> class.
 /// </summary>
 /// <param name="renderer">Renderer to use.</param>
 /// <param name="faceName">Face name.</param>
 /// <param name="size">Font size.</param>
 public Font(Renderer.Base renderer, string faceName, int size = 10, FontStyle fontStyle = FontStyle.Regular)
 {
     m_Renderer = renderer;
     FaceName   = faceName;
     Size       = size;
     FontStyle  = fontStyle;
     Smooth     = false;
 }
コード例 #5
0
ファイル: Font.cs プロジェクト: esdrubal/guieditor
 /// <summary>
 /// Initializes a new instance of the <see cref="Font"/> class.
 /// </summary>
 /// <param name="renderer">Renderer to use.</param>
 /// <param name="faceName">Face name.</param>
 /// <param name="size">Font size.</param>
 public Font(Renderer.Base renderer, String faceName, int size = 10)
 {
     m_Renderer = renderer;
     FaceName = faceName;
     Size = size;
     Smooth = false;
     //Bold = false;
     //DropShadow = false;
 }
コード例 #6
0
 /// <summary>
 /// Initializes a new instance of the <see cref="Font"/> class.
 /// </summary>
 /// <param name="renderer">Renderer to use.</param>
 /// <param name="faceName">Face name.</param>
 /// <param name="size">Font size.</param>
 public Font(Renderer.Base renderer, string faceName, int size = 10)
 {
     m_Renderer = renderer;
     FaceName   = faceName;
     Size       = size;
     Smooth     = false;
     //Bold = false;
     //DropShadow = false;
 }
コード例 #7
0
 /// <summary>
 /// Initializes a new instance of the <see cref="Font"/> class.
 /// </summary>
 public Font(Renderer.Base renderer)
     : this(renderer, "Arial", 10)
 {
 }
コード例 #8
0
ファイル: SFML.cs プロジェクト: LawlietRyuuzaki/gwen-dotnet
 public void SetRenderer(Base renderer)
 {
     throw new NotImplementedException();
 }