Skip to content

Commit 2c1e797

Browse files
committed
small tweaks
1 parent d351797 commit 2c1e797

File tree

1 file changed

+9
-12
lines changed

1 file changed

+9
-12
lines changed

Intersect.Client.Core/Interface/Game/Spells/SpellItem.cs

+9-12
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ private void _forgetSpellMenuItem_Clicked(Base sender, MouseButtonState argument
116116

117117
#region Mouse Events
118118

119-
void _iconImage_HoverEnter(Base? sender, EventArgs? arguments)
119+
private void _iconImage_HoverEnter(Base? sender, EventArgs? arguments)
120120
{
121121
if (InputHandler.MouseFocus != null)
122122
{
@@ -146,7 +146,7 @@ void _iconImage_HoverEnter(Base? sender, EventArgs? arguments)
146146
_descriptionWindow = new SpellDescriptionWindow(spellSlots[SlotIndex].Id, _spellWindow.X, _spellWindow.Y);
147147
}
148148

149-
void _iconImage_HoverLeave(Base sender, EventArgs arguments)
149+
private void _iconImage_HoverLeave(Base sender, EventArgs arguments)
150150
{
151151
_mouseOver = false;
152152
_mouseX = -1;
@@ -159,7 +159,7 @@ void _iconImage_HoverLeave(Base sender, EventArgs arguments)
159159
}
160160
}
161161

162-
void _iconImage_Clicked(Base sender, MouseButtonState arguments)
162+
private void _iconImage_Clicked(Base sender, MouseButtonState arguments)
163163
{
164164
switch (arguments.MouseButton)
165165
{
@@ -221,10 +221,10 @@ public override void Update()
221221

222222
if (Path.GetFileName(_iconImage.Texture?.Name) != spell.Icon)
223223
{
224-
var spellTex = Globals.ContentManager?.GetTexture(TextureType.Spell, spell.Icon);
225-
if (spellTex != null)
224+
var spellIconTexture = Globals.ContentManager?.GetTexture(TextureType.Spell, spell.Icon);
225+
if (spellIconTexture != null)
226226
{
227-
_iconImage.Texture = spellTex;
227+
_iconImage.Texture = spellIconTexture;
228228
_iconImage.RenderColor.A = (byte)(_cooldownLabel.IsVisibleInParent ? 100 : 255);
229229
_iconImage.IsVisibleInParent = true;
230230
}
@@ -237,12 +237,9 @@ public override void Update()
237237
}
238238
}
239239

240-
if (_descriptionWindow != null)
241-
{
242-
_descriptionWindow.Dispose();
243-
_descriptionWindow = null;
244-
_iconImage_HoverEnter(null, null);
245-
}
240+
_descriptionWindow?.Dispose();
241+
_descriptionWindow = null;
242+
_iconImage_HoverEnter(null, null);
246243
}
247244

248245
if (!IsDragging)

0 commit comments

Comments
 (0)