UI polish

This commit is contained in:
r00telement
2021-12-12 07:58:20 +00:00
parent 6811ecefe2
commit bb96edf144
4 changed files with 60 additions and 35 deletions

View File

@@ -12,6 +12,7 @@ namespace PlayerTags.Configuration
public class PluginConfiguration : IPluginConfiguration
{
public int Version { get; set; } = 0;
public bool IsVisible = false;
public NameplateFreeCompanyVisibility NameplateFreeCompanyVisibility = NameplateFreeCompanyVisibility.Default;
public NameplateTitleVisibility NameplateTitleVisibility = NameplateTitleVisibility.WhenHasTags;
@@ -19,7 +20,7 @@ namespace PlayerTags.Configuration
public bool IsPlayerNameRandomlyGenerated = false;
public bool IsCustomTagsContextMenuEnabled = true;
public bool IsShowInheritedPropertiesEnabled = true;
public bool IsPlayersTabOrderedByProximity = true;
public bool IsPlayersTabOrderedByProximity = false;
public bool IsPlayersTabSelfVisible = true;
public bool IsPlayersTabFriendsVisible = true;
public bool IsPlayersTabPartyVisible = true;

View File

@@ -89,6 +89,8 @@ namespace PlayerTags.Configuration
ImGui.BeginGroup();
ImGui.Columns(2);
ImGui.Spacing();
ImGui.Spacing();
ImGui.BeginGroup();
DrawTree(m_PluginData.AllTags);
ImGui.EndGroup();
@@ -107,7 +109,7 @@ namespace PlayerTags.Configuration
ImGui.EndTabItem();
}
if (ImGui.BeginTabItem(Strings.Loc_Static_Players))
if (ImGui.BeginTabItem(Strings.Loc_Static_QuickTag))
{
ImGui.Spacing();
ImGui.Spacing();
@@ -120,6 +122,8 @@ namespace PlayerTags.Configuration
DrawCheckbox(nameof(m_PluginConfiguration.IsPlayersTabEnemiesVisible), true, ref m_PluginConfiguration.IsPlayersTabEnemiesVisible, () => m_PluginConfiguration.Save(m_PluginData));
DrawCheckbox(nameof(m_PluginConfiguration.IsPlayersTabOthersVisible), true, ref m_PluginConfiguration.IsPlayersTabOthersVisible, () => m_PluginConfiguration.Save(m_PluginData));
ImGui.Spacing();
ImGui.Spacing();
if (ImGui.BeginTable("##PlayersTable", 1 + m_PluginData.CustomTags.Count))
{
ImGui.TableHeader(Strings.Loc_Static_PlayerName);
@@ -636,7 +640,7 @@ namespace PlayerTags.Configuration
}
else if (selectedInheritable.Inheritable.Value is InheritableValue<TagPosition> inheritableTagPosition)
{
DrawInheritable(selectedInheritable.Inheritable.Key, false, true, inheritableTagPosition);
DrawInheritable(selectedInheritable.Inheritable.Key, true, false, inheritableTagPosition);
}
else if (selectedInheritable.Inheritable.Value is InheritableValue<NameplateElement> inheritableNameplateElement)
{
@@ -694,6 +698,11 @@ namespace PlayerTags.Configuration
ImGui.BeginChild(inheritable.GetHashCode().ToString(), new Vector2(0 , 50));
ImGui.Text(Localizer.GetString(localizedStringName, false));
if (ImGui.IsItemHovered())
{
ImGui.SetTooltip(Localizer.GetString(localizedStringName, true));
}
if (isDisabled)
{
ImGui.SameLine();
@@ -740,6 +749,11 @@ namespace PlayerTags.Configuration
ImGui.BeginChild(inheritable.GetHashCode().ToString(), new Vector2(0, 50));
ImGui.Text(Localizer.GetString(localizedStringName, false));
if (ImGui.IsItemHovered())
{
ImGui.SetTooltip(Localizer.GetString(localizedStringName, true));
}
if (isDisabled)
{
ImGui.SameLine();
@@ -811,6 +825,11 @@ namespace PlayerTags.Configuration
ImGui.BeginChild(inheritable.GetHashCode().ToString(), new Vector2(180, 50));
ImGui.Text(Localizer.GetString(localizedStringName, false));
if (ImGui.IsItemHovered())
{
ImGui.SetTooltip(Localizer.GetString(localizedStringName, true));
}
if (isDisabled)
{
ImGui.SameLine();
@@ -911,6 +930,11 @@ namespace PlayerTags.Configuration
ImGui.BeginChild(inheritable.GetHashCode().ToString(), new Vector2(0, 50));
ImGui.Text(Localizer.GetString(localizedStringName, false));
if (ImGui.IsItemHovered())
{
ImGui.SetTooltip(Localizer.GetString(localizedStringName, true));
}
if (isDisabled)
{
ImGui.SameLine();

View File

@@ -1014,15 +1014,6 @@ namespace PlayerTags.Resources {
}
}
/// <summary>
/// Looks up a localized string similar to Players.
/// </summary>
public static string Loc_Static_Players {
get {
return ResourceManager.GetString("Loc_Static_Players", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Player Tags.
/// </summary>
@@ -1032,6 +1023,15 @@ namespace PlayerTags.Resources {
}
}
/// <summary>
/// Looks up a localized string similar to Quick Tag.
/// </summary>
public static string Loc_Static_QuickTag {
get {
return ResourceManager.GetString("Loc_Static_QuickTag", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Remove this custom tag..
/// </summary>

View File

@@ -126,8 +126,8 @@
<data name="Loc_Static_General" xml:space="preserve">
<value>General</value>
</data>
<data name="Loc_Static_Players" xml:space="preserve">
<value>Players</value>
<data name="Loc_Static_QuickTag" xml:space="preserve">
<value>Quick Tag</value>
</data>
<data name="Loc_Static_TaggedPlayers" xml:space="preserve">
<value>Tagged Players</value>
@@ -307,72 +307,72 @@
<value>Icon</value>
</data>
<data name="Loc_Icon_Description" xml:space="preserve">
<value>The icon that will be displayed in the tag.</value>
<value>The icon that will be displayed.</value>
</data>
<data name="Loc_IsIconVisibleInChat" xml:space="preserve">
<value>Icon visible in chat</value>
<value>Show in chat</value>
</data>
<data name="Loc_IsIconVisibleInChat_Description" xml:space="preserve">
<value>Whether the icon is visible in the tag in chat.</value>
<value>Whether the icon will be shown in chat.</value>
</data>
<data name="Loc_IsIconVisibleInNameplates" xml:space="preserve">
<value>Icon visible in nameplates</value>
<value>Show in nameplates</value>
</data>
<data name="Loc_IsIconVisibleInNameplates_Description" xml:space="preserve">
<value>Whether the icon is visible in the tag in nameplates.</value>
<value>Whether the icon will be shown in nameplates.</value>
</data>
<data name="Loc_Text" xml:space="preserve">
<value>Text</value>
</data>
<data name="Loc_Text_Description" xml:space="preserve">
<value>The text that will be displayed in the tag.</value>
<value>The text that will be displayed.</value>
</data>
<data name="Loc_TextColor" xml:space="preserve">
<value>Text color</value>
<value>Color</value>
</data>
<data name="Loc_TextColor_Description" xml:space="preserve">
<value>The color of the text in the tag.</value>
<value>The color of the text.</value>
</data>
<data name="Loc_TextGlowColor" xml:space="preserve">
<value>Text glow color</value>
<value>Glow color</value>
</data>
<data name="Loc_TextGlowColor_Description" xml:space="preserve">
<value>The glow color of the text in the tag.</value>
<value>The glow color of the text.</value>
</data>
<data name="Loc_IsTextItalic" xml:space="preserve">
<value>Text italic</value>
</data>
<data name="Loc_IsTextItalic_Description" xml:space="preserve">
<value>Whether the text in the tag is italic.</value>
<value>Whether the text will be italic.</value>
</data>
<data name="Loc_IsTextVisibleInChat" xml:space="preserve">
<value>Text visible in chat</value>
<value>Show in chat</value>
</data>
<data name="Loc_IsTextVisibleInChat_Description" xml:space="preserve">
<value>Whether the text is visible in the tag in chat.</value>
<value>Whether the text will be shown in chat.</value>
</data>
<data name="Loc_IsTextVisibleInNameplates" xml:space="preserve">
<value>Text visible in nameplates</value>
<value>Show in nameplates</value>
</data>
<data name="Loc_IsTextVisibleInNameplates_Description" xml:space="preserve">
<value>Whether the text is visible in the tag in nameplates.</value>
<value>Whether the text will be shown in nameplates.</value>
</data>
<data name="Loc_TagPositionInChat" xml:space="preserve">
<value>Tag position in chat</value>
<value>Position in chat</value>
</data>
<data name="Loc_TagPositionInChat_Description" xml:space="preserve">
<value>Where the tag should be positioned in chat.</value>
<value>Where the tag will be positioned in chat.</value>
</data>
<data name="Loc_TagPositionInNameplates" xml:space="preserve">
<value>Tag position in nameplates</value>
<value>Position in nameplates</value>
</data>
<data name="Loc_TagPositionInNameplates_Description" xml:space="preserve">
<value>Where the tag should be positioned in nameplates.</value>
<value>Where the tag will be positioned in nameplates.</value>
</data>
<data name="Loc_TagTargetInNameplates" xml:space="preserve">
<value>Tag target in nameplates</value>
<value>Target in nameplates</value>
</data>
<data name="Loc_TagTargetInNameplates_Description" xml:space="preserve">
<value>The element that the tag should target in nameplates.</value>
@@ -481,7 +481,7 @@
<value>Order by proximity</value>
</data>
<data name="Loc_IsPlayersTabOrderedByProximity_Description" xml:space="preserve">
<value>Players that are closer to the local player will be ordered towards the top.</value>
<value>Players that are closer to you will be ordered towards the top.</value>
</data>
<data name="Loc_IsPlayersTabSelfVisible" xml:space="preserve">