Fix UI & Rotate Salt
This commit is contained in:
@@ -16,6 +16,7 @@ namespace MareSynchronos.UI.Components;
|
||||
|
||||
public class DrawUserPair : DrawPairBase
|
||||
{
|
||||
private static readonly Vector4 Violet = new(0.63f, 0.25f, 1f, 1f);
|
||||
protected readonly MareMediator _mediator;
|
||||
private readonly SelectGroupForPairUi _selectGroupForPairUi;
|
||||
private readonly CharaDataManager _charaDataManager;
|
||||
@@ -39,12 +40,11 @@ public class DrawUserPair : DrawPairBase
|
||||
protected override void DrawLeftSide(float textPosY, float originalY)
|
||||
{
|
||||
var online = _pair.IsOnline;
|
||||
var violet = new Vector4(0.69f, 0.27f, 0.93f, 1f);
|
||||
var offlineGrey = ImGuiColors.DalamudGrey3;
|
||||
|
||||
ImGui.SetCursorPosY(textPosY);
|
||||
ImGui.PushFont(UiBuilder.IconFont);
|
||||
UiSharedService.ColorText(FontAwesomeIcon.Moon.ToIconString(), online ? violet : offlineGrey);
|
||||
UiSharedService.ColorText(FontAwesomeIcon.Moon.ToIconString(), online ? Violet : offlineGrey);
|
||||
ImGui.PopFont();
|
||||
UiSharedService.AttachToolTip(online
|
||||
? "User is online"
|
||||
@@ -72,7 +72,7 @@ public class DrawUserPair : DrawPairBase
|
||||
ImGui.SameLine();
|
||||
ImGui.SetCursorPosY(textPosY);
|
||||
ImGui.PushFont(UiBuilder.IconFont);
|
||||
UiSharedService.ColorText(FontAwesomeIcon.Eye.ToIconString(), ImGuiColors.ParsedGreen);
|
||||
UiSharedService.ColorText(FontAwesomeIcon.Eye.ToIconString(), Violet);
|
||||
if (ImGui.IsItemClicked())
|
||||
{
|
||||
_mediator.Publish(new TargetPairMessage(_pair));
|
||||
@@ -301,4 +301,4 @@ public class DrawUserPair : DrawPairBase
|
||||
}
|
||||
UiSharedService.AttachToolTip("Hold CTRL and click to unpair permanently from " + entryUID);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -52,6 +52,7 @@ internal sealed class GroupPanel
|
||||
private bool _showModalChangePassword;
|
||||
private bool _showModalCreateGroup;
|
||||
private bool _showModalEnterPassword;
|
||||
private string _newSyncShellAlias = string.Empty;
|
||||
private string _syncShellPassword = string.Empty;
|
||||
private string _syncShellToJoin = string.Empty;
|
||||
|
||||
@@ -82,7 +83,7 @@ internal sealed class GroupPanel
|
||||
{
|
||||
var buttonSize = _uiShared.GetIconButtonSize(FontAwesomeIcon.Plus);
|
||||
ImGui.SetNextItemWidth(UiSharedService.GetWindowContentRegionWidth() - ImGui.GetWindowContentRegionMin().X - buttonSize.X);
|
||||
ImGui.InputTextWithHint("##syncshellid", "Syncshell GID/Alias (leave empty to create)", ref _syncShellToJoin, 20);
|
||||
ImGui.InputTextWithHint("##syncshellid", "Syncshell GID/Alias (leave empty to create)", ref _syncShellToJoin, 50);
|
||||
ImGui.SameLine(ImGui.GetWindowContentRegionMin().X + UiSharedService.GetWindowContentRegionWidth() - buttonSize.X);
|
||||
|
||||
bool userCanJoinMoreGroups = _pairManager.GroupPairs.Count < ApiController.ServerInfo.MaxGroupsJoinedByUser;
|
||||
@@ -108,6 +109,7 @@ internal sealed class GroupPanel
|
||||
{
|
||||
_lastCreatedGroup = null;
|
||||
_errorGroupCreate = false;
|
||||
_newSyncShellAlias = string.Empty;
|
||||
_showModalCreateGroup = true;
|
||||
ImGui.OpenPopup("Create Syncshell");
|
||||
}
|
||||
@@ -150,13 +152,21 @@ internal sealed class GroupPanel
|
||||
|
||||
if (ImGui.BeginPopupModal("Create Syncshell", ref _showModalCreateGroup, UiSharedService.PopupWindowFlags))
|
||||
{
|
||||
UiSharedService.TextWrapped("Press the button below to create a new Syncshell.");
|
||||
UiSharedService.TextWrapped("Donnez un nom à votre Syncshell (optionnel) puis créez-la. Le préfixe 'UMB-' reste inchangé.");
|
||||
ImGui.SetNextItemWidth(-1);
|
||||
ImGui.InputTextWithHint("##syncshellalias", "Nom du Syncshell", ref _newSyncShellAlias, 50);
|
||||
UiSharedService.TextWrapped("Appuyez sur le bouton ci-dessous pour créer une nouvelle Syncshell.");
|
||||
ImGui.SetNextItemWidth(200 * ImGuiHelpers.GlobalScale);
|
||||
if (ImGui.Button("Create Syncshell"))
|
||||
{
|
||||
try
|
||||
{
|
||||
_lastCreatedGroup = ApiController.GroupCreate().Result;
|
||||
var aliasInput = string.IsNullOrWhiteSpace(_newSyncShellAlias) ? null : _newSyncShellAlias.Trim();
|
||||
_lastCreatedGroup = ApiController.GroupCreate(aliasInput).Result;
|
||||
if (_lastCreatedGroup != null)
|
||||
{
|
||||
_newSyncShellAlias = string.Empty;
|
||||
}
|
||||
}
|
||||
catch
|
||||
{
|
||||
@@ -169,6 +179,10 @@ internal sealed class GroupPanel
|
||||
{
|
||||
ImGui.Separator();
|
||||
_errorGroupCreate = false;
|
||||
if (!string.IsNullOrWhiteSpace(_lastCreatedGroup.Group.Alias))
|
||||
{
|
||||
ImGui.TextUnformatted("Syncshell Name: " + _lastCreatedGroup.Group.Alias);
|
||||
}
|
||||
ImGui.TextUnformatted("Syncshell ID: " + _lastCreatedGroup.Group.GID);
|
||||
ImGui.AlignTextToFramePadding();
|
||||
ImGui.TextUnformatted("Syncshell Password: " + _lastCreatedGroup.Password);
|
||||
@@ -702,4 +716,4 @@ internal sealed class GroupPanel
|
||||
}
|
||||
ImGui.EndChild();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user