void OnGUI() { GUILayout.BeginArea(new Rect(10, 10, 400, 400)); GUILayout.Box("RANDOM NUMBER DISTRIBUTION", GUILayout.Width(400), GUILayout.Height(400)); if (randomList != null && randomList.Count > 0) MersenneDebugDrawing.DrawPoints(randomList, op, 400, 400); GUILayout.EndArea(); GUILayout.BeginArea(new Rect(10, 420, 400, 200)); seed = EditorGUILayout.IntSlider("Seed:",seed,Int32.MinValue,Int32.MaxValue); op = (MersenneWindowOptionsType) EditorGUILayout.EnumPopup("Type:", op); samplig_size = EditorGUILayout.IntSlider ("#N", samplig_size, 1, 1000); normalizeToggle = EditorGUILayout.Toggle("Normalize", normalizeToggle); if (normalizeToggle) { temperature = EditorGUILayout.Slider ("Temp", temperature, 0.0f, 10.0f); } if (GUILayout.Button("Generate Random Numbers")) this.Sample(); if (randomList != null && randomList.Count > 0) { filename = EditorGUILayout.TextField("filename:", filename); if (GUILayout.Button("Save To File and Open it")) this.Save(); } if (GUILayout.Button("Close Window")) this.Close(); GUILayout.EndArea(); }
void OnGUI() { GUILayout.BeginArea(new Rect(10, 10, 400, 400)); GUILayout.Box("RANDOM NUMBER DISTRIBUTION", GUILayout.Width(400), GUILayout.Height(400)); if (randomList != null && randomList.Count > 0) { MersenneDebugDrawing.DrawPoints(randomList, op, 400, 400); } GUILayout.EndArea(); GUILayout.BeginArea(new Rect(10, 420, 400, 200)); seed = EditorGUILayout.IntSlider("Seed:", seed, Int32.MinValue, Int32.MaxValue); op = (MersenneWindowOptionsType)EditorGUILayout.EnumPopup("Type:", op); samplig_size = EditorGUILayout.IntSlider("#N", samplig_size, 1, 1000); normalizeToggle = EditorGUILayout.Toggle("Normalize", normalizeToggle); if (normalizeToggle) { temperature = EditorGUILayout.Slider("Temp", temperature, 0.0f, 10.0f); } if (GUILayout.Button("Generate Random Numbers")) { this.Sample(); } if (randomList != null && randomList.Count > 0) { filename = EditorGUILayout.TextField("filename:", filename); if (GUILayout.Button("Save To File and Open it")) { this.Save(); } } if (GUILayout.Button("Close Window")) { this.Close(); } GUILayout.EndArea(); }