# UI - Required Functions

## PANEL:aphone\_RemoveCursor()

On multiple dermas create, you must use this function on the parent of all dermas to remove the cursor. You only need to call this function once

{% hint style="warning" %}
If you don't use this function, you will see the mouse cursor at the left of your screen on 3D mode
{% endhint %}

## aphone.GUI.ScaledSize(...)

This function will return scaled values depending on screen size and phone mode. You need to use this on "magic numbers" if you don't scale your UI with the parameters mainx and mainy provided by app:Open()

```
print(aphone.ScaledSize(5, 10, 15, 20))
```

> 3D Mode : 5, 10, 15, 20
>
> 2D Mode : 3.25 6.5 9.75 13

## PANEL:Phone\_AskTextEntry( string text, int max\_char, panel panel\_resize, int panel\_wide, bool resize\_onlytargetpnl)

{% hint style="info" %}
You need to call this on a panel with SetText. A good panel for this would be DLabel
{% endhint %}

| Parameters               | Purpose                                                                              |
| ------------------------ | ------------------------------------------------------------------------------------ |
| Text                     | Text that will be set on the DTextEntry at init                                      |
| Max Char                 | Maximum characters                                                                   |
| Panel\_Resize            | Panel to resize if the text is too long                                              |
| Panel Wide               | Wide of the panel, if not specified, will take the panel\_resize wide                |
| Resize Only Target Panel | <p>False : Resize PANEL AND panel\_resize</p><p>True : Resize only panel\_resize</p> |
