eros: obfuscated monospace font fixes

This commit is contained in:
Bixilon 2021-10-30 20:47:15 +02:00
parent 2efe05d61b
commit 218eeb08fc
No known key found for this signature in database
GPG Key ID: 5CAD791931B09AC4
2 changed files with 8 additions and 1 deletions

View File

@ -33,7 +33,7 @@ import javafx.util.Duration
open class TextComponent(
message: Any? = "",
override var color: RGBColor? = null,
override val formatting: MutableSet<ChatFormattingCode> = DEFAULT_FORMATTING.toMutableSet(),
override val formatting: MutableSet<ChatFormattingCode> = DEFAULT_FORMATTING.toSynchronizedSet(),
var clickEvent: ClickEvent? = null,
var hoverEvent: HoverEvent? = null,
) : ChatComponent, TextStyle {
@ -117,6 +117,9 @@ open class TextComponent(
}
}
for (formattingCode in this.formatting) {
if (formattingCode == PreChatFormattingCodes.SHADOWED) {
continue
}
stringBuilder.append(ProtocolDefinition.TEXT_COMPONENT_SPECIAL_PREFIX_CHAR)
stringBuilder.append(formattingCode.char)
}

View File

@ -263,3 +263,7 @@
.text-area .content {
-fx-background-color: -secondary-color;
}
.obfuscated {
-fx-font-family: 'monospaced';
}