Skip to content

Commit

Permalink
- Made hide/show button mesh better
Browse files Browse the repository at this point in the history
  • Loading branch information
AnturK committed Apr 11, 2015
1 parent f0bc1cc commit 42699ad
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 1 deletion.
9 changes: 9 additions & 0 deletions code/_onclick/hud/action.dm
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,15 @@
UpdateIcon()
usr.update_action_buttons()


/obj/screen/movable/action_button/hide_toggle/proc/InitialiseIcon(var/mob/living/user)
if(isalien(user))
icon_state = "bg_alien"
else
icon_state = "bg_default"
UpdateIcon()
return

/obj/screen/movable/action_button/hide_toggle/UpdateIcon()
overlays.Cut()
var/image/img = image(icon,src,hidden?"show":"hide")
Expand Down
2 changes: 1 addition & 1 deletion code/modules/mob/living/life.dm
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@
if(button_number > 0)
if(!hud_used.hide_actions_toggle)
hud_used.hide_actions_toggle = new(hud_used)
hud_used.hide_actions_toggle.UpdateIcon()
hud_used.hide_actions_toggle.InitialiseIcon(src)
if(!hud_used.hide_actions_toggle.moved)
hud_used.hide_actions_toggle.screen_loc = hud_used.ButtonNumberToScreenCoords(button_number+1)
//hud_used.SetButtonCoords(hud_used.hide_actions_toggle,button_number+1)
Expand Down
Binary file modified icons/mob/actions.dmi
Binary file not shown.

0 comments on commit 42699ad

Please sign in to comment.