FairyGUI.UIPanel.ApplyModifiedProperties C# (CSharp) Method

ApplyModifiedProperties() public method

public ApplyModifiedProperties ( bool sortingOrderChanged, bool fitScreenChanged ) : void
sortingOrderChanged bool
fitScreenChanged bool
return void
        public void ApplyModifiedProperties(bool sortingOrderChanged, bool fitScreenChanged)
        {
            if (container != null)
            {
                container.renderMode = renderMode;
                container.renderCamera = renderCamera;
                if (sortingOrderChanged)
                {
                    container._panelOrder = sortingOrder;
                    if (Application.isPlaying)
                        SetSortingOrder(sortingOrder, true);
                    else
                        EMRenderSupport.orderChanged = true;
                }
                container.fairyBatching = fairyBatching;
            }

            if (_ui != null)
            {
                if (fitScreen == FitScreen.None)
                    _ui.position = position;
                if (scale.x != 0 && scale.y != 0)
                    _ui.scale = scale;
                _ui.rotationX = rotation.x;
                _ui.rotationY = rotation.y;
                _ui.rotation = rotation.z;
            }
            if (fitScreen == FitScreen.None)
                uiBounds.position = position;
            screenSizeVer = 0;//force HandleScreenSizeChanged be called

            if (fitScreenChanged && this.fitScreen == FitScreen.None)
            {
                if (this._ui != null)
                    this._ui.SetSize(this._ui.sourceWidth, this._ui.sourceHeight);
                uiBounds.size = cachedUISize;
            }
        }

Usage Example

Example #1
0
 static public int ApplyModifiedProperties(IntPtr l)
 {
     try {
         FairyGUI.UIPanel self = (FairyGUI.UIPanel)checkSelf(l);
         System.Boolean   a1;
         checkType(l, 2, out a1);
         System.Boolean a2;
         checkType(l, 3, out a2);
         self.ApplyModifiedProperties(a1, a2);
         pushValue(l, true);
         return(1);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
All Usage Examples Of FairyGUI.UIPanel::ApplyModifiedProperties