Beispiel #1
0
        private void DrawModItemContent(MonitoredModViewModel mod, float indent)
        {
            indent += Appearance.LargeMargin;

            mod.IsReflectionListExpanded = DrawTools.DrawExpander(
                () => DrawItemHeader(Strings.ReflectionQueries, mod.QueriesDescription),
                enabled: mod.AnyQueries,
                expanded: mod.IsReflectionListExpanded,
                i => DrawStringList(mod.QueriedMembers, i),
                indent);

            string conflictsCaption = mod.AnyConflicts
                ? Strings.PossibleModConflicts
                : Strings.PossibleModConflicts + ": " + Strings.None;

            GUILayout.BeginHorizontal();
            GUILayout.Space(indent);
            GUI.contentColor = Colors.Text;
            GUILayout.Label(conflictsCaption);
            GUILayout.EndHorizontal();

            GUILayout.Space(Appearance.SmallMargin);

            if (mod.AnyConflicts)
            {
                DrawConflictedMods(mod.Conflicts, indent);
            }
        }
Beispiel #2
0
 /// <summary>
 /// Draws the content of the specified <see cref="MonitoredModViewModel"/> instance
 /// in the current area.
 /// </summary>
 /// <param name="mod">A <see cref="MonitoredModViewModel"/> instance to display.</param>
 public void DrawModView(MonitoredModViewModel mod)
 => mod.IsExpanded = DrawTools.DrawExpander(
     () => DrawItemHeader(mod.ModName, mod.Description),
     enabled: true,
     expanded: mod.IsExpanded,
     _ => DrawModItemContent(mod, Appearance.LargeMargin),
     indent: 0f);