# UI - General Functions

## Wrap a text - aphone.GUI.WrapText(string text, string font, number maxWidth)

{% hint style="success" %}
CREDITS - This function come from : <https://github.com/FPtje/DarkRP/blob/master/gamemode/modules/base/cl_util.lua>
{% endhint %}

## aphone.GUI.GetBackground()

Return the material of the background

## aphone.GUI.RoundedBox(int x, int y, int w, int h, int round\_value)

Return a poly with the rounded box inside. You need to draw it with surface.DrawPoly

{% hint style="danger" %}
Calling this function on every display is very expensive. You have to store it in a variable and use surface.DrawPoly
{% endhint %}

## aphone.GUI.GenerateCircle(int x, int y, int r)

Return a poly. You need to draw it with surface.DrawPoly

{% hint style="danger" %}
Calling this function on every display is very expensive. You have to store it in a variable and use surface.DrawPoly
{% endhint %}

## PANEL:Phone\_AlphaHover()

Will set the text color to aphone:Color("Text\_White") on hovered. If not, will set it to aphone:Color("Text\_White120")

## PANEL:Phone\_DrawTop(int panel\_w, int panel\_h, bool darktheme)

Draw top bar with time, wifi picture

## DScrollPanel:aphone\_PaintScroll()

Will paint the VBar ( Right Bar ) and fade it when it's not used for 0.5 sec


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://akulla-pro.gitbook.io/aphone/api/ui-general-functions.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
