Struct ManipulatorActivationFilter
Used by manipulators to match events against their requirements.
Syntax
public struct ManipulatorActivationFilter : IEquatable<ManipulatorActivationFilter>
Examples
public class ClickableTest
{
public void CreateClickable()
{
var clickable = new Clickable(() => { Debug.Log("Clicked!"); });
clickable.activators.Add(new ManipulatorActivationFilter { button = MouseButton.LeftMouse });
clickable.activators.Add(new ManipulatorActivationFilter { button = MouseButton.RightMouse, clickCount = 2, modifiers = EventModifiers.Control });
}
}
Properties
The button that activates the manipulation.
Declaration
public MouseButton button { get; set; }
Property Value
clickCount
Number of mouse clicks required to activate the manipulator.
Declaration
public int clickCount { get; set; }
Property Value
modifiers
Any modifier keys (ie. ctrl, alt, ...) that are needed to activate the manipulation.
Declaration
public EventModifiers modifiers { get; set; }
Property Value
Type |
Description |
EventModifiers |
|
Methods
Equals(Object)
Declaration
public override bool Equals(object obj)
Parameters
Type |
Name |
Description |
Object |
obj |
|
Returns
Equals(ManipulatorActivationFilter)
Declaration
public bool Equals(ManipulatorActivationFilter other)
Parameters
Returns
GetHashCode()
Declaration
public override int GetHashCode()
Returns
Matches(IMouseEvent)
Checks whether the current mouse event satisfies the activation requirements.
Declaration
public bool Matches(IMouseEvent e)
Parameters
Returns
Type |
Description |
Boolean |
True if the event matches the requirements. False otherwise.
|
Matches(IPointerEvent)
Checks whether the current mouse event satisfies the activation requirements.
Declaration
public bool Matches(IPointerEvent e)
Parameters
Returns
Type |
Description |
Boolean |
True if the event matches the requirements. False otherwise.
|
Operators
Equality(ManipulatorActivationFilter, ManipulatorActivationFilter)
Declaration
public static bool operator ==(ManipulatorActivationFilter filter1, ManipulatorActivationFilter filter2)
Parameters
Returns
Inequality(ManipulatorActivationFilter, ManipulatorActivationFilter)
Declaration
public static bool operator !=(ManipulatorActivationFilter filter1, ManipulatorActivationFilter filter2)
Parameters
Returns