Skip to content

Commit

Permalink
fixed stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
NotLe0n committed Apr 17, 2021
1 parent 11e4fdf commit 88aa86d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
14 changes: 7 additions & 7 deletions BetterChestsUI.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,26 +19,26 @@ class BetterChestsUI : UIState
public override void OnInitialize()
{
var header = new UIText("Sorting Options");
header.Top.Set(0, 0.255f);
header.Left.Set(0, 0.32f);
header.Top.Set(Main.instance.invBottom, 0);
header.Left.Set(506 + 100, 0); // magic number because vanilla does it the same way lmao
Append(header);

list = new UIList();
list.Top.Set(0, 0.28f);
list.Left.Set(0, 0.32f);
list.Top.Set(Main.instance.invBottom + 30, 0);
list.Left.Set(506 + 100, 0);
list.Width.Set(300, 0);
list.Height.Set(400, 0);
list.ListPadding = 14;
Append(list);

AddSortOption("Default Sort", (evt, elm) => ItemSorting.SortChest());
AddSortOption("Default sort", (evt, elm) => ItemSorting.SortChest());
AddSortOption("Sort by ID", (evt, elm) => Sort(x => x.netID, _reversed));
AddSortOption("Sort by name", (evt, elm) => Sort(x => x.Name, _reversed));
AddSortOption("Sort by rarity", (evt, elm) => Sort(x => x.rare, !_reversed));
AddSortOption("Sort by stack size", (evt, elm) => Sort(x => x.stack, !_reversed));
AddSortOption("Sort by value", (evt, elm) => Sort(x => x.value, !_reversed));
AddSortOption("Sort by Damage", (evt, elm) => Sort(x => x.damage, !_reversed));
AddSortOption("Sort by Defense", (evt, elm) => Sort(x => x.defense, !_reversed));
AddSortOption("Sort by damage", (evt, elm) => Sort(x => x.damage, !_reversed));
AddSortOption("Sort by defense", (evt, elm) => Sort(x => x.defense, !_reversed));

}

Expand Down
2 changes: 1 addition & 1 deletion build.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
displayName = Better Chests
author = NotLe0n
version = 0.1
version = 0.4
hideCode = false
hideResources = false
includeSource = false
Expand Down

0 comments on commit 88aa86d

Please sign in to comment.