构造函数

访问器

  • get hasAnyPopup(): boolean
  • 返回 boolean

    Indicates whether there are any popups currently displayed.

    指示当前是否有任何弹出组件被显示。

方法

  • 参数

    • 可选popup: GWidget

      The popup widget to be hidden. If not provided, all popups will be hidden.

    返回 void

    Hides a specific popup widget or all popups if no widget is specified.

    隐藏特定的弹出组件,或者如果未指定组件则隐藏所有弹出组件。

  • 参数

    • popup: GWidget

      The popup widget to check.

    返回 boolean

    Returns true if the popup was just closed, false otherwise.

    Checks if a specific popup widget was just closed.

    检查特定的弹出组件是否刚刚被关闭。

  • 参数

    • popup: GWidget

      The widget to be displayed as a popup.

    • 可选target: GWidget

      The target widget relative to which the popup will be positioned.

    • 可选dir: PopupDirection

      The direction in which the popup should appear relative to the target.

    返回 void

    Shows a widget that automatically hides when clicking outside the widget on the stage.

    显示一个界面,并且点击舞台其他区域时自动隐藏该组件。

  • 参数

    • msg: string

      The message to be displayed in the tooltip.

    • 可选delay: number

      The delay in milliseconds before showing the tooltip.

    返回 void

    Returns the default tooltip widget used for displaying the message.

    Shows a tooltip with the specified message after an optional delay.

    显示一个工具提示,显示指定的消息,并可选择延迟显示。

  • 参数

    • tooltipWin: GWidget

      The tooltip widget to be displayed.

    • 可选delay: number

      The delay in milliseconds before showing the tooltip.

    返回 void

    Shows a specified tooltip widget after an optional delay.

    显示一个指定的工具提示组件,并可选择延迟显示。

  • 参数

    • popup: GWidget

      The popup widget to be toggled.

    • 可选target: GWidget

      The target widget relative to which the popup will be positioned.

    • 可选dir: PopupDirection

      The direction in which the popup should appear relative to the target.

    返回 boolean

    Returns true if the popup was shown, false if it was closed.

    Toggles the visibility of a popup widget. If the popup is already open, it will be closed. If it is closed, it will be shown.

    切换弹出组件的可见性。 如果弹出组件已经打开,则将其关闭;如果它是关闭的,则将其显示。

  • 参数

    • popup: GWidget

      The popup widget to be positioned.

    • target: GWidget

      The target widget relative to which the popup will be positioned.

    • dir: PopupDirection

      The direction in which the popup should appear relative to the target.

    • 可选offsetX: number

      Additional horizontal offset for the popup position.

    • 可选offsetY: number

      Additional vertical offset for the popup position.

    返回 void

    Validates and adjusts the position of the popup widget. The popup will be positioned relative to the target widget, considering the specified direction and offsets. The popup won’t overflow the stage boundaries.

    验证并调整弹出组件的位置。 弹出组件将相对于目标组件定位,考虑指定的方向和偏移量。弹出组件不会超出舞台边界。