Skip to content

Commit c30c232

Browse files
committed
guild window context menu correction
1 parent 5eeeb1f commit c30c232

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

Intersect.Client.Core/Interface/Game/GuildWindow.cs

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ partial class GuildWindow : Window
2121
private readonly Button _buttonAdd;
2222
private readonly Button _buttonLeave;
2323
private readonly Button _buttonAddPopup;
24-
private readonly Framework.Gwen.Control.Menu _contextMenu;
24+
private readonly ContextMenu _contextMenu;
2525
private readonly MenuItem _privateMessageOption;
2626
private readonly MenuItem[] _promoteOptions;
2727
private readonly MenuItem[] _demoteOptions;
@@ -115,7 +115,7 @@ public GuildWindow(Canvas gameCanvas) : base(gameCanvas, Globals.Me?.Guild, fals
115115
#region Context Menu Options
116116

117117
// Context Menu
118-
_contextMenu = new Framework.Gwen.Control.Menu(gameCanvas, "GuildContextMenu")
118+
_contextMenu = new ContextMenu(gameCanvas, "GuildContextMenu")
119119
{
120120
IsHidden = true,
121121
IconMarginDisabled = true
@@ -326,8 +326,10 @@ private void member_RightClicked(Base sender, MouseButtonState arguments)
326326
_contextMenu.AddChild(_transferOption);
327327
}
328328

329-
_ = _contextMenu.SizeToChildren();
330-
_contextMenu.Open(Framework.Gwen.Pos.None);
329+
if (_contextMenu.Children.Count > 0)
330+
{
331+
_contextMenu.Open(Framework.Gwen.Pos.None);
332+
}
331333
}
332334

333335
#endregion

Intersect.Client.Core/Interface/Game/Inventory/InventoryWindow.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ public void OpenContextMenu(int slot)
142142
// Set our Inventory slot as userdata for future reference.
143143
mContextMenu.UserData = slot;
144144

145-
// Display our menu.. If we have anything to display.
145+
// Display our menu... If we have anything to display.
146146
if (mContextMenu.Children.Count > 0)
147147
{
148148
mContextMenu.Open(Framework.Gwen.Pos.None);

0 commit comments

Comments
 (0)