./vdo_grid_button_canceled.lua

  1. function vdo_grid_button_canceled() 
  2. end 
  3.  
  4. -- Inherited from Vdo_base_object 
  5. Vdo_grid_button_canceled = Vdo_base_object:new_base() 
  6.  
  7. function Vdo_grid_button_canceled:init() 
  8. 	self.cancel_status = false 
  9. end 
  10.  
  11. --gets the cancel icon status for the grid button 
  12. function Vdo_grid_button_canceled:get_cancel_status() 
  13. 	return self.cancel_status 
  14. end 
  15.  
  16.  
  17. --sets the cancel icon status for the grid button 
  18. function Vdo_grid_button_canceled:set_cancel(new_status) 
  19. 	local cancel_icon = Vdo_base_object:new("cancel_icon", self.handle, self.doc_handle) 
  20. 	self.cancel_status = new_status 
  21. 	cancel_icon:set_property("visible", self.cancel_status) 
  22. end 
  23.  
  24. --toggles the cancel icon for the grid button 
  25. function Vdo_grid_button_canceled:toggle_cancel() 
  26. 	self:set_cancel(not self.cancel_status) 
  27. end 
  28.  
  29. --sets the icon for the grid button 
  30. function Vdo_grid_button_canceled:set_icon(new_icon) 
  31. 	local icon = Vdo_base_object:new("grid_icon", self.handle, self.doc_handle) 
  32. 	icon:set_property("image", new_icon) 
  33. end 
  34.  
  35. --sets the icon for the grid button using a crc of the image name 
  36. --Used by the mp badge selection screen 
  37. function Vdo_grid_button_canceled:set_icon_crc(new_icon_crc) 
  38. 	local icon = Vdo_base_object:new("grid_icon", self.handle, self.doc_handle) 
  39. 	icon:set_property("image_crc", new_icon_crc) 
  40. end 
  41.  
  42. -- Sets the width of the grid button 
  43. function Vdo_grid_button_canceled:set_size(width,height) 
  44. 	--local lock = Vdo_base_object:new("grid_lock", self.handle, self.doc_handle) 
  45. 	local icon = Vdo_base_object:new("grid_icon", self.handle, self.doc_handle) 
  46. end 
  47.  
  48. -- Sets the highlighted state of the grid button to on or off 
  49. function Vdo_grid_button_canceled:set_highlight(is_highlighted) 
  50. 	local icon = Vdo_base_object:new("grid_icon", self.handle, self.doc_handle) 
  51. 	local main =  Vdo_base_object:new("safe_frame", self.handle, self.doc_handle) 
  52. 	if is_highlighted then 
  53. 		icon:set_alpha(1.0) 
  54. 		main:set_property("alpha",1.0) 
  55. 		main:set_property("scale",1.1,1.1) 
  56. 	else 
  57. 		main:set_property("scale",1,1) 
  58. 	end 
  59. end 
  60.  
  61. function Vdo_grid_button_canceled:set_highlight_color() 
  62. end 
  63.