📱
APhone
  • What is APhone ?
  • Installation
    • Workshop
    • Configuration ( Lua part )
    • Configuration ( In-game )
  • How you make your own apps
    • Create your first app
    • App functions
    • App Metas
    • Tips you NEED to know
  • API ( Clientside )
    • Parameters ( Clientside )
    • UI - General Functions
    • UI - Required Functions
    • UI - Colors
    • UI - Fonts
    • UI - Web/Imgur Pictures
    • UI - Renderview
    • UI - Stencils
    • UI - Panels
    • Notifications
    • Rotate functions
  • API ( Shared )
    • Numbers
  • API - App Specific
    • Contacts ( Clientside )
    • Messages ( Clientside )
    • Bank ( Shared )
Powered by GitBook
On this page
  • How to make icons in the theme of APhone
  • Why doesn't my DScrollPanel work when my phone is horizontal?
  • How can I make roundedbox with every material?
  • I can't draw my material with your roundedbox function
  • What is the best way to make UI for apps?

Was this helpful?

  1. How you make your own apps

Tips you NEED to know

These tips will make you gain countless hours of debugging/making apps and UI

PreviousApp MetasNextParameters ( Clientside )

Last updated 4 years ago

Was this helpful?

How to make icons in the theme of APhone

You need to use a software supporting transparency on PNG ( So, not paint ).

After this, you need to create a image with transparent background, size 75,75.

Get a gradient you like ( I use and ) and put it on a rounded square with 16 for the value of rounded corners. ( For the size, it's 68, 68 centered ).

Now, take a svg icon you like ( I use ) and put it on the icon.

Now you got your icon :)

Why doesn't my DScrollPanel work when my phone is horizontal?

You need to use and not parenting directly

How can I make roundedbox with every material?

Check UI - General Functions

I can't draw my material with your roundedbox function

You need to use stencils function in UI - Stencils and draw a rectangle taking your whole panel

What is the best way to make UI for apps?

Use font functions that adapt the size of your font.

Also, I strongly recommend that you use as many as possible docks. Avoid using magic numbers.

Doing this make it easier to adapt your UI for horizontal display

I also recommend you use Open2D as a proxy function. Like this

local APP = {}
// Flags of your app

function APP:Open(main, main_x, main_y, screenmode)
    // Your UI
    
    Example of adapting docks for your thing :
    local pnl = vgui.Create("DLabel", main)
    
    // http://lua-users.org/wiki/TernaryOperator
    pnl:DockMargin(0, screenmode and main_x * 0.03 or main_y*0.05, 0, 0)
    
    // Bla bla
end

function APP:Open2D(main, main_x, main_y)
    self:Open(main, main_x, main_y, true)
end

The screen mode parameter is optional and never called in the addon, it's a parameter only you can set.

https://uigradients.com/
https://webgradients.com/
https://www.flaticon.com/
https://wiki.facepunch.com/gmod/Panel:Add