Update Inheritance tooltips.

This commit is contained in:
Ottermandias 2022-06-04 21:35:27 +02:00
parent 6e7465aa99
commit cd8523a75f
2 changed files with 5 additions and 4 deletions

View file

@ -16,7 +16,7 @@ public partial class ConfigWindow
{ {
private partial class CollectionsTab private partial class CollectionsTab
{ {
private const int InheritedCollectionHeight = 10; private const int InheritedCollectionHeight = 9;
private const string InheritanceDragDropLabel = "##InheritanceMove"; private const string InheritanceDragDropLabel = "##InheritanceMove";
// Keep for reuse. // Keep for reuse.
@ -32,6 +32,7 @@ public partial class ConfigWindow
private void DrawInheritanceBlock() private void DrawInheritanceBlock()
{ {
using var id = ImRaii.PushId( "##Inheritance" ); using var id = ImRaii.PushId( "##Inheritance" );
ImGui.TextUnformatted( "The current collection inherits from:" );
DrawCurrentCollectionInheritance(); DrawCurrentCollectionInheritance();
DrawInheritanceTrashButton(); DrawInheritanceTrashButton();
DrawNewInheritanceSelection(); DrawNewInheritanceSelection();
@ -185,8 +186,8 @@ public partial class ConfigWindow
var tt = inheritance switch var tt = inheritance switch
{ {
ModCollection.ValidInheritance.Empty => "No valid collection to inherit from selected.", ModCollection.ValidInheritance.Empty => "No valid collection to inherit from selected.",
ModCollection.ValidInheritance.Valid => "Add a new inheritance to the collection.", ModCollection.ValidInheritance.Valid => "Let the current collection inherit from the selected collection.",
ModCollection.ValidInheritance.Self => "Can not inherit from itself.", ModCollection.ValidInheritance.Self => "The collection can not inherit from itself.",
ModCollection.ValidInheritance.Contained => "Already inheriting from the selected collection.", ModCollection.ValidInheritance.Contained => "Already inheriting from the selected collection.",
ModCollection.ValidInheritance.Circle => "Inheriting from selected collection would lead to cyclic inheritance.", ModCollection.ValidInheritance.Circle => "Inheriting from selected collection would lead to cyclic inheritance.",
_ => string.Empty, _ => string.Empty,

View file

@ -170,7 +170,7 @@ public partial class ConfigWindow
private void DrawMainSelectors() private void DrawMainSelectors()
{ {
var size = new Vector2( -1, var size = new Vector2( -1,
ImGui.GetTextLineHeightWithSpacing() * InheritedCollectionHeight ImGui.GetTextLineHeightWithSpacing() * (InheritedCollectionHeight + 1)
+ _window._defaultSpace.Y * 2 + _window._defaultSpace.Y * 2
+ ImGui.GetFrameHeightWithSpacing() * 4 + ImGui.GetFrameHeightWithSpacing() * 4
+ ImGui.GetStyle().ItemSpacing.Y * 6 ); + ImGui.GetStyle().ItemSpacing.Y * 6 );