You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

16 lines
408 B

  1. cc.WidgetFile.ClassName = "WidgetFile"
  2. function cc.WidgetFile:loadFromXmlNode(xmlNode)
  3. cc.Widget.loadFromXmlNode(self , xmlNode);
  4. self:setFilePath(xmlNode.FilePath);
  5. end
  6. cc.WidgetFile.createNode = cc.WidgetFile.create;
  7. -- 设置默认值
  8. function cc.WidgetFile:setDefaults()
  9. -- 默认需要响应touch事件
  10. self:setTouchEnabled(false)
  11. self:setAutoSize(false);
  12. self:setSize(cc.size(100,100));
  13. end