Use new icon buttons on legacy UI too
This commit is contained in:
@@ -249,7 +249,7 @@ public class DrawGroupPair : DrawPairBase
|
||||
{
|
||||
ImGui.SetCursorPosY(originalY);
|
||||
|
||||
if (ImGuiComponents.IconButton(FontAwesomeIcon.Plus))
|
||||
if (_uiSharedService.IconButton(FontAwesomeIcon.Plus))
|
||||
{
|
||||
_ = _apiController.UserAddPair(new UserDto(new(_pair.UserData.UID)));
|
||||
}
|
||||
@@ -261,7 +261,7 @@ public class DrawGroupPair : DrawPairBase
|
||||
{
|
||||
ImGui.SetCursorPosY(originalY);
|
||||
|
||||
if (ImGuiComponents.IconButton(FontAwesomeIcon.Bars))
|
||||
if (_uiSharedService.IconButton(FontAwesomeIcon.Bars))
|
||||
{
|
||||
ImGui.OpenPopup("Popup");
|
||||
}
|
||||
|
||||
@@ -172,7 +172,7 @@ public class DrawUserPair : DrawPairBase
|
||||
}
|
||||
ImGui.SameLine(windowEndX - barButtonSize.X - spacingX - pauseIconSize.X);
|
||||
ImGui.SetCursorPosY(originalY);
|
||||
if (ImGuiComponents.IconButton(pauseIcon))
|
||||
if (_uiSharedService.IconButton(pauseIcon))
|
||||
{
|
||||
var perm = _pair.UserPair!.OwnPermissions;
|
||||
perm.SetPaused(!perm.IsPaused());
|
||||
@@ -191,7 +191,7 @@ public class DrawUserPair : DrawPairBase
|
||||
ImGui.SameLine(windowEndX - barButtonSize.X);
|
||||
ImGui.SetCursorPosY(originalY);
|
||||
|
||||
if (ImGuiComponents.IconButton(FontAwesomeIcon.Bars))
|
||||
if (_uiSharedService.IconButton(FontAwesomeIcon.Bars))
|
||||
{
|
||||
ImGui.OpenPopup("User Flyout Menu");
|
||||
}
|
||||
|
||||
@@ -88,7 +88,7 @@ internal sealed class GroupPanel
|
||||
|| string.Equals(p.Group.GID, _syncShellToJoin, StringComparison.Ordinal));
|
||||
|
||||
if (alreadyInGroup) ImGui.BeginDisabled();
|
||||
if (ImGuiComponents.IconButton(FontAwesomeIcon.Plus))
|
||||
if (_uiShared.IconButton(FontAwesomeIcon.Plus))
|
||||
{
|
||||
if (!string.IsNullOrEmpty(_syncShellToJoin))
|
||||
{
|
||||
@@ -170,7 +170,7 @@ internal sealed class GroupPanel
|
||||
ImGui.AlignTextToFramePadding();
|
||||
ImGui.TextUnformatted("Syncshell Password: " + _lastCreatedGroup.Password);
|
||||
ImGui.SameLine();
|
||||
if (ImGuiComponents.IconButton(FontAwesomeIcon.Copy))
|
||||
if (_uiShared.IconButton(FontAwesomeIcon.Copy))
|
||||
{
|
||||
ImGui.SetClipboardText(_lastCreatedGroup.Password);
|
||||
}
|
||||
@@ -584,7 +584,7 @@ internal sealed class GroupPanel
|
||||
ImGui.SameLine();
|
||||
}
|
||||
|
||||
if (ImGuiComponents.IconButton(pauseIcon))
|
||||
if (_uiShared.IconButton(pauseIcon))
|
||||
{
|
||||
var userPerm = groupDto.GroupUserPermissions ^ GroupUserPermissions.Paused;
|
||||
_ = ApiController.GroupChangeIndividualPermissionState(new GroupPairUserPermissionDto(groupDto.Group, new UserData(ApiController.UID), userPerm));
|
||||
@@ -592,7 +592,7 @@ internal sealed class GroupPanel
|
||||
UiSharedService.AttachToolTip((groupDto.GroupUserPermissions.IsPaused() ? "Resume" : "Pause") + " pairing with all users in this Syncshell");
|
||||
ImGui.SameLine();
|
||||
|
||||
if (ImGuiComponents.IconButton(FontAwesomeIcon.Bars))
|
||||
if (_uiShared.IconButton(FontAwesomeIcon.Bars))
|
||||
{
|
||||
ImGui.OpenPopup("ShellPopup");
|
||||
}
|
||||
|
||||
@@ -54,7 +54,7 @@ public class PairGroupsUi
|
||||
|
||||
var buttonPauseOffset = windowX + windowWidth - flyoutMenuX - spacingX - pauseButtonX;
|
||||
ImGui.SameLine(buttonPauseOffset);
|
||||
if (ImGuiComponents.IconButton(pauseButton))
|
||||
if (_uiSharedService.IconButton(pauseButton))
|
||||
{
|
||||
// If all of the currently visible pairs (after applying filters to the pairs)
|
||||
// are paused we display a resume button to resume all currently visible (after filters)
|
||||
@@ -81,7 +81,7 @@ public class PairGroupsUi
|
||||
|
||||
var buttonDeleteOffset = windowX + windowWidth - flyoutMenuX;
|
||||
ImGui.SameLine(buttonDeleteOffset);
|
||||
if (ImGuiComponents.IconButton(FontAwesomeIcon.Bars))
|
||||
if (_uiSharedService.IconButton(FontAwesomeIcon.Bars))
|
||||
{
|
||||
ImGui.OpenPopup("Group Flyout Menu");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user