예제 #1
0
 public void OnDrawGUI()
 {
     GUILayout.BeginArea(new Rect(Screen.width - 200, 0, 200, 100));
     ConfigureGUI.OnGUI(ref this.displayGUI, "On/Off FPS");
     if (this.displayGUI)
     {
         GUILayout.Label("Average FPS:" + this.fpsAverage);
         GUILayout.Label("Last " + this.staticsTime + " second(s) FPS:" + this.frameRate);
     }
     GUILayout.EndArea();
 }
예제 #2
0
 public virtual void OnGUI()
 {
     #if USE_PREFS
     var prefs = this.data as PrefsParam;
     if (prefs != null)
     {
         prefs.OnGUI();
     }
     #else
     ConfigureGUI.OnGUI(ref this.data, this.VariableName);
     #endif
 }
예제 #3
0
        public void OnDrawGUI()
        {
            ConfigureGUI.OnGUISlider(ref this.maxLength, 1, 100);
            ConfigureGUI.OnGUIEnum(ref this.channel, "Log Channel");
            var logs = LogToolNetwork.LogToolNetworkSocket.Get(this.channel);

            foreach (var client in logs)
            {
                var ipString = client.Key;
                if (this.guis.ContainsKey(ipString) == false)
                {
                    this.guis.Add(ipString, new GUIData());
                }

                var gui = this.guis[ipString];
                ConfigureGUI.OnFolder(ref gui.open, ipString);

                if (gui.open)
                {
                    client.Value.Reverse();
                    var guiStr = "";
                    for (var i = 0; i < Mathf.Min(client.Value.Count, this.maxLength); ++i)
                    {
                        var str = client.Value[i];
                        if (string.IsNullOrEmpty(str))
                        {
                            continue;
                        }

                        guiStr += str + "\n";
                    }

                    gui.scrollPosition = GUILayout.BeginScrollView(gui.scrollPosition);
                    GUILayout.Label(guiStr);
                    GUILayout.EndScrollView();
                }
            }
        }
예제 #4
0
 public override void OnGUI()
 {
     ConfigureGUI.OnGUI(ref this.data, this.VariableName);
 }