forked from CCBlueX/LiquidBounce
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Features (in tablist): * More limits control: * 1 <= TabSize <= 1000 * 1 <= ColumnHeight <= 1000 * Highlight (with color customization) * Self * Friends * Accurate latency (numerical latency) * Visibility * Header * Footer * Sorting * Vanilla * Ping (less -> more) * NameLength (min -> max) * Alphabetical * ReverseAlphabetical * None
- Loading branch information
1 parent
496e6be
commit 2821033
Showing
11 changed files
with
245 additions
and
3 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
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
70 changes: 70 additions & 0 deletions
70
src/main/kotlin/net/ccbluex/liquidbounce/features/module/modules/misc/ModuleBetterTab.kt
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 |
---|---|---|
@@ -0,0 +1,70 @@ | ||
package net.ccbluex.liquidbounce.features.module.modules.misc | ||
|
||
import net.ccbluex.liquidbounce.config.types.Configurable | ||
import net.ccbluex.liquidbounce.config.types.NamedChoice | ||
import net.ccbluex.liquidbounce.config.types.ToggleableConfigurable | ||
import net.ccbluex.liquidbounce.features.module.Category | ||
import net.ccbluex.liquidbounce.features.module.ClientModule | ||
import net.ccbluex.liquidbounce.render.engine.Color4b | ||
import net.minecraft.client.network.PlayerListEntry | ||
import net.minecraft.text.Text | ||
|
||
/** | ||
* ModuleBetterTab | ||
* | ||
* @author sqlerrorthing | ||
* @since 12/28/2024 | ||
**/ | ||
object ModuleBetterTab : ClientModule("BetterTab", Category.MISC) { | ||
|
||
init { | ||
treeAll( | ||
Limits, | ||
Visibility, | ||
Highlight, | ||
AccurateLatency, | ||
) | ||
} | ||
|
||
val sorting by enumChoice("Sorting", Sorting.VANILLA) | ||
|
||
object Limits : Configurable("Limits") { | ||
val tabSize by int("TabSize", 80, 1..1000) | ||
val height by int("ColumnHeight", 20, 1..100) | ||
} | ||
|
||
object Visibility : Configurable("Visibility") { | ||
val header by boolean("Header", true) | ||
val footer by boolean("Footer", true) | ||
val nameOnly by boolean("NameOnly", false) | ||
} | ||
|
||
object Highlight : ToggleableConfigurable(ModuleBetterTab, "Highlight", true) { | ||
class HighlightColored(name: String, color: Color4b) : ToggleableConfigurable(this, name, true) { | ||
val color by color("Color", color) | ||
} | ||
|
||
val self = tree(HighlightColored("Self", Color4b(50, 193, 50, 80))) | ||
val friends = tree(HighlightColored("Friends", Color4b(16, 89, 203, 80))) | ||
} | ||
|
||
object AccurateLatency : ToggleableConfigurable(ModuleBetterTab, "AccurateLatency", true) { | ||
val suffix by boolean("AppendMSSuffix", true) | ||
} | ||
} | ||
|
||
@Suppress("unused") | ||
enum class Sorting( | ||
override val choiceName: String, | ||
val comparator: Comparator<PlayerListEntry>? | ||
) : NamedChoice { | ||
VANILLA("Vanilla", null), | ||
PING("Ping", Comparator.comparingInt { it.latency }), | ||
LENGTH("NameLength", Comparator.comparingInt { it.profile.name.length }), | ||
SCORE_LENGTH("DisplayNameLength", Comparator.comparingInt { (it.displayName ?: Text.empty()).string.length }), | ||
ALPHABETICAL("Alphabetical", Comparator.comparing { it.profile.name }), | ||
REVERSE_ALPHABETICAL("ReverseAlphabetical", Comparator.comparing({ it.profile.name }, Comparator.reverseOrder())), | ||
NONE("None", { _, _ -> 0 }) | ||
} | ||
|
||
|
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
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