ui_container
parent_type = /obj
screen_loc = "1,1"
client/var/tmp/ui_container/ui = new
mob/Login()
// Add /ui_container to the client's screen.
client.screen.Add(client.ui)
..()
client/proc/Add_UI_Element(object)
ui.vis_contents.Add(object)
client/proc/Remove_UI_Element(object)
ui.vis_contents.Remove(object)
client/proc/Move_UI_Element(object,new_x,new_y,time)
animate(object,pixel_x=new_x,pixel_y=new_y,time=time)
Example Usage
mob/verb/Demo()
var object = new/obj/circle
client.Add_UI_Element(object)
client.Move_UI_Element(object,new_x=64,new_y=96,time=10)
spawn(10)
animate(object,alpha=0,time=10)
spawn(20)
client.Remove_UI_Element(object)
obj/circle
icon = 'circle.dmi'
Summary
You attach a variable to client that points towards the UI object that's stored within the client's screen, from there you're able to add objects to the UI object's vis_contents allowing you to utilize pixel_x and pixel_y to place them on screen where needed.
You're also able to utilize animiate() which will allow you to smoothly move objects around the screen and much more.