part 1
obj
HUD
X
InventoryStatScreen
name = "Close"
New(client/C,x,y)
..()
src.screen_loc = "[x],[y]"
C.screen+=src
MouseUp(loc,x,y)
src.icon_state = "out"
usr.canattack=0
usr.inventory_and_stat_screen=0
usr.lock = 0
usr.Move(locate(usr.last_x,usr.last_y,usr.last_z))
usr.client.screen = null
usr.client.screen+=new/obj/HUD/Attack_Off
usr.client.output=null
usr.client.view="16x16"
usr.client.eye = usr.client.mob
usr.client.show_verb_panel = 1
usr.starting = 0
return
part 2
if(usr.inventory_and_stat_screen==0)
src.client.show_verb_panel = 0
src.starting = 1
src.last_x = src.x
src.last_y = src.y
src.last_z = src.z
src.client.view = "15x13"
src.loc = locate(0,0,0)
src.canattack=0
for(var/obj/HUD/HUD in usr.client.screen)
del HUD
for(var/I in icon_states('Equip and Stat Screen v3.PNG'))
var/obj/S = new/obj/HUD/Equip_and_Stat_Screen
S.icon_state=I
S.screen_loc=I
S.name = "Inventory and Stat Screen"
S.name = I
usr.client.screen+=S
usr.inventory_and_stat_screen=1
usr.lock = 1
new/obj/HUD/X/InventoryStatScreen(usr.client,"13","15")
Find_Stats()
There is more to this code but it is too long and i know noone would want to read it...lol
Problem description:
When i click on the X, it closes the window....but the weird part is...when it closes, any mobs or objs in my view become invisible until i walk of the screen and come back...
[EDIT]I forgot, the code on the bottom adds a screen to the player's hud and the top code closes the screen.[/EDIT]
anyone know wat is wrong?