override public void OnGUI()
        {
            try
            {
                GUIStyle gsWin = new GUIStyle("box");
                gsWin.fontSize = Util.GetPix(12);
                gsWin.alignment = TextAnchor.UpperRight;

                float fWidth = gsWin.fontSize * (isGuiScroll ? 19 : 18);
                if (rectGui.width > fWidth)
                {
                    fWidth = rectGui.width;
                }

                if (rectGui.width < 1)
                {
                    rectGui.Set(Screen.width - fWidth - ControlBase.FixedMargin * 4, ControlBase.FixedMargin * 4, fWidth, guiHeight);
                }
                if (guiHeight != rectGui.height || fWidth != rectGui.width)
                {
                    rectGui.Set(rectGui.x, rectGui.y, fWidth, guiHeight);
                }

                if (screenSize != new Vector2(Screen.width, Screen.height))
                {
                    rectGui.Set(rectGui.x, rectGui.y, fWidth, guiHeight);
                    screenSize = new Vector2(Screen.width, Screen.height);
                }
                if (rectGui.x < 0 - rectGui.width * 0.9f)
                {
                    rectGui.x = 0;
                }
                else if (rectGui.x > screenSize.x - rectGui.width * 0.1f)
                {
                    rectGui.x = screenSize.x - rectGui.width;
                }
                else if (rectGui.y < 0 - rectGui.height * 0.9f)
                {
                    rectGui.y = 0;
                }
                else if (rectGui.y > screenSize.y - rectGui.height * 0.1f)
                {
                    rectGui.y = screenSize.y - rectGui.height;
                }

                rectGui = GUI.Window(252, rectGui, GuiFunc, "", gsWin);
                this.ScreenPos = new Rect(rectGui.x + guiScroll.x, rectGui.y - guiScroll.y, rectGui.width, rectGui.height);

                {
                    Vector2 mousePos = new Vector2(Input.mousePosition.x, Screen.height - Input.mousePosition.y);

                    bool enableGameGui = true;
                    bool m = Input.GetAxis("Mouse ScrollWheel") != 0;
                    for (int i = 0; i < 3; i++)
                    {
                        m |= Input.GetMouseButtonDown(i);
                    }
                    if (m)
                    {
                        enableGameGui = !rectGui.Contains(mousePos);
                    }
                    GameMain.Instance.MainCamera.SetControl(enableGameGui);
                    UICamera.InputEnable = enableGameGui;
                }
            }
            catch( Exception e )
            {
                Debug.LogError( e.ToString() );
            }
        }
 static SepiaDef() {
     if(sepiaEffect == null)
     {
         sepiaEffect = Util.GetComponentVar<SepiaToneEffect, SepiaToneEffect>(sepiaEffect);
     }
 }