# Sendengine and Database

## Sendengine

<pre class="language-javascript" data-full-width="true"><code class="lang-javascript">sendengine({
  fullscreen:true,//goes to full screen
  center:true,//puts the application in the center of the screen
  exit:true,//exit to game
  appresize: {//changing the resolution
    x:1900,
    y:1000
  },
  changestatusbar:"#onlyhexcode",//changes the color of the top of the application
  sendalertbox:"hello world",//warns at the bottom
  changescreenstatus:1,//change the direction of the phone [1,2,3]
  sendvibrate:1000,//You send a vibration to the phone. Enter time in milliseconds
  startpath:"/"//which html file to open index.html example
<strong>})
</strong></code></pre>

| changescreenstatus: 1                                                                                                             | changescreenstatus: 2                        | changescreenstatus: 3                        |
| --------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------- | -------------------------------------------- |
| **Automatic** settings. If the phone is standing sideways, it becomes horizontal, if it is standing upright, it becomes vertical. | Forces the phone to stand in an **Portrait** | Forces the phone to stand in a **Landscape** |

<figure><img src="https://644134079-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FAoN3PvLitJVdWdsmwATH%2Fuploads%2Fy0mee1vmNNfeqSKk3y62%2Ftoast.png?alt=media&#x26;token=6afa79b1-e294-4cff-836b-084d4e6ba3de" alt="" width="375"><figcaption><p>sendalertbox example</p></figcaption></figure>

<figure><img src="https://644134079-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FAoN3PvLitJVdWdsmwATH%2Fuploads%2FXMntsyTrWU7SgIFvzWpH%2Fchangestatus.png?alt=media&#x26;token=048683eb-1057-4c23-b58c-099ac6470f3d" alt=""><figcaption><p>changestatusbar: changes the color of the selected part</p></figcaption></figure>

{% hint style="warning" %}
Don't forget to center the app after changing the resolution
{% endhint %}

## Database

{% code overflow="wrap" %}

```javascript
console.log(Database("get","test"))
Database("set","test","true")
Database("add","asdas",1)
Database("push","sxcac","hi")
Database("del","asdas",1)//delete remove
Database("del","sxcac")//delete remove
Database("reset")//deleteall
```

{% endcode %}

| Alternative 1 | Alternative 2 | Alternative 3 |
| ------------- | ------------- | ------------- |
| del           | delete        | remove        |
| reset         | deleteall     |               |

{% code overflow="wrap" %}

```javascript
async function run(){
    var connect = await WaitDatabase();//auto try
    //For example, for 20 seconds: WaitDatabase(20)
    if(connect) console.log("Database connected")
    else console.log("WHERE IS THE DATABASE BRO ????")
}
//OR
console.log(Engine_database.Engine_connected)//true or false
```

{% endcode %}
