Popcorning Guinea Pig
Search Results for

    Show / Hide Table of Contents

    Class TooltipRenderer

    Static class responsible for rendering tooltips throughout the UI system

    Inheritance
    object
    TooltipRenderer
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: PopcorningGuineaPig.Engine.UI
    Assembly: PopcorningGuineaPig.Engine.dll
    Syntax
    public static class TooltipRenderer

    Methods

    | Edit this page View Source

    ClearQueue()

    Drops any queued tooltips without rendering. Editor viewports flush the queue before each RenderTexture2D pass so a tooltip queued by one viewport's update cannot bleed into another viewport's render.

    Declaration
    public static void ClearQueue()
    | Edit this page View Source

    QueueTooltip(string, Vector2)

    Queues a tooltip for rendering at the end of the frame to ensure proper Z-order

    Declaration
    public static void QueueTooltip(string text, Vector2 mousePosition)
    Parameters
    Type Name Description
    string text

    The tooltip text to display

    Vector2 mousePosition

    Current mouse position

    | Edit this page View Source

    RenderAllQueuedTooltips()

    Renders all queued tooltips and clears the queue This should be called at the end of the frame after all other UI elements are drawn

    Declaration
    public static void RenderAllQueuedTooltips()
    | Edit this page View Source

    RenderTooltip(string, Vector2, int, int)

    Renders a tooltip at the specified position with the given text

    Declaration
    public static void RenderTooltip(string text, Vector2 mousePosition, int screenWidth, int screenHeight)
    Parameters
    Type Name Description
    string text

    The tooltip text to display

    Vector2 mousePosition

    Current mouse position

    int screenWidth

    Screen width for boundary checking

    int screenHeight

    Screen height for boundary checking

    | Edit this page View Source

    SetLocalizationService(ILocalizationService?)

    Sets the localization service to use for automatic font management in tooltips.

    Declaration
    public static void SetLocalizationService(ILocalizationService? service)
    Parameters
    Type Name Description
    ILocalizationService service

    The localization service to use

    | Edit this page View Source

    SetTooltipStyle(Color?, Color?, Color?, int?, Vector2?)

    Sets the tooltip styling properties

    Declaration
    public static void SetTooltipStyle(Color? backgroundColor = null, Color? borderColor = null, Color? textColor = null, int? fontSize = null, Vector2? padding = null)
    Parameters
    Type Name Description
    Color? backgroundColor

    Background color

    Color? borderColor

    Border color

    Color? textColor

    Text color

    int? fontSize

    Font size

    Vector2? padding

    Padding around text

    • Edit this page
    • View Source
    In this article
    Back to top © 2024 Popcorning Guinea Pig Game Engine. A custom C# game engine for indie developers.