Make line endings explicit in editorconfig and share in sub projects, also apply editorconfig everywhere and move some namespaces.

This commit is contained in:
Ottermandias 2023-09-18 16:56:16 +02:00
parent 53adb6fa54
commit 2b4a01df06
155 changed files with 1620 additions and 1614 deletions

View file

@ -17,12 +17,12 @@ public enum ColorId
FolderLine,
ItemId,
IncreasedMetaValue,
DecreasedMetaValue,
SelectedCollection,
RedundantAssignment,
NoModsAssignment,
NoAssignment,
SelectorPriority,
DecreasedMetaValue,
SelectedCollection,
RedundantAssignment,
NoModsAssignment,
NoAssignment,
SelectorPriority,
InGameHighlight,
}
@ -38,7 +38,7 @@ public static class Colors
public const uint TutorialBorder = 0xD00000FF;
public const uint ReniColorButton = CustomGui.ReniColorButton;
public const uint ReniColorHovered = CustomGui.ReniColorHovered;
public const uint ReniColorActive = CustomGui.ReniColorActive ;
public const uint ReniColorActive = CustomGui.ReniColorActive;
public static (uint DefaultColor, string Name, string Description) Data(this ColorId color)
=> color switch
@ -69,12 +69,12 @@ public static class Colors
};
private static IReadOnlyDictionary<ColorId, uint> _colors = new Dictionary<ColorId, uint>();
/// <summary> Obtain the configured value for a color. </summary>
/// <summary> Obtain the configured value for a color. </summary>
public static uint Value(this ColorId color)
=> _colors.TryGetValue(color, out var value) ? value : color.Data().DefaultColor;
/// <summary> Set the configurable colors dictionary to a value. </summary>
/// <summary> Set the configurable colors dictionary to a value. </summary>
public static void SetColors(Configuration config)
=> _colors = config.Colors;
}

View file

@ -8,38 +8,41 @@ namespace Penumbra.UI.Classes;
public static class Combos
{
// Different combos to use with enums.
public static bool Race( string label, ModelRace current, out ModelRace race )
=> Race( label, 100, current, out race );
public static bool Race(string label, ModelRace current, out ModelRace race)
=> Race(label, 100, current, out race);
public static bool Race( string label, float unscaledWidth, ModelRace current, out ModelRace race )
=> ImGuiUtil.GenericEnumCombo( label, unscaledWidth * UiHelpers.Scale, current, out race, RaceEnumExtensions.ToName, 1 );
public static bool Race(string label, float unscaledWidth, ModelRace current, out ModelRace race)
=> ImGuiUtil.GenericEnumCombo(label, unscaledWidth * UiHelpers.Scale, current, out race, RaceEnumExtensions.ToName, 1);
public static bool Gender( string label, Gender current, out Gender gender )
=> Gender( label, 120, current, out gender );
public static bool Gender(string label, Gender current, out Gender gender)
=> Gender(label, 120, current, out gender);
public static bool Gender( string label, float unscaledWidth, Gender current, out Gender gender )
=> ImGuiUtil.GenericEnumCombo( label, unscaledWidth * UiHelpers.Scale, current, out gender, RaceEnumExtensions.ToName, 1 );
public static bool Gender(string label, float unscaledWidth, Gender current, out Gender gender)
=> ImGuiUtil.GenericEnumCombo(label, unscaledWidth * UiHelpers.Scale, current, out gender, RaceEnumExtensions.ToName, 1);
public static bool EqdpEquipSlot( string label, EquipSlot current, out EquipSlot slot )
=> ImGuiUtil.GenericEnumCombo( label, 100 * UiHelpers.Scale, current, out slot, EquipSlotExtensions.EqdpSlots, EquipSlotExtensions.ToName );
public static bool EqdpEquipSlot(string label, EquipSlot current, out EquipSlot slot)
=> ImGuiUtil.GenericEnumCombo(label, 100 * UiHelpers.Scale, current, out slot, EquipSlotExtensions.EqdpSlots,
EquipSlotExtensions.ToName);
public static bool EqpEquipSlot( string label, float width, EquipSlot current, out EquipSlot slot )
=> ImGuiUtil.GenericEnumCombo( label, width * UiHelpers.Scale, current, out slot, EquipSlotExtensions.EquipmentSlots, EquipSlotExtensions.ToName );
public static bool EqpEquipSlot(string label, float width, EquipSlot current, out EquipSlot slot)
=> ImGuiUtil.GenericEnumCombo(label, width * UiHelpers.Scale, current, out slot, EquipSlotExtensions.EquipmentSlots,
EquipSlotExtensions.ToName);
public static bool AccessorySlot( string label, EquipSlot current, out EquipSlot slot )
=> ImGuiUtil.GenericEnumCombo( label, 100 * UiHelpers.Scale, current, out slot, EquipSlotExtensions.AccessorySlots, EquipSlotExtensions.ToName );
public static bool AccessorySlot(string label, EquipSlot current, out EquipSlot slot)
=> ImGuiUtil.GenericEnumCombo(label, 100 * UiHelpers.Scale, current, out slot, EquipSlotExtensions.AccessorySlots,
EquipSlotExtensions.ToName);
public static bool SubRace( string label, SubRace current, out SubRace subRace )
=> ImGuiUtil.GenericEnumCombo( label, 150 * UiHelpers.Scale, current, out subRace, RaceEnumExtensions.ToName, 1 );
public static bool SubRace(string label, SubRace current, out SubRace subRace)
=> ImGuiUtil.GenericEnumCombo(label, 150 * UiHelpers.Scale, current, out subRace, RaceEnumExtensions.ToName, 1);
public static bool RspAttribute( string label, RspAttribute current, out RspAttribute attribute )
=> ImGuiUtil.GenericEnumCombo( label, 200 * UiHelpers.Scale, current, out attribute,
RspAttributeExtensions.ToFullString, 0, 1 );
public static bool RspAttribute(string label, RspAttribute current, out RspAttribute attribute)
=> ImGuiUtil.GenericEnumCombo(label, 200 * UiHelpers.Scale, current, out attribute,
RspAttributeExtensions.ToFullString, 0, 1);
public static bool EstSlot( string label, EstManipulation.EstType current, out EstManipulation.EstType attribute )
=> ImGuiUtil.GenericEnumCombo( label, 200 * UiHelpers.Scale, current, out attribute );
public static bool EstSlot(string label, EstManipulation.EstType current, out EstManipulation.EstType attribute)
=> ImGuiUtil.GenericEnumCombo(label, 200 * UiHelpers.Scale, current, out attribute);
public static bool ImcType( string label, ObjectType current, out ObjectType type )
=> ImGuiUtil.GenericEnumCombo( label, 110 * UiHelpers.Scale, current, out type, ObjectTypeExtensions.ValidImcTypes,
ObjectTypeExtensions.ToName );
}
public static bool ImcType(string label, ObjectType current, out ObjectType type)
=> ImGuiUtil.GenericEnumCombo(label, 110 * UiHelpers.Scale, current, out type, ObjectTypeExtensions.ValidImcTypes,
ObjectTypeExtensions.ToName);
}