Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #167 from ethanmoffat/paperdoll_drag
Add drag+drop between inventory and paperdoll for equip/unequip
- Loading branch information
Showing
13 changed files
with
242 additions
and
105 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
32 changes: 32 additions & 0 deletions
32
EndlessClient/Dialogs/Extensions/EquipLocationExtensions.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
using EOLib.IO; | ||
using Microsoft.Xna.Framework; | ||
using System; | ||
|
||
namespace EndlessClient.Dialogs.Extensions | ||
{ | ||
public static class EquipLocationExtensions | ||
{ | ||
public static Rectangle GetEquipLocationRectangle(this EquipLocation loc) | ||
{ | ||
switch (loc) | ||
{ | ||
case EquipLocation.Boots: return new Rectangle(87, 220, 56, 54); | ||
case EquipLocation.Accessory: return new Rectangle(55, 250, 23, 23); | ||
case EquipLocation.Gloves: return new Rectangle(22, 188, 56, 54); | ||
case EquipLocation.Belt: return new Rectangle(87, 188, 56, 23); | ||
case EquipLocation.Armor: return new Rectangle(86, 82, 56, 98); | ||
case EquipLocation.Necklace: return new Rectangle(152, 51, 56, 23); | ||
case EquipLocation.Hat: return new Rectangle(87, 21, 56, 54); | ||
case EquipLocation.Shield: return new Rectangle(152, 82, 56, 98); | ||
case EquipLocation.Weapon: return new Rectangle(22, 82, 56, 98); | ||
case EquipLocation.Ring1: return new Rectangle(152, 190, 23, 23); | ||
case EquipLocation.Ring2: return new Rectangle(185, 190, 23, 23); | ||
case EquipLocation.Armlet1: return new Rectangle(152, 220, 23, 23); | ||
case EquipLocation.Armlet2: return new Rectangle(185, 220, 23, 23); | ||
case EquipLocation.Bracer1: return new Rectangle(152, 250, 23, 23); | ||
case EquipLocation.Bracer2: return new Rectangle(185, 250, 23, 23); | ||
default: throw new ArgumentOutOfRangeException(nameof(loc), "That is not a valid equipment location"); | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.