ui icon boogaloo
This commit is contained in:
@@ -178,14 +178,14 @@ public class TopTabMenu
|
||||
|
||||
private void DrawAddPair(float availableXWidth, float spacingX)
|
||||
{
|
||||
var buttonSize = UiSharedService.GetIconTextButtonSize(FontAwesomeIcon.UserPlus, "Add");
|
||||
var buttonSize = UiSharedService.GetNormalizedIconTextButtonSize(FontAwesomeIcon.UserPlus, "Add");
|
||||
ImGui.SetNextItemWidth(availableXWidth - buttonSize.X - spacingX);
|
||||
ImGui.InputTextWithHint("##otheruid", "Other players UID/Alias", ref _pairToAdd, 20);
|
||||
ImGui.SameLine();
|
||||
var alreadyExisting = _pairManager.DirectPairs.Exists(p => string.Equals(p.UserData.UID, _pairToAdd, StringComparison.Ordinal) || string.Equals(p.UserData.Alias, _pairToAdd, StringComparison.Ordinal));
|
||||
using (ImRaii.Disabled(alreadyExisting || string.IsNullOrEmpty(_pairToAdd)))
|
||||
{
|
||||
if (UiSharedService.IconTextButton(FontAwesomeIcon.UserPlus, "Add"))
|
||||
if (UiSharedService.NormalizedIconTextButton(FontAwesomeIcon.UserPlus, "Add"))
|
||||
{
|
||||
_ = _apiController.UserAddPair(new(new(_pairToAdd)));
|
||||
_pairToAdd = string.Empty;
|
||||
@@ -196,7 +196,7 @@ public class TopTabMenu
|
||||
|
||||
private void DrawFilter(float availableWidth, float spacingX)
|
||||
{
|
||||
var buttonSize = UiSharedService.GetIconTextButtonSize(FontAwesomeIcon.Ban, "Clear");
|
||||
var buttonSize = UiSharedService.GetNormalizedIconTextButtonSize(FontAwesomeIcon.Ban, "Clear");
|
||||
ImGui.SetNextItemWidth(availableWidth - buttonSize.X - spacingX);
|
||||
string filter = Filter;
|
||||
if (ImGui.InputTextWithHint("##filter", "Filter for UID/notes", ref filter, 255))
|
||||
@@ -205,7 +205,7 @@ public class TopTabMenu
|
||||
}
|
||||
ImGui.SameLine();
|
||||
using var disabled = ImRaii.Disabled(string.IsNullOrEmpty(Filter));
|
||||
if (UiSharedService.IconTextButton(FontAwesomeIcon.Ban, "Clear"))
|
||||
if (UiSharedService.NormalizedIconTextButton(FontAwesomeIcon.Ban, "Clear"))
|
||||
{
|
||||
Filter = string.Empty;
|
||||
}
|
||||
@@ -466,7 +466,7 @@ public class TopTabMenu
|
||||
using (ImRaii.Disabled(_pairManager.GroupPairs.Select(k => k.Key).Distinct()
|
||||
.Count(g => string.Equals(g.OwnerUID, _apiController.UID, StringComparison.Ordinal)) >= _apiController.ServerInfo.MaxGroupsCreatedByUser))
|
||||
{
|
||||
if (UiSharedService.IconTextButton(FontAwesomeIcon.Plus, "Create new Syncshell", buttonX))
|
||||
if (UiSharedService.NormalizedIconTextButton(FontAwesomeIcon.Plus, "Create new Syncshell", buttonX))
|
||||
{
|
||||
_mareMediator.Publish(new UiToggleMessage(typeof(CreateSyncshellUI)));
|
||||
}
|
||||
@@ -475,7 +475,7 @@ public class TopTabMenu
|
||||
|
||||
using (ImRaii.Disabled(_pairManager.GroupPairs.Select(k => k.Key).Distinct().Count() >= _apiController.ServerInfo.MaxGroupsJoinedByUser))
|
||||
{
|
||||
if (UiSharedService.IconTextButton(FontAwesomeIcon.Users, "Join existing Syncshell", buttonX))
|
||||
if (UiSharedService.NormalizedIconTextButton(FontAwesomeIcon.Users, "Join existing Syncshell", buttonX))
|
||||
{
|
||||
_mareMediator.Publish(new UiToggleMessage(typeof(JoinSyncshellUI)));
|
||||
}
|
||||
@@ -485,13 +485,13 @@ public class TopTabMenu
|
||||
private void DrawUserConfig(float availableWidth, float spacingX)
|
||||
{
|
||||
var buttonX = (availableWidth - spacingX) / 2f;
|
||||
if (UiSharedService.IconTextButton(FontAwesomeIcon.UserCircle, "Edit Mare Profile", buttonX))
|
||||
if (UiSharedService.NormalizedIconTextButton(FontAwesomeIcon.UserCircle, "Edit Mare Profile", buttonX))
|
||||
{
|
||||
_mareMediator.Publish(new UiToggleMessage(typeof(EditProfileUi)));
|
||||
}
|
||||
UiSharedService.AttachToolTip("Edit your Mare Profile");
|
||||
ImGui.SameLine();
|
||||
if (UiSharedService.IconTextButton(FontAwesomeIcon.PersonCircleQuestion, "Chara Data Analysis", buttonX))
|
||||
if (UiSharedService.NormalizedIconTextButton(FontAwesomeIcon.PersonCircleQuestion, "Chara Data Analysis", buttonX))
|
||||
{
|
||||
_mareMediator.Publish(new UiToggleMessage(typeof(DataAnalysisUi)));
|
||||
}
|
||||
@@ -518,7 +518,7 @@ public class TopTabMenu
|
||||
{
|
||||
if (ImGui.BeginPopup(popupTitle))
|
||||
{
|
||||
if (UiSharedService.IconTextButton(enableIcon, enableText, 0, true))
|
||||
if (UiSharedService.NormalizedIconTextButton(enableIcon, enableText, 0, true))
|
||||
{
|
||||
_ = GlobalControlCountdown(10);
|
||||
var bulkIndividualPairs = _pairManager.PairsWithGroups.Keys
|
||||
@@ -532,7 +532,7 @@ public class TopTabMenu
|
||||
ImGui.CloseCurrentPopup();
|
||||
}
|
||||
|
||||
if (UiSharedService.IconTextButton(disableIcon, disableText, 0, true))
|
||||
if (UiSharedService.NormalizedIconTextButton(disableIcon, disableText, 0, true))
|
||||
{
|
||||
_ = GlobalControlCountdown(10);
|
||||
var bulkIndividualPairs = _pairManager.PairsWithGroups.Keys
|
||||
@@ -556,7 +556,7 @@ public class TopTabMenu
|
||||
if (ImGui.BeginPopup(popupTitle))
|
||||
{
|
||||
|
||||
if (UiSharedService.IconTextButton(enableIcon, enableText, 0, true))
|
||||
if (UiSharedService.NormalizedIconTextButton(enableIcon, enableText, 0, true))
|
||||
{
|
||||
_ = GlobalControlCountdown(10);
|
||||
var bulkSyncshells = _pairManager.GroupPairs.Keys
|
||||
@@ -570,7 +570,7 @@ public class TopTabMenu
|
||||
ImGui.CloseCurrentPopup();
|
||||
}
|
||||
|
||||
if (UiSharedService.IconTextButton(disableIcon, disableText, 0, true))
|
||||
if (UiSharedService.NormalizedIconTextButton(disableIcon, disableText, 0, true))
|
||||
{
|
||||
_ = GlobalControlCountdown(10);
|
||||
var bulkSyncshells = _pairManager.GroupPairs.Keys
|
||||
|
||||
Reference in New Issue
Block a user