IWithCursorType

interface

Namespace: Vuplex.WebView

Implemented by: ?

An interface implemented by a webview if it supports indicating when the mouse cursor icon should change.

Summary

Public events

CursorTypeChanged

EventHandler<EventArgs<string>> CursorTypeChanged

Indicates that the mouse cursor icon should change. The EventArgs.Value is a string indicating the CSS cursor type value (e.g. "default", "pointer", "wait", etc.).

Example

await webViewPrefab.WaitUntilInitialized();
var webViewWithCursorType = webViewPrefab.WebView as IWithCursorType;
webViewWithCursorType.CursorTypeChanged += (sender, eventArgs) => {
    // Note: Here's where the application could use Unity's Cursor.SetCursor() API to set
    //       a custom cursor icon depending on the cursor type indicated by eventArgs.Value.
    Debug.Log("Cursor type changed: " + eventArgs.Value);
};