This will display a full-screen HUD. It works only with imported files (unless you set the icon states yourself... good luck). Make sure the imported file is the correct size in pixels to match your screen size.
Usage:
mob.CreateHUD('login.dmi',50) // 2 seconds
Proc:
mob
proc
CreateHUD(nicon, delay)
var/size = world.view * 2
size += 1 // size++ *shrug*
for(var/I=0,I<size,I++)
for(var/U=0,U<size,U++)
var/obj/screen/A = new /obj/screen/login(src.client)
A.screen_loc = "[I+1],[U+1]"
A.icon = nicon
A.icon_state = "[I],[U]"
src.client.screen += A
sleep(delay) // change to spawn(delay) and format tabs if you wish this proc to return immediately
for(var/obj/screen/login/A in src.client.screen)
del(A)
Not big enough to waste hub space on.
~Polatrite~
ID:153466
![]() Jan 12 2004, 8:08 pm
|
|
Volte wrote: (in a paraphrased way ;)
You suck. Polatrite wrote: var/size = client.view * 2 Yeah, you're right about that. I had originally put 20, and decided that was a bit short for a login screen, so I changed it. Guess I forgot the comment. Was doing it all quickly. Also, you should use client view instead, since world view isn't always the same. The proc doesn't work with "11x13" view sizes and the like, so you'd have to adjust that yourself. |
Hmmm, I was about to post something like, "It's not like the forum descriptions label one explicitly as being for code snippets...", but then I checked, and found out, hey it does. Thank goodness for fact-checking. Now no one will ever know I was in error! HAHAHAHAH.... er, oops.
|
Polatrite wrote:
Also, you should use client view instead, since world view isn't always the same. The proc doesn't work with "11x13" view sizes and the like, so you'd have to adjust that yourself. A couple of procs that might be of assistance: client/proc |
Heh, I was going to post something similar:
client Of course, yours looks nicer. ~X |
Actually, that'd be 5 seconds, because it measures in 1/10 of a second. :P
Anyway, the point of this post is to let you know this probably should have went in Creations.
~>Volte