在程序中通过 cc.ui.Setxx 方法(例如 setEnabled , setContentSize 等)更改的控件属性,如何写入文件永久生效,请问实现方法

比如我在程序中通过setContentSize()方法设置了窗口的位置,在当时是可以生效的,但是关了程序重新开,之前的设置就无效了。请问怎么破。
dir(ccui.buttton)的结果如下:
[‘SetClippingRectDirty’, ‘class’, ‘delattr’, ‘doc’, ‘format’, ‘getattribute’, ‘hash’, ‘init’, ‘new’, ‘reduce’, ‘reduce_ex’, ‘repr’,
setattr’, ‘sizeof’, ‘str’, ‘subclasshook’, ‘addCCSEventListener’, ‘addChild’, ‘addClickEventListener’, ‘addComponent’, ‘addProtectedChild’, ‘addTouchEventListener’,
‘associateWithEvent’, ‘autorelease’, ‘cancelInputStatus’, ‘cleanup’, ‘clone’, ‘convertToNodeSpace’, ‘convertToNodeSpaceAR’, ‘convertToParentSpace’, ‘convertToWorldSpace’, ‘convertToWorldSpaceAR’,
‘convertTouchToNodeSpace’, ‘convertTouchToNodeSpaceAR’, ‘copyClonedWidgetChildren’, ‘copyNodeClonedChildren’, ‘copyNodeProperties’, ‘copyProperties’, ‘create’, ‘createCloneInstance’,
‘createInstance’, ‘disableCascadeColor’, ‘disableCascadeOpacity’, ‘disableHighlighted’, ‘enableDpadNavigation’, ‘enableRightClick’, ‘findNextFocusedWidget’, ‘forceDoLayout’, ‘getActionByTag’,
‘getActionManager’, ‘getActionTag’, ‘getAnchorPoint’, ‘getAnchorPointInPoints’, ‘getAttachedActionObject’, ‘getBackGroundColor’, ‘getBackGroundColorOpacity’, ‘getBackGroundColorType’,
‘getBackGroundColorVector’, ‘getBackGroundEndColor’, ‘getBackGroundImageCapInsets’, ‘getBackGroundImageColor’, ‘getBackGroundImageOpacity’, ‘getBackGroundImageTextureSize’, ‘getBackGroundStartColor’,
‘getBottomBoundary’, ‘getBoundingBox’, ‘getCallbackName’, ‘getCallbackType’, ‘getChildByName’, ‘getChildByTag’, ‘getChildren’, ‘getChildrenCount’, ‘getClippingType’, ‘getColor’, ‘getComponent’,
‘getContentSize’, ‘getCurrentFocusedWidget’, ‘getCustomSize’, ‘getDescription’, ‘getDisplayedColor’, ‘getDisplayedOpacity’, ‘getEventDispatcher’, ‘getLayoutParameter’, ‘getLayoutSize’, ‘getLayoutType’,
‘getLeftBoundary’, ‘getLocalZOrder’, ‘getName’, ‘getNodeSpaceTouchBeganPosition’, ‘getNodeSpaceTouchEndPosition’, ‘getNodeSpaceTouchMovePosition’, ‘getNodeToParentAffineTransform’, ‘getNodeToParentTransform’,
‘getNodeToWorldAffineTransform’, ‘getNodeToWorldTransform’, ‘getNormalizedPosition’, ‘getNumberOfRunningActions’, ‘getOpacity’, ‘getOrderOfArrival’, ‘getParent’, ‘getParentToNodeAffineTransform’,
‘getParentToNodeTransform’, ‘getPosition’, ‘getPosition3D’, ‘getPositionPercent’, ‘getPositionType’, ‘getPositionX’, ‘getPositionY’, ‘getPositionZ’, ‘getProtectedChildByTag’, ‘getReferenceCount’,
‘getRightBoundary’, ‘getRotation’, ‘getRotation3D’, ‘getRotationSkewX’, ‘getRotationSkewY’, ‘getScale’, ‘getScaleX’, ‘getScaleY’, ‘getScaleZ’, ‘getScene’, ‘getScheduler’, ‘getSizePercent’,
‘getSizeType’, ‘getSkewX’, ‘getSkewY’, ‘getTag’, ‘getTexture’, ‘getTopBoundary’, ‘getTouchBeganPosition’, ‘getTouchEndPosition’, ‘getTouchMovePosition’, ‘getUserData’, ‘getVirtualRenderer’,
‘getVirtualRendererSize’, ‘getWorldPosition’, ‘getWorldToNodeAffineTransform’, ‘getWorldToNodeTransform’, ‘hitTest’, ‘ignoreAnchorPointForPosition’, ‘ignoreContentAdaptWithSize’, ‘isBackGroundImageScale9Enabled’,
‘isBright’, ‘isCascadeColorEnabled’, ‘isCascadeOpacityEnabled’, ‘isClippingEnabled’, ‘isClippingParentContainsPoint’, ‘isEnabled’, ‘isFlippedX’, ‘isFlippedY’, ‘isFocusEnabled’, ‘isFocused’, ‘isHighlighted’,
‘isHighlightedEnable’, ‘isIgnoreAnchorPointForPosition’, ‘isIgnoreContentAdaptWithSize’, ‘isLayoutComponentEnabled’, ‘isLoopFocus’, ‘isNodeToWorldTransformDirty’, ‘isOpacityModifyRGB’, ‘isPassFocusToChild’,
‘isPropagateTouchEvents’, ‘isRightClicked’, ‘isRunning’, ‘isScheduled’, ‘isSwallowTouches’, ‘isSwallowTouches2’, ‘isTextField’, ‘isTouchEnabled’, ‘isUnifySizeEnabled’, ‘isVisible’, ‘isvalid’, ‘pause’, ‘release’,
‘removeAllChildren’, ‘removeAllComponents’, ‘removeAllProtectedChildren’, ‘removeAllProtectedChildrenWithCleanup’, ‘removeBackGroundImage’, ‘removeChild’, ‘removeChildByName’, ‘removeChildByTag’, ‘removeComponent’,
‘removeFromParent’, ‘removeProtectedChild’, ‘removeProtectedChildByTag’, ‘reorderChild’, ‘reorderProtectedChild’, ‘requestDoLayout’, ‘requestFocus’, ‘resume’, ‘retain’, ‘runAction’, ‘schedule’, ‘scheduleOnce’,
‘scheduleUpdate’, ‘scheduleUpdateWithPriority’, ‘seek’, ‘setActionManager’, ‘setActionTag’, ‘setAnchorPoint’, ‘setAssociateWithEvent’, ‘setAttachedActionObject’, ‘setBackGroundColor’, ‘setBackGroundColorOpacity’,
‘setBackGroundColorType’, ‘setBackGroundColorVector’, ‘setBackGroundImage’, ‘setBackGroundImageCapInsets’, ‘setBackGroundImageColor’, ‘setBackGroundImageOpacity’, ‘setBackGroundImageScale9Enabled’,
‘setBackGroundTextureRect’, ‘setBright’, ‘setBrightStyle’, ‘setCallbackName’, ‘setCallbackType’, ‘setCascadeColorEnabled’, ‘setCascadeOpacityEnabled’, ‘setCircularCover’, ‘setCircularOrigin’,
‘setCircularStart’, ‘setClippingEnabled’, ‘setClippingType’, ‘setColor’, ‘setColorRecursively’, ‘setContentSize’, ‘setEnabled’, ‘setEventDispatcher’, ‘setFlippedX’, ‘setFlippedY’, ‘setFocusEnabled’,
‘setFocused’, ‘setHighlighted’, ‘setHighlightedEnable’, ‘setIsHitted’, ‘setLayoutComponentEnabled’, ‘setLayoutParameter’, ‘setLayoutType’, ‘setLocalZOrder’, ‘setLoopFocus’, ‘setMaskPath’, ‘setName’,
‘setNodeToParentTransform’, ‘setNormalizedPosition’, ‘setOnEnterCallback’, ‘setOnExitCallback’, ‘setOpacity’, ‘setOpacityModifyRGB’, ‘setOpacityRecursively’, ‘setOrderOfArrival’, ‘setParent’,
‘setPassFocusToChild’, ‘setPosition’, ‘setPosition3D’, ‘setPositionPercent’, ‘setPositionType’, ‘setPositionX’, ‘setPositionY’, ‘setPositionZ’, ‘setPropagateTouchEvents’, ‘setRotation’, ‘setRotation3D’,
‘setRotationSkewX’, ‘setRotationSkewY’, ‘setScale’, ‘setScaleX’, ‘setScaleY’, ‘setScaleZ’, ‘setScheduler’, ‘setSizePercent’, ‘setSizeType’, ‘setSkewX’, ‘setSkewY’, ‘setSwallowTouches’, ‘setTag’,
‘setTouchEnabled’, ‘setUnifySizeEnabled’, ‘setUserData’, ‘setUserObject’, ‘setVisible’, ‘setonEnterTransitionDidFinishCallback’, ‘setonExitTransitionDidStartCallback’, ‘sortAllChildren’, ‘stopAction’,
‘stopActionByTag’, ‘stopAllActions’, ‘stopAllActionsByTag’, ‘unschedule’, ‘unscheduleAllCallbacks’, ‘unscheduleUpdate’, ‘update’, ‘updateDisplayedColor’, ‘updateDisplayedOpacity’, ‘updateSizeAndPosition’, ‘updateTransform’]

好像没有合适的接口可以用