ID:263561
 
Code:
atom/proc/bigicon(icon/I,state)
var
obj/O = new()
list/L
maxx
if(isfile(I))
L = list(I)
else
L = I
src.overlays = null
src.pixel_x = 0
O.layer = MOB_LAYER+1000
for(var/X in L)
O.icon = X
for(var/i in icon_states(O.icon))
if(findtext(i,","))
O.icon_state = copytext(i,1,4)+((!L[X]) ? state : L[X])
O.pixel_x = 32*text2num(copytext(i,1,findtext(i,",")))
maxx = max(maxx,text2num(copytext(i,1,findtext(i,","))))
O.pixel_y = 32*text2num(copytext(i,findtext(i,",")+1))
src.overlays += O
src.pixel_x -= maxx*16
spawn del(O)


This is the proc from naruto that i was gonna use for multititled screen huds. But when i use it, only half the icons appear

mob
verb
TESTING()
switch(alert("Off","","Yes","No"))
if("Yes")
src.client.screen += new/obj/LOLZ
if("No")
for(var/obj/LOLZ/M in src.client.screen)
M.overlays = null
src.client.screen -= M


obj
LOLZ
screen_loc = "10,10"
New()
..()
src.bigicon(list(src.icon,'WINDOW ICON.dmi'))

//NOT WORKING???!?!?!?!??!?!?!?!?


only half the iconsstates appear, the rest are scattered through out the screen

How big is your icon? BYOND can only handle pixel_x and pixel_y values up to around 128. Higher than that, and you'll run into graphic issues. It looks like you're using bigicons for a hud, which isn't what it's made for. You're better off creating screen objects for each tile of your hud.