docs.unity.cn
    Show / Hide Table of Contents

    Class ClickAction

    Represents an Action to process when the user clicks a particular mouse button a certain number of times.

    Inheritance
    Object
    GUIAction
    HoveredControlAction
    ClickAction
    CreatePointAction
    SliderAction
    Inherited Members
    HoveredControlAction.hoveredControl
    HoveredControlAction.CanTrigger(IGUIState)
    GUIAction.enable
    GUIAction.enableRepaint
    GUIAction.repaintOnMouseMove
    GUIAction.onPreRepaint
    GUIAction.onRepaint
    GUIAction.ID
    GUIAction.OnGUI(IGUIState)
    GUIAction.IsEnabled(IGUIState)
    GUIAction.IsRepaintEnabled(IGUIState)
    GUIAction.PreRepaint(IGUIState)
    GUIAction.OnPerform(IGUIState)
    GUIAction.OnFinish(IGUIState)
    Namespace: UnityEditor.U2D.Path.GUIFramework
    Syntax
    public class ClickAction : HoveredControlAction

    Constructors

    ClickAction(Control, Int32, Boolean)

    Initializes and returns an instance of ClickAction

    Declaration
    public ClickAction(Control control, int button, bool useEvent = true)
    Parameters
    Type Name Description
    Control control

    Current control

    Int32 button

    The mouse button to check for.

    Boolean useEvent

    Whether to Use the current event after the trigger condition has been met.

    Fields

    clickCount

    The number of button clicks required to satisfy the trigger condition

    Declaration
    public int clickCount
    Field Value
    Type Description
    Int32

    onClick

    The Action to execute when the user satisfies the trigger condition.

    Declaration
    public Action<IGUIState, Control> onClick
    Field Value
    Type Description
    Action<IGUIState, Control>

    Methods

    GetFinishContidtion(IGUIState)

    Checks to see if the finish condition has been met or not. For a ClickAction, this is always true.

    Declaration
    protected override bool GetFinishContidtion(IGUIState guiState)
    Parameters
    Type Name Description
    IGUIState guiState

    The current state of the custom editor.

    Returns
    Type Description
    Boolean

    Returns true.

    Overrides
    GUIAction.GetFinishContidtion(IGUIState)

    GetTriggerContidtion(IGUIState)

    Checks to see if the trigger condition has been met or not.

    Declaration
    protected override bool GetTriggerContidtion(IGUIState guiState)
    Parameters
    Type Name Description
    IGUIState guiState

    The current state of the custom editor.

    Returns
    Type Description
    Boolean

    Returns true if the trigger condition has been met. Otherwise, returns false.

    Overrides
    GUIAction.GetTriggerContidtion(IGUIState)

    OnTrigger(IGUIState)

    Calls the methods in its invocation list when the trigger conditions are met.

    Declaration
    protected override void OnTrigger(IGUIState guiState)
    Parameters
    Type Name Description
    IGUIState guiState

    The current state of the custom editor.

    Overrides
    HoveredControlAction.OnTrigger(IGUIState)
    Back to top Copyright © 2022 Unity Technologies
    Generated by DocFX
    on Tuesday, March 1, 2022
    Terms of use