./vdo_grid_button.lua

  1. function vdo_grid_button_init() 
  2. end 
  3.  
  4. function vdo_grid_button_cleanup() 
  5. end 
  6.  
  7. -- Inherited from Vdo_base_object 
  8. Vdo_grid_button = Vdo_base_object:new_base() 
  9.  
  10. -- Sets the check box 
  11. function Vdo_grid_button:set_check_box(is_checked,is_locked) 
  12. end 
  13.  
  14. --sets the lock icon for the grid button 
  15. function Vdo_grid_button:set_lock(is_locked) 
  16. end 
  17.  
  18. --sets the icon for the grid button 
  19. function Vdo_grid_button:set_icon(new_icon) 
  20. 	--debug_print("vint", "button: Icon is: " .. new_icon .. "\n") 
  21. 	local icon = Vdo_base_object:new("grid_icon", self.handle, self.doc_handle) 
  22. 	icon:set_property("image", new_icon) 
  23. end 
  24.  
  25. --sets the icon for the grid button using a crc of the image name 
  26. --Used by the mp badge selection screen 
  27. function Vdo_grid_button:set_icon_crc(new_icon_crc) 
  28. 	local icon = Vdo_base_object:new("grid_icon", self.handle, self.doc_handle) 
  29. 	icon:set_property("image_crc", new_icon_crc) 
  30. end 
  31.  
  32. -- Sets the width of the grid button 
  33. function Vdo_grid_button:set_size(width,height) 
  34. 	local icon = Vdo_base_object:new("grid_icon", self.handle, self.doc_handle) 
  35. 	icon:set_screen_size(width, height) 
  36. end 
  37.  
  38. -- Sets the highlighted state of the grid button to on or off 
  39. function Vdo_grid_button:set_highlight(is_highlighted) 
  40. 	local icon = Vdo_base_object:new("grid_icon", self.handle, self.doc_handle) 
  41. 	local main =  Vdo_base_object:new("safe_frame", self.handle, self.doc_handle) 
  42. 	if is_highlighted then 
  43. 		icon:set_alpha(1.0) 
  44. 		main:set_property("alpha",1.0) 
  45. 		--main:set_property("scale",1.1,1.1) 
  46. 		--main:set_property("anchor",-5,-5) 
  47. 	else 
  48. 		--icon:set_alpha(0.4) 
  49. 		--main:set_property("alpha",0.4) 
  50. 		--main:set_property("scale",1,1) 
  51. 		--main:set_property("anchor",0,0) 
  52. 	end 
  53. end 
  54.  
  55. function Vdo_grid_button:set_highlight_color() 
  56. end 
  57.