/// <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; }
/// <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; }
/// <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; }
/// <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; }
/// <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; }
/// <summary> /// Initializes a new instance of the <see cref="Font"/> class. /// </summary> public Font(Renderer.Base renderer) : this(renderer, "Arial", 10) { }
public void SetRenderer(Base renderer) { throw new NotImplementedException(); }