./hud_voice_chat.lua

  1. function hud_voice_chat_init()	 
  2. end 
  3.  
  4. function hud_voice_chat_cleanup() 
  5. end 
  6.  
  7. function hud_voice_chat_process() 
  8. end 
  9.  
  10. function hud_voice_chat_update_voice_msg(b_visible, b_active, s_name) 
  11. 	--Update voice chat message 
  12. 	local chat_msg_h =            vint_object_find("coop_voice_msg") 
  13. 	local bg =                    vint_object_find("bg", chat_msg_h) 
  14. 	local bg_body =               vint_object_find("bg_body", chat_msg_h) 
  15. 	local bg_top =                vint_object_find("bg_top", chat_msg_h) 
  16. 	local bg_top_small =          vint_object_find("bg_top_small", chat_msg_h) 
  17. 	local bg_top_small_trim =     vint_object_find("bg_top_small", chat_msg_h) 
  18. 	local party_msg =             vint_object_find("party_msg", chat_msg_h) 
  19. 	local voice_msg =             vint_object_find("voice_msg", chat_msg_h) 
  20.  
  21. 	-- Set visibility for overall voice chat window. 
  22. 	vint_set_property(bg, "visible", b_visible) 
  23.  
  24. 	-- Set visibility and color for User Name 
  25. 	vint_set_property(voice_msg, "text_tag", s_name) 
  26. 	vint_set_property(voice_msg, "visible", b_visible) 
  27. 	if b_active == true then 
  28. 		vint_set_property(voice_msg, "tint", 255/255, 147/255, 42/255) 
  29. 	else 
  30. 		vint_set_property(voice_msg, "tint", 1, 1, 1) 
  31. 	end 
  32.  
  33. 	-- Set text for Voice Chat title 
  34. 	vint_set_property(party_msg, "text_tag", "VOICE_CHAT") 
  35. 	vint_set_property(party_msg, "visible", b_visible) 
  36.  
  37. 	-- Disable elements we don't want to show... 
  38. 	vint_set_property(bg_top, "visible", false) 
  39. 	vint_set_property(bg_top_small, "visible", false) 
  40. 	vint_set_property(bg_top_small_trim, "visible", false) 
  41. 	vint_set_property(party_msg, "visible", false) 
  42. end 
  43.