function vdo_cell_title_init()
end
function vdo_cell_title_cleanup()
end
Vdo_cell_title = Vdo_base_object:new_base()
function Vdo_cell_title:init()
self.text_h = vint_object_find("text", self.handle, self.doc_handle)
self.icon_h = vint_object_find("icon", self.handle, self.doc_handle)
end
function Vdo_cell_title:set_text(text, width)
vint_set_property(self.text_h, "text_tag", text)
if width ~= nil then
-- Force a width if we need text to fit in a defined space
resize_text_element(self.text_h, width)
else
-- Reset scale back to original
vint_set_property(self.text_h, "scale", 1, 1)
end
end
function Vdo_cell_title:set_icon(icon)
vint_set_property(self.icon_h, "image", icon)
end
function Vdo_cell_title:play_dots_anim()
self.dots_grp_h = vint_object_find("dots_grp", self.handle, self.doc_handle)
self.dots_h = vint_object_find("dots", self.handle, self.doc_handle)
self.glow_h = vint_object_find("glow", self.handle, self.doc_handle)
self.dots_anim_h = vint_object_find("dots_anim", self.handle, self.doc_handle)
self.dots_twn_1_h = vint_object_find("dots_twn_1", self.dots_anim_h)
self.dots_twn_2_h = vint_object_find("dots_twn_2", self.dots_anim_h)
self.glow_twn_h = vint_object_find("glow_twn", self.dots_anim_h)
--Retarget twn to make sure we find the right instance
vint_set_property(self.dots_twn_1_h, "target_handle", self.dots_grp_h)
vint_set_property(self.dots_twn_2_h, "target_handle", self.dots_h)
vint_set_property(self.glow_twn_h, "target_handle", self.glow_h)
lua_play_anim(self.dots_anim_h)
end