An open API service indexing awesome lists of open source software.

https://github.com/candycoded/alertconfirmdialog

⚠️ Display simple alert and confirm dialogs on both iOS and Android.
https://github.com/candycoded/alertconfirmdialog

Last synced: about 1 year ago
JSON representation

⚠️ Display simple alert and confirm dialogs on both iOS and Android.

Awesome Lists containing this project

README

          

# AlertConfirmDialog

> ⚠️ Display simple alert and confirm dialogs on both iOS and Android.

[![npm](https://img.shields.io/npm/v/xyz.candycoded.alertconfirmdialog)](https://www.npmjs.com/package/xyz.candycoded.alertconfirmdialog)

## Installation

### Unity Package Manager

#### Git

```json
{
"dependencies": {
"xyz.candycoded.alertconfirmdialog": "https://github.com/CandyCoded/alertconfirmdialog.git#v1.0.1",
...
}
}
```

#### Scoped UPM Registry

```json
{
"dependencies": {
"xyz.candycoded.alertconfirmdialog": "1.0.1",
...
},
"scopedRegistries": [
{
"name": "candycoded",
"url": "https://registry.npmjs.com",
"scopes": ["xyz.candycoded"]
}
]
}
```

# Usage

First include the package.

```csharp
using CandyCoded.AlertConfirmDialog;
```

### Alert

```csharp
AlertConfirmDialog.Alert("Title", "Message");
```

```csharp
AlertConfirmDialog.Alert("Title", "Message", () =>
{

Debug.Log("Ok");

});
```

### Confirm

```csharp
AlertConfirmDialog.Confirm("Title", "Message");
```

```csharp
AlertConfirmDialog.Confirm("Title", "Message", () =>
{

Debug.Log("Ok");

});
```

```csharp
AlertConfirmDialog.Confirm("Title", "Message", () =>
{

Debug.Log("Ok");

}, () =>
{

Debug.Log("Cancel");

});
```