./watermark.lua

  1. function watermark_init() 
  2. 	local text_h = vint_object_find("timestamp_txt") 
  3. 	vint_set_property(text_h, "visible", false) 
  4. 	vint_dataresponder_request("build_date_dr", "watermark_set_timestamp", 0) 
  5. end 
  6.  
  7. function watermark_set_timestamp(build_name, should_scale) 
  8. 	local scale = 1 
  9. 	local alpha = .7 
  10. 	if should_scale == true then 
  11. 		scale = .75 
  12. 		alpha = .4 
  13. 	end 
  14.  
  15. 	local timestamp_txt_h = vint_object_find("timestamp_txt") 
  16. 	local values = { 
  17. 	 [0] = build_name,  
  18. 	} 
  19. 	local str = vint_insert_values_in_string("PROPERTY OF DEEP SILVER VOLITION\nFOR INTERNAL USE ONLY\n{0}", values) 
  20. 	vint_set_property(timestamp_txt_h , "text_tag", str) 
  21. 	vint_set_property(timestamp_txt_h , "text_scale", scale, scale) 
  22. 	vint_set_property(timestamp_txt_h , "alpha", alpha) 
  23. 	vint_set_property(timestamp_txt_h , "visible", true)	 
  24. end 
  25.  
  26. function watermark_cleanup() 
  27. end