-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: update to properly register ITerritoryManager
- Loading branch information
Showing
11 changed files
with
282 additions
and
256 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,20 @@ | ||
|
||
public static class ListExtension | ||
namespace DalamudSystem.Extensions | ||
{ | ||
public static void DalamudCoreMoveListItem<T>(this IList<T> List, int Position, MoveDirection Direction) | ||
{ | ||
int Modifier = Direction == MoveDirection.Up ? -1 : +1; | ||
int Positional = Position + Modifier; | ||
if (Positional < 0 || Positional >= List.Count) return; | ||
(List[Position], List[Position + Modifier]) = (List[Position + Modifier], List[Position]); | ||
} | ||
} | ||
public static class ListExtension | ||
{ | ||
public static void DalamudSystemMoveListItem<T>(this IList<T> List, int Position, MoveDirection Direction) | ||
{ | ||
int Modifier = Direction == MoveDirection.Up ? -1 : 1; | ||
int Positional = Position + Modifier; | ||
if (Positional < 0 || Positional >= List.Count) return; | ||
(List[Position], List[Position + Modifier]) = (List[Position + Modifier], List[Position]); | ||
} | ||
} | ||
|
||
public enum MoveDirection | ||
{ | ||
Up, | ||
Down | ||
public enum MoveDirection | ||
{ | ||
Up, | ||
Down | ||
} | ||
} |
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
Oops, something went wrong.