Example #1
0
    /// <summary>
    /// Draw the input information (bottom right)
    /// </summary>
    public void DrawInput()
    {
        GUILayout.BeginArea(new Rect(0, 0, Screen.width, Screen.height));
        {
            KGFGUIUtility.BeginVerticalBox(KGFGUIUtility.eStyleBox.eBoxInvisible);
            {
                GUILayout.FlexibleSpace();

                GUILayout.BeginHorizontal();
                {
                    GUILayout.FlexibleSpace();

                    if (itsOrbiter.itsRoot.itsRoot == itsCharacter)
                    {
                        KGFGUIUtility.Box(itsKeys, KGFGUIUtility.eStyleBox.eBoxInvisible, GUILayout.Height(Screen.height / 10f), GUILayout.Width(Screen.width / 10f));
                        KGFGUIUtility.Box(itsMouseRotate, KGFGUIUtility.eStyleBox.eBoxInvisible, GUILayout.Height(Screen.height / 10f), GUILayout.Width(Screen.width / 10f));
                        KGFGUIUtility.Box(itsMouseZoom, KGFGUIUtility.eStyleBox.eBoxInvisible, GUILayout.Height(Screen.height / 10f), GUILayout.Width(Screen.width / 10f));
                    }
                    else
                    {
                        KGFGUIUtility.Box(itsMouseRotate, KGFGUIUtility.eStyleBox.eBoxInvisible, GUILayout.Height(Screen.height / 10f), GUILayout.Width(Screen.width / 10f));
                        KGFGUIUtility.Box(itsMouseZoom, KGFGUIUtility.eStyleBox.eBoxInvisible, GUILayout.Height(Screen.height / 10f), GUILayout.Width(Screen.width / 10f));
                    }
                }
                GUILayout.EndHorizontal();
                GUILayout.Space(32);
            }
            GUILayout.EndVertical();
        }
        GUILayout.EndArea();
    }
    public void OnGUI()
    {
        GUILayout.BeginArea(itsRect);
        {
            KGFGUIUtility.BeginVerticalBox(KGFGUIUtility.eStyleBox.eBoxInvisible);
            {
                GUILayout.FlexibleSpace();

                GUILayout.BeginHorizontal();
                {
                    GUILayout.FlexibleSpace();

                    if (itsDemo.itsCurrentCameraRoot == KGFCameraSystemDemo.eCameraRoot.eCharacter)
                    {
                        KGFGUIUtility.Box(itsKeys, KGFGUIUtility.eStyleBox.eBoxInvisible, GUILayout.Height(Screen.height / 10f), GUILayout.Width(Screen.width / 10f));
//						KGFGUIUtility.Box(itsMouseMove,KGFGUIUtility.eStyleBox.eBoxInvisible, GUILayout.Height(Screen.height/10f), GUILayout.Width(Screen.width/10f));
                        KGFGUIUtility.Box(itsMouseRotate, KGFGUIUtility.eStyleBox.eBoxInvisible, GUILayout.Height(Screen.height / 10f), GUILayout.Width(Screen.width / 10f));
                        KGFGUIUtility.Box(itsMouseZoom, KGFGUIUtility.eStyleBox.eBoxInvisible, GUILayout.Height(Screen.height / 10f), GUILayout.Width(Screen.width / 10f));
                        //KGFGUIUtility.Box(itsMouseZoom,KGFGUIUtility.eStyleBox.eBoxInvisible, GUILayout.Height(Screen.height/10f), GUILayout.Width(Screen.width/10f));
                    }
                    else if (itsDemo.itsCurrentCameraRoot == KGFCameraSystemDemo.eCameraRoot.eObserve)
                    {
                        KGFGUIUtility.Box(itsKeys, KGFGUIUtility.eStyleBox.eBoxInvisible, GUILayout.Height(Screen.height / 10f), GUILayout.Width(Screen.width / 10f));
                    }
                    else if (itsDemo.itsCurrentCameraRoot == KGFCameraSystemDemo.eCameraRoot.ePanning || itsDemo.itsCurrentCameraRoot == KGFCameraSystemDemo.eCameraRoot.ePanningCamera)
                    {
                        KGFGUIUtility.Box(itsKeys, KGFGUIUtility.eStyleBox.eBoxInvisible, GUILayout.Height(Screen.height / 10f), GUILayout.Width(Screen.width / 10f));
                        KGFGUIUtility.Box(itsMouseRotate, KGFGUIUtility.eStyleBox.eBoxInvisible, GUILayout.Height(Screen.height / 10f), GUILayout.Width(Screen.width / 10f));
                    }
                    else
                    {
                        KGFGUIUtility.Box(itsMouseRotate, KGFGUIUtility.eStyleBox.eBoxInvisible, GUILayout.Height(Screen.height / 10f), GUILayout.Width(Screen.width / 10f));
                        KGFGUIUtility.Box(itsMouseZoom, KGFGUIUtility.eStyleBox.eBoxInvisible, GUILayout.Height(Screen.height / 10f), GUILayout.Width(Screen.width / 10f));
                    }
                }
                GUILayout.EndHorizontal();
                GUILayout.Space(32);
            }
            GUILayout.EndVertical();
        }
        GUILayout.EndArea();
    }