UI - General Functions

Functions you can use to make UI. These functions are usable outside of the phone and you don't need to use them to make UI.

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

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

Calling this function on every display is very expensive. You have to store it in a variable and use surface.DrawPoly

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

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

Calling this function on every display is very expensive. You have to store it in a variable and use surface.DrawPoly

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

Last updated