Skip to content

Commit eed7b92

Browse files
added config to remove new record log glow effects
1 parent 1a3c7cb commit eed7b92

12 files changed

+110
-21
lines changed

Configs.cs

+4
Original file line numberDiff line numberDiff line change
@@ -300,6 +300,10 @@ public bool AllowNewRecords {
300300
}
301301
}
302302

303+
304+
[DefaultValue(true)]
305+
public bool NewRecordLogGlow { get; set; }
306+
303307
[DrawTicks]
304308
[OptionStrings(new string[] { "Standard", "Simple" })]
305309
[DefaultValue("Standard")]

Localization/TranslationsNeeded.txt

+9-9
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
en-US, 314/314, 100%, missing 0
2-
de-DE, 0/314, 0%, missing 314
3-
it-IT, 0/314, 0%, missing 314
4-
fr-FR, 0/314, 0%, missing 314
5-
es-ES, 80/314, 25%, missing 234
6-
ru-RU, 295/314, 94%, missing 19
7-
zh-Hans, 313/314, 100%, missing 1
8-
pt-BR, 61/314, 19%, missing 253
9-
pl-PL, 0/314, 0%, missing 314
1+
en-US, 316/316, 100%, missing 0
2+
de-DE, 0/316, 0%, missing 316
3+
it-IT, 0/316, 0%, missing 316
4+
fr-FR, 0/316, 0%, missing 316
5+
es-ES, 80/316, 25%, missing 236
6+
ru-RU, 295/316, 93%, missing 21
7+
zh-Hans, 313/316, 99%, missing 3
8+
pt-BR, 61/316, 19%, missing 255
9+
pl-PL, 0/316, 0%, missing 316

Localization/de-DE.hjson

+10
Original file line numberDiff line numberDiff line change
@@ -586,6 +586,16 @@ Mods: {
586586
''' */
587587
}
588588

589+
NewRecordLogGlow: {
590+
// Label: Enable New Record Log Glow
591+
/* Tooltip:
592+
'''
593+
When enabled, setting a new record will put a rainbow glow on the following:
594+
- Boss Log button
595+
- Table of Contents entry name
596+
''' */
597+
}
598+
589599
TimeValueFormat: {
590600
// Label: Time Value Format
591601
/* Tooltip:

Localization/en-US.hjson

+10
Original file line numberDiff line numberDiff line change
@@ -586,6 +586,16 @@ Mods: {
586586
'''
587587
}
588588

589+
NewRecordLogGlow: {
590+
Label: Enable New Record Log Glow
591+
Tooltip:
592+
'''
593+
When enabled, setting a new record will put a rainbow glow on the following:
594+
- Boss Log button
595+
- Table of Contents entry name
596+
'''
597+
}
598+
589599
TimeValueFormat: {
590600
Label: Time Value Format
591601
Tooltip:

Localization/es-ES.hjson

+10
Original file line numberDiff line numberDiff line change
@@ -586,6 +586,16 @@ Mods: {
586586
''' */
587587
}
588588

589+
NewRecordLogGlow: {
590+
// Label: Enable New Record Log Glow
591+
/* Tooltip:
592+
'''
593+
When enabled, setting a new record will put a rainbow glow on the following:
594+
- Boss Log button
595+
- Table of Contents entry name
596+
''' */
597+
}
598+
589599
TimeValueFormat: {
590600
// Label: Time Value Format
591601
/* Tooltip:

Localization/fr-FR.hjson

+10
Original file line numberDiff line numberDiff line change
@@ -586,6 +586,16 @@ Mods: {
586586
''' */
587587
}
588588

589+
NewRecordLogGlow: {
590+
// Label: Enable New Record Log Glow
591+
/* Tooltip:
592+
'''
593+
When enabled, setting a new record will put a rainbow glow on the following:
594+
- Boss Log button
595+
- Table of Contents entry name
596+
''' */
597+
}
598+
589599
TimeValueFormat: {
590600
// Label: Time Value Format
591601
/* Tooltip:

Localization/it-IT.hjson

+10
Original file line numberDiff line numberDiff line change
@@ -586,6 +586,16 @@ Mods: {
586586
''' */
587587
}
588588

589+
NewRecordLogGlow: {
590+
// Label: Enable New Record Log Glow
591+
/* Tooltip:
592+
'''
593+
When enabled, setting a new record will put a rainbow glow on the following:
594+
- Boss Log button
595+
- Table of Contents entry name
596+
''' */
597+
}
598+
589599
TimeValueFormat: {
590600
// Label: Time Value Format
591601
/* Tooltip:

Localization/pl-PL.hjson

+10
Original file line numberDiff line numberDiff line change
@@ -586,6 +586,16 @@ Mods: {
586586
''' */
587587
}
588588

589+
NewRecordLogGlow: {
590+
// Label: Enable New Record Log Glow
591+
/* Tooltip:
592+
'''
593+
When enabled, setting a new record will put a rainbow glow on the following:
594+
- Boss Log button
595+
- Table of Contents entry name
596+
''' */
597+
}
598+
589599
TimeValueFormat: {
590600
// Label: Time Value Format
591601
/* Tooltip:

Localization/pt-BR.hjson

+10
Original file line numberDiff line numberDiff line change
@@ -586,6 +586,16 @@ Mods: {
586586
''' */
587587
}
588588

589+
NewRecordLogGlow: {
590+
// Label: Enable New Record Log Glow
591+
/* Tooltip:
592+
'''
593+
When enabled, setting a new record will put a rainbow glow on the following:
594+
- Boss Log button
595+
- Table of Contents entry name
596+
''' */
597+
}
598+
589599
TimeValueFormat: {
590600
// Label: Time Value Format
591601
/* Tooltip:

Localization/ru-RU.hjson

+10
Original file line numberDiff line numberDiff line change
@@ -585,6 +585,16 @@ Mods: {
585585
'''
586586
}
587587

588+
NewRecordLogGlow: {
589+
// Label: Enable New Record Log Glow
590+
/* Tooltip:
591+
'''
592+
When enabled, setting a new record will put a rainbow glow on the following:
593+
- Boss Log button
594+
- Table of Contents entry name
595+
''' */
596+
}
597+
588598
TimeValueFormat: {
589599
Label: Формат временного значения
590600
Tooltip:

Localization/zh-Hans.hjson

+10
Original file line numberDiff line numberDiff line change
@@ -586,6 +586,16 @@ Mods: {
586586
'''
587587
}
588588

589+
NewRecordLogGlow: {
590+
// Label: Enable New Record Log Glow
591+
/* Tooltip:
592+
'''
593+
When enabled, setting a new record will put a rainbow glow on the following:
594+
- Boss Log button
595+
- Table of Contents entry name
596+
''' */
597+
}
598+
589599
TimeValueFormat: {
590600
Label: 时间值格式
591601
Tooltip:

UIElements/BossLogUIElements.cs

+7-12
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,8 @@ internal class OpenLogButton : UIImageButton {
8989
internal bool dragging;
9090
internal Color? borderColor;
9191

92+
PlayerAssist GetModPlayer => Main.LocalPlayer.GetModPlayer<PlayerAssist>();
93+
9294
public OpenLogButton(Asset<Texture2D> texture) : base(texture) {
9395
Width.Pixels = texture.Value.Width;
9496
Height.Pixels = texture.Value.Height;
@@ -126,23 +128,16 @@ public override void RightMouseUp(UIMouseEvent evt) {
126128
}
127129

128130
public override void Update(GameTime gameTime) {
131+
borderColor = null;
129132
// Determine a border color for the button
130133
if (IsMouseHovering || dragging) {
131134
borderColor = Color.Goldenrod; // If hovering over or dragging the button, the book will be highlighted in a gold border
132135
}
133136
else if (!BossChecklist.FeatureConfig.RecordTrackingEnabled || !BossChecklist.FeatureConfig.AllowNewRecords) { // configs can be checked as it is checked from a client
134137
borderColor = Color.Firebrick; // If Records are disabled in any way, the book will be highlighted with a red border
135138
}
136-
else {
137-
PlayerAssist modPlayer = Main.LocalPlayer.GetModPlayer<PlayerAssist>();
138-
if (!modPlayer.hasOpenedTheBossLog || modPlayer.hasNewRecord.Any(x => x == true)) {
139-
Color coverColor = BossChecklist.BossLogConfig.BossLogColor;
140-
float modifier = Main.masterColor / 200f; // If the player has not opened the log or has not viewed a new record page, the book will be hightlighted with a flashing log-colored border
141-
borderColor = new Color(coverColor.R * modifier, coverColor.G * modifier, coverColor.B * modifier);
142-
}
143-
else {
144-
borderColor = null;
145-
}
139+
else if (!GetModPlayer.hasOpenedTheBossLog || (BossChecklist.FeatureConfig.NewRecordLogGlow && GetModPlayer.hasNewRecord.Contains(true))) {
140+
borderColor = Main.DiscoColor;
146141
}
147142

148143
base.Update(gameTime);
@@ -1368,8 +1363,8 @@ public override void Draw(SpriteBatch spriteBatch) {
13681363
Rectangle inner = GetInnerDimensions().ToRectangle();
13691364
Vector2 pos = new Vector2(inner.X - 20, inner.Y - 5);
13701365

1371-
if (entry.IsRecordIndexed(out int recordIndex) && Main.LocalPlayer.GetModPlayer<PlayerAssist>().hasNewRecord[recordIndex])
1372-
this.TextColor = Main.DiscoColor; // constantly updates
1366+
if (BossChecklist.FeatureConfig.NewRecordLogGlow && entry.IsRecordIndexed(out int recordIndex) && GetParentLog.GetModPlayer.hasNewRecord[recordIndex])
1367+
this.TextColor = Main.DiscoColor;
13731368

13741369
// base drawing comes after colors so they do not flicker when updating check list
13751370
base.Draw(spriteBatch);

0 commit comments

Comments
 (0)