Skip to content

Commit

Permalink
feat: label for addons
Browse files Browse the repository at this point in the history
  • Loading branch information
psydack committed Jul 10, 2021
1 parent cda6cdc commit f4c3f09
Showing 1 changed file with 23 additions and 1 deletion.
24 changes: 23 additions & 1 deletion Editor/Editors/UImGuiEditor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@ internal class UImGuiEditor : UnityEditor.Editor
private SerializedProperty _cursorShapes;
private readonly StringBuilder _messages = new StringBuilder();

private bool usingImNodes = true;
private bool usingImGuizmo = true;
private bool usingImPlot = true;

public override void OnInspectorGUI()
{
serializedObject.Update();
Expand Down Expand Up @@ -74,11 +78,29 @@ private void OnEnable()
_shaders = serializedObject.FindProperty("_shaders");
_style = serializedObject.FindProperty("_style");
_cursorShapes = serializedObject.FindProperty("_cursorShapes");

#if UIMGUI_REMOVE_IMNODES
usingImNodes = false;
#endif
#if UIMGUI_REMOVE_IMGUIZMO
usingImGuizmo = false;
#endif
#if UIMGUI_REMOVE_IMPLOT
usingImPlot = false;
#endif
}

private void CheckRequirements()
{
EditorGUILayout.LabelField("ImGUI Version: " + ImGui.GetVersion());
var textImGui = $"ImGUI: {ImGui.GetVersion()}";
var textImNodes = $"ImNodes: { (usingImNodes ? "0.4 - 2021-07-09" : "disabled") }";
var textImGuizmo = $"ImGuizmo: { (usingImGuizmo ? "?? - 2021-07-09" : "disabled") }";
var textImPlot = $"ImPlot: { (usingImPlot ? "0.10 - 2021-07-09" : "disabled") }";

EditorGUILayout.LabelField(textImGui);
EditorGUILayout.LabelField(textImNodes);
EditorGUILayout.LabelField(textImGuizmo);
EditorGUILayout.LabelField(textImPlot);
EditorGUILayout.Space();

_messages.Clear();
Expand Down

0 comments on commit f4c3f09

Please sign in to comment.