Skip to content

Commit 4e2ac48

Browse files
Adjusted UI positioning & layering
1 parent 1829254 commit 4e2ac48

File tree

5 files changed

+62
-61
lines changed

5 files changed

+62
-61
lines changed

BossChecklist.csproj

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<Project Sdk="Microsoft.NET.Sdk">
3-
<Import Project="../tModLoader.targets" />
3+
<Import Project="..\tModLoader.targets" />
44
<PropertyGroup>
55
<AssemblyName>BossChecklist</AssemblyName>
6-
<TargetFramework>net5.0</TargetFramework>
6+
<TargetFramework>net6.0</TargetFramework>
77
<PlatformTarget>AnyCPU</PlatformTarget>
88
<LangVersion>latest</LangVersion>
99
</PropertyGroup>

BossLogUI.cs

+40-40
Original file line numberDiff line numberDiff line change
@@ -91,23 +91,23 @@ public bool BossLogVisible {
9191
if (value) {
9292
Append(BookArea);
9393
Append(ToCTab);
94-
Append(CreditsTab);
9594
Append(filterPanel);
9695
Append(BossTab);
9796
Append(MiniBossTab);
9897
Append(EventTab);
98+
Append(CreditsTab);
9999
Append(PageOne);
100100
Append(PageTwo);
101101
}
102102
else {
103-
RemoveChild(ToCTab);
103+
RemoveChild(PageTwo);
104+
RemoveChild(PageOne);
104105
RemoveChild(CreditsTab);
105-
RemoveChild(filterPanel);
106-
RemoveChild(BossTab);
107-
RemoveChild(MiniBossTab);
108106
RemoveChild(EventTab);
109-
RemoveChild(PageOne);
110-
RemoveChild(PageTwo);
107+
RemoveChild(MiniBossTab);
108+
RemoveChild(BossTab);
109+
RemoveChild(filterPanel);
110+
RemoveChild(ToCTab);
111111
RemoveChild(BookArea);
112112
}
113113
bossLogVisible = value;
@@ -154,10 +154,10 @@ public override void OnInitialize() {
154154
eventNavTexture = ModContent.Request<Texture2D>("BossChecklist/Resources/Nav_Event");
155155
filterTexture = ModContent.Request<Texture2D>("BossChecklist/Resources/Nav_Filter");
156156

157-
checkMarkTexture = ModContent.Request<Texture2D>("BossChecklist/Resources/Checks_Check");
158-
xTexture = ModContent.Request<Texture2D>("BossChecklist/Resources/Checks_X");
159-
circleTexture = ModContent.Request<Texture2D>("BossChecklist/Resources/Checks_Next");
160-
checkboxTexture = ModContent.Request<Texture2D>("BossChecklist/Resources/Checks_Box");
157+
checkMarkTexture = ModContent.Request<Texture2D>("BossChecklist/Resources/Checks_Check", AssetRequestMode.ImmediateLoad);
158+
xTexture = ModContent.Request<Texture2D>("BossChecklist/Resources/Checks_X", AssetRequestMode.ImmediateLoad);
159+
circleTexture = ModContent.Request<Texture2D>("BossChecklist/Resources/Checks_Next", AssetRequestMode.ImmediateLoad);
160+
checkboxTexture = ModContent.Request<Texture2D>("BossChecklist/Resources/Checks_Box", AssetRequestMode.ImmediateLoad);
161161
chestTexture = ModContent.Request<Texture2D>("BossChecklist/Resources/Checks_Chest");
162162
starTexture = ModContent.Request<Texture2D>("BossChecklist/Resources/Checks_Star");
163163
goldChestTexture = ModContent.Request<Texture2D>("BossChecklist/Resources/Checks_GoldChest");
@@ -261,7 +261,7 @@ public override void OnInitialize() {
261261
scrollTwo = new BossLogUIElements.FixedUIScrollbar();
262262
scrollTwo.SetView(100f, 1000f);
263263
scrollTwo.Top.Pixels = 50f;
264-
scrollTwo.Left.Pixels = -28;
264+
scrollTwo.Left.Pixels = -13;
265265
scrollTwo.Height.Set(-24f, 0.75f);
266266
scrollTwo.HAlign = 1f;
267267

@@ -270,7 +270,7 @@ public override void OnInitialize() {
270270
};
271271
PageTwo.Width.Pixels = 375;
272272
PageTwo.Height.Pixels = 480;
273-
PageTwo.Left.Pixels = (Main.screenWidth / 2) - 400 + 800 - PageTwo.Width.Pixels;
273+
PageTwo.Left.Pixels = (Main.screenWidth / 2) - 415 + 800 - PageTwo.Width.Pixels;
274274
PageTwo.Top.Pixels = (Main.screenHeight / 2) - 250 + 12;
275275

276276
pageTwoItemList = new UIList();
@@ -318,13 +318,13 @@ public override void OnInitialize() {
318318
};
319319
NextPage.Width.Pixels = 14;
320320
NextPage.Height.Pixels = 20;
321-
NextPage.Left.Pixels = PageTwo.Width.Pixels - (int)(NextPage.Width.Pixels * 3);
321+
NextPage.Left.Pixels = PageTwo.Width.Pixels + 15 - (int)(NextPage.Width.Pixels * 3);
322322
NextPage.Top.Pixels = 416;
323323
NextPage.OnClick += PageChangerClicked;
324324
PageTwo.Append(NextPage);
325325

326326
hardmodeList = new UIList();
327-
hardmodeList.Left.Pixels = 4;
327+
hardmodeList.Left.Pixels = 19;
328328
hardmodeList.Top.Pixels = 44;
329329
hardmodeList.Width.Pixels = PageOne.Width.Pixels - 60;
330330
hardmodeList.Height.Pixels = PageOne.Height.Pixels - 136;
@@ -333,30 +333,30 @@ public override void OnInitialize() {
333333
recordButton = new SubpageButton("Mods.BossChecklist.BossLog.DrawnText.Records");
334334
recordButton.Width.Pixels = PageTwo.Width.Pixels / 2 - 24;
335335
recordButton.Height.Pixels = 25;
336-
recordButton.Left.Pixels = 0;
336+
recordButton.Left.Pixels = 15;
337337
recordButton.Top.Pixels = 15;
338338
recordButton.OnClick += (a, b) => UpdateSubPage(0);
339339
recordButton.OnRightDoubleClick += (a, b) => ResetStats();
340340

341341
spawnButton = new SubpageButton("Mods.BossChecklist.BossLog.DrawnText.SpawnInfo");
342342
spawnButton.Width.Pixels = PageTwo.Width.Pixels / 2 - 24;
343343
spawnButton.Height.Pixels = 25;
344-
spawnButton.Left.Pixels = PageTwo.Width.Pixels / 2 - 8;
344+
spawnButton.Left.Pixels = PageTwo.Width.Pixels / 2 - 8 + 15;
345345
spawnButton.Top.Pixels = 15;
346346
spawnButton.OnClick += (a, b) => UpdateSubPage(1);
347347

348348
lootButton = new SubpageButton("Mods.BossChecklist.BossLog.DrawnText.LootCollect");
349-
lootButton.Width.Pixels = PageTwo.Width.Pixels / 2 - 24;
349+
lootButton.Width.Pixels = PageTwo.Width.Pixels / 2 - 24 + 15;
350350
lootButton.Height.Pixels = 25;
351-
lootButton.Left.Pixels = PageTwo.Width.Pixels / 2 - lootButton.Width.Pixels / 2 - 16;
351+
lootButton.Left.Pixels = PageTwo.Width.Pixels / 2 - lootButton.Width.Pixels / 2;
352352
lootButton.Top.Pixels = 50;
353353
lootButton.OnClick += (a, b) => UpdateSubPage(2);
354354
lootButton.OnRightDoubleClick += RemoveItem;
355355

356356
toolTipButton = new SubpageButton("Disclaimer");
357357
toolTipButton.Width.Pixels = 32;
358358
toolTipButton.Height.Pixels = 32;
359-
toolTipButton.Left.Pixels = PageTwo.Width.Pixels - toolTipButton.Width.Pixels - 30;
359+
toolTipButton.Left.Pixels = PageTwo.Width.Pixels - toolTipButton.Width.Pixels;
360360
toolTipButton.Top.Pixels = 100;
361361
toolTipButton.OnClick += (a, b) => SwapRecordPage();
362362

@@ -375,7 +375,7 @@ public override void Update(GameTime gameTime) {
375375
BookArea.Top.Pixels = (Main.screenHeight / 2) - (478 / 2) - 6;
376376
PageOne.Left.Pixels = (Main.screenWidth / 2) - 400 + 20;
377377
PageOne.Top.Pixels = (Main.screenHeight / 2) - 250 + 12;
378-
PageTwo.Left.Pixels = (Main.screenWidth / 2) - 400 + 800 - PageTwo.Width.Pixels;
378+
PageTwo.Left.Pixels = (Main.screenWidth / 2) - 415 + 800 - PageTwo.Width.Pixels;
379379
PageTwo.Top.Pixels = (Main.screenHeight / 2) - 250 + 12;
380380

381381
// Updating tabs to proper positions
@@ -768,15 +768,15 @@ private void OpenSpawn() {
768768
message.Width.Set(-34f, 1f);
769769
message.Height.Set(-370f, 1f);
770770
message.Top.Set(85f, 0f);
771-
message.Left.Set(-10f, 0f);
771+
message.Left.Set(5f, 0f);
772772
//message.PaddingRight = 30;
773773
PageTwo.Append(message);
774774

775775
scrollTwo = new BossLogUIElements.FixedUIScrollbar();
776776
scrollTwo.SetView(100f, 1000f);
777777
scrollTwo.Top.Set(91f, 0f);
778778
scrollTwo.Height.Set(-382f, 1f);
779-
scrollTwo.Left.Set(-20, 0f);
779+
scrollTwo.Left.Set(-5, 0f);
780780
scrollTwo.HAlign = 1f;
781781
PageTwo.Append(scrollTwo);
782782
message.SetScrollbar(scrollTwo);
@@ -790,7 +790,7 @@ private void OpenSpawn() {
790790
type = "Event";
791791
}
792792
UIText info = new UIText(Language.GetTextValue($"Mods.BossChecklist.BossLog.DrawnText.NoSpawn{type}"));
793-
info.Left.Pixels = (PageTwo.Width.Pixels / 2) - (FontAssets.MouseText.Value.MeasureString(info.Text).X / 2) - 20;
793+
info.Left.Pixels = (PageTwo.Width.Pixels / 2) - (FontAssets.MouseText.Value.MeasureString(info.Text).X / 2) - 5;
794794
info.Top.Pixels = 300;
795795
PageTwo.Append(info);
796796
return;
@@ -827,7 +827,7 @@ private void OpenSpawn() {
827827
spawnItemSlot.Height.Pixels = 50;
828828
spawnItemSlot.Width.Pixels = 50;
829829
spawnItemSlot.Top.Pixels = 230;
830-
spawnItemSlot.Left.Pixels = 33 + (56 * 2);
830+
spawnItemSlot.Left.Pixels = 48 + (56 * 2);
831831
PageTwo.Append(spawnItemSlot);
832832

833833
int row = 0;
@@ -839,7 +839,7 @@ private void OpenSpawn() {
839839
ingList.Height.Pixels = 50;
840840
ingList.Width.Pixels = 50;
841841
ingList.Top.Pixels = 240 + (48 * (row + 1));
842-
ingList.Left.Pixels = 5 + (48 * col);
842+
ingList.Left.Pixels = 20 + (48 * col);
843843
PageTwo.Append(ingList);
844844
col++;
845845
if (k == 6) {
@@ -865,7 +865,7 @@ private void OpenSpawn() {
865865
craftItem.Height.Pixels = 50;
866866
craftItem.Width.Pixels = 50;
867867
craftItem.Top.Pixels = 240 + (48 * (row + 2));
868-
craftItem.Left.Pixels = 5;
868+
craftItem.Left.Pixels = 20;
869869
PageTwo.Append(craftItem);
870870
}
871871
else if (requiredTiles.Count > 0) {
@@ -893,7 +893,7 @@ private void OpenSpawn() {
893893
tileList.Height.Pixels = 50;
894894
tileList.Width.Pixels = 50;
895895
tileList.Top.Pixels = 240 + (48 * (row + 2));
896-
tileList.Left.Pixels = 5 + (48 * l);
896+
tileList.Left.Pixels = 20 + (48 * l);
897897
PageTwo.Append(tileList);
898898
}
899899
}
@@ -903,7 +903,7 @@ private void OpenSpawn() {
903903
Id = "PrevItem"
904904
};
905905
PrevItem.Top.Pixels = 245;
906-
PrevItem.Left.Pixels = 125;
906+
PrevItem.Left.Pixels = 140;
907907
PrevItem.Width.Pixels = 14;
908908
PrevItem.Height.Pixels = 20;
909909
PrevItem.OnClick += ChangeSpawnItem;
@@ -915,7 +915,7 @@ private void OpenSpawn() {
915915
Id = "NextItem"
916916
};
917917
NextItem.Top.Pixels = 245;
918-
NextItem.Left.Pixels = 203;
918+
NextItem.Left.Pixels = 218;
919919
NextItem.Width.Pixels = 14;
920920
NextItem.Height.Pixels = 20;
921921
NextItem.OnClick += ChangeSpawnItem;
@@ -927,7 +927,7 @@ private void OpenSpawn() {
927927
Id = "CycleItem_" + TotalRecipes
928928
};
929929
CycleItem.Top.Pixels = 245;
930-
CycleItem.Left.Pixels = 40;
930+
CycleItem.Left.Pixels = 55;
931931
CycleItem.Width.Pixels = 22;
932932
CycleItem.Height.Pixels = 22;
933933
CycleItem.OnClick += ChangeSpawnItem;
@@ -940,7 +940,7 @@ private void OpenSpawn() {
940940
}
941941

942942
UIText ModdedRecipe = new UIText(recipeMessage, 0.8f);
943-
ModdedRecipe.Left.Pixels = -5;
943+
ModdedRecipe.Left.Pixels = 10;
944944
ModdedRecipe.Top.Pixels = 205;
945945
PageTwo.Append(ModdedRecipe);
946946
}
@@ -989,7 +989,7 @@ private void OpenLoot() {
989989
};
990990
lootTable.Height.Pixels = 50;
991991
lootTable.Width.Pixels = 50;
992-
lootTable.Left.Pixels = (col * 56);
992+
lootTable.Left.Pixels = (col * 56) + 15;
993993
lootTable.OnRightDoubleClick += RemoveItem;
994994
newRow.Append(lootTable);
995995
col++;
@@ -1029,7 +1029,7 @@ private void OpenLoot() {
10291029
};
10301030
lootTable.Height.Pixels = 50;
10311031
lootTable.Width.Pixels = 50;
1032-
lootTable.Left.Pixels = (col * 56);
1032+
lootTable.Left.Pixels = (col * 56) + 15;
10331033
lootTable.OnRightDoubleClick += RemoveItem;
10341034
newRow.Append(lootTable);
10351035
col++;
@@ -1097,7 +1097,7 @@ private void OpenCollect() {
10971097
};
10981098
collectionTable.Height.Pixels = 50;
10991099
collectionTable.Width.Pixels = 50;
1100-
collectionTable.Left.Pixels = (56 * (col));
1100+
collectionTable.Left.Pixels = (col * 56) + 15;
11011101
collectionTable.OnRightDoubleClick += RemoveItem;
11021102
newRow.Append(collectionTable);
11031103
col++;
@@ -1225,15 +1225,15 @@ private void UpdateCredits() {
12251225
}
12261226
}
12271227

1228-
pageTwoItemList.Left.Pixels = 15;
1228+
pageTwoItemList.Left.Pixels = 30;
12291229
pageTwoItemList.Top.Pixels = 75;
12301230
pageTwoItemList.Width.Pixels = PageTwo.Width.Pixels - 66;
12311231
pageTwoItemList.Height.Pixels = PageTwo.Height.Pixels - 75 - 80;
12321232
pageTwoItemList.Clear();
12331233

12341234
scrollTwo.SetView(10f, 1000f);
12351235
scrollTwo.Top.Pixels = 90;
1236-
scrollTwo.Left.Pixels = -24;
1236+
scrollTwo.Left.Pixels = 5;
12371237
scrollTwo.Height.Set(-60f, 0.75f);
12381238
scrollTwo.HAlign = 1f;
12391239

@@ -1257,7 +1257,7 @@ private void UpdateCredits() {
12571257
brokenPanel.Height.Pixels = 220;
12581258
brokenPanel.Width.Pixels = 340;
12591259
brokenPanel.Top.Pixels = 120;
1260-
brokenPanel.Left.Pixels = 3;
1260+
brokenPanel.Left.Pixels = 18;
12611261
PageTwo.Append(brokenPanel);
12621262

12631263
FittedTextPanel brokenDisplay = new FittedTextPanel(Language.GetTextValue("Mods.BossChecklist.BossLog.DrawnText.NoModsSupported"));
@@ -1315,7 +1315,7 @@ private void ResetBothPages() {
13151315
scrollTwo = new BossLogUIElements.FixedUIScrollbar();
13161316
scrollTwo.SetView(100f, 1000f);
13171317
scrollTwo.Top.Pixels = 50f;
1318-
scrollTwo.Left.Pixels = -28;
1318+
scrollTwo.Left.Pixels = -13;
13191319
scrollTwo.Height.Set(-24f, 0.75f);
13201320
scrollTwo.HAlign = 1f;
13211321

@@ -1380,7 +1380,7 @@ private void ResetPageButtons() {
13801380
toolTipButton = new SubpageButton("");
13811381
toolTipButton.Width.Pixels = 32;
13821382
toolTipButton.Height.Pixels = 32;
1383-
toolTipButton.Left.Pixels = PageTwo.Width.Pixels - toolTipButton.Width.Pixels - 30;
1383+
toolTipButton.Left.Pixels = PageTwo.Width.Pixels - toolTipButton.Width.Pixels - 15;
13841384
toolTipButton.Top.Pixels = 86;
13851385
toolTipButton.OnClick += (a, b) => SwapRecordPage();
13861386
PageTwo.Append(toolTipButton);

Localization/en-US.hjson

+5-5
Original file line numberDiff line numberDiff line change
@@ -78,21 +78,21 @@ Mods: {
7878
BossLog: {
7979
HoverText: {
8080
ToggleFilters: Toggle Filters
81-
JumpTOC: Jump to Table of Contents
82-
JumpCred: Jump to Credits
81+
JumpTOC: Table of Contents
82+
JumpCred: Credits
8383
JumpBoss:
8484
'''
85-
Jump to next boss:
85+
Next Boss:
8686
{0}
8787
'''
8888
JumpMini:
8989
'''
90-
Jump to next mini boss:
90+
Next Mini-boss:
9191
{0}
9292
'''
9393
JumpEvent:
9494
'''
95-
Jump to next event:
95+
Next Event:
9696
{0}
9797
'''
9898
ViewCollect: Click to view collectibles only

Properties/launchSettings.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@
44
"commandName": "Executable",
55
"executablePath": "dotnet",
66
"commandLineArgs": "$(tMLPath)",
7-
"workingDirectory": "$(TerrariaSteamPath)"
7+
"workingDirectory": "$(tMLSteamPath)"
88
},
99
"TerrariaServer": {
1010
"commandName": "Executable",
1111
"executablePath": "dotnet",
1212
"commandLineArgs": "$(tMLServerPath)",
13-
"workingDirectory": "$(TerrariaSteamPath)"
13+
"workingDirectory": "$(tMLSteamPath)"
1414
}
1515
}
1616
}

0 commit comments

Comments
 (0)