Binded key in ArrayList
-
-
You code (this is what i assume you have):
renderString = module.getName() + " - " + module.getTag() +" > " + Keyboard.getKeyName(module.getBind())You could remove the "NONE" by doing this instead
binded = Keyboard.getKeyName(module.getBind()) renderString = module.getName() + " - " + module.getTag() + (binded != "NONE" ? " > " + binded : "" ) -
You code (this is what i assume you have):
renderString = module.getName() + " - " + module.getTag() +" > " + Keyboard.getKeyName(module.getBind())You could remove the "NONE" by doing this instead
binded = Keyboard.getKeyName(module.getBind()) renderString = module.getName() + " - " + module.getTag() + (binded != "NONE" ? " > " + binded : "" )@plumer-man Plumer Man pro gamer and coder 2022
-
You code (this is what i assume you have):
renderString = module.getName() + " - " + module.getTag() +" > " + Keyboard.getKeyName(module.getBind())You could remove the "NONE" by doing this instead
binded = Keyboard.getKeyName(module.getBind()) renderString = module.getName() + " - " + module.getTag() + (binded != "NONE" ? " > " + binded : "" )@plumer-man ty < 3
-
W wxdbie has marked this topic as solved on
-
W wxdbie has marked this topic as unsolved on
-
You code (this is what i assume you have):
renderString = module.getName() + " - " + module.getTag() +" > " + Keyboard.getKeyName(module.getBind())You could remove the "NONE" by doing this instead
binded = Keyboard.getKeyName(module.getBind()) renderString = module.getName() + " - " + module.getTag() + (binded != "NONE" ? " > " + binded : "" )@plumer-man, how to remove ">" from functions that are not binded key?

modKey = Keyboard.getKeyName(mod.keyBind) var displayName : String = mod.name + modTag + if (modKey != "NONE") " > " + modKey else "" -
@plumer-man, how to remove ">" from functions that are not binded key?

modKey = Keyboard.getKeyName(mod.keyBind) var displayName : String = mod.name + modTag + if (modKey != "NONE") " > " + modKey else "" -
@plumer-man, how to remove ">" from functions that are not binded key?

modKey = Keyboard.getKeyName(mod.keyBind) var displayName : String = mod.name + modTag + if (modKey != "NONE") " > " + modKey else ""Can you send more code samples i cant see anything wronge with the code you sent
-
Can you send more code samples i cant see anything wronge with the code you sent
fun getModName(mod: Module): String { var modTag : String = "" var modKey : String = "" if (tags.get() && mod.tag != null) { modTag += " " modKey += " > " if (!tagsArrayColor.get()) modTag += "§f" if (!tagsStyleValue.get().equals("default", true)) modTag += tagsStyleValue.get().get(0).toString() + if (tagsStyleValue.get().equals("-", true) || tagsStyleValue.get().equals("|", true)) " " else "" modTag += mod.tag if (!tagsStyleValue.get().equals("default", true) && !tagsStyleValue.get().equals("-", true) && !tagsStyleValue.get().equals("|", true)) modTag += tagsStyleValue.get().get(1).toString() modKey = Keyboard.getKeyName(mod.keyBind) } var displayName : String = mod.name + modTag + if (modKey != "NONE") " > " + modKey else "" if (lowerCaseValue.get()) displayName = displayName.toLowerCase() return displayName } -
fun getModName(mod: Module): String { var modTag : String = "" var modKey : String = "" if (tags.get() && mod.tag != null) { modTag += " " modKey += " > " if (!tagsArrayColor.get()) modTag += "§f" if (!tagsStyleValue.get().equals("default", true)) modTag += tagsStyleValue.get().get(0).toString() + if (tagsStyleValue.get().equals("-", true) || tagsStyleValue.get().equals("|", true)) " " else "" modTag += mod.tag if (!tagsStyleValue.get().equals("default", true) && !tagsStyleValue.get().equals("-", true) && !tagsStyleValue.get().equals("|", true)) modTag += tagsStyleValue.get().get(1).toString() modKey = Keyboard.getKeyName(mod.keyBind) } var displayName : String = mod.name + modTag + if (modKey != "NONE") " > " + modKey else "" if (lowerCaseValue.get()) displayName = displayName.toLowerCase() return displayName } -
@wxdbie I have a feeling that this isn't the ideal way of implementing such things. Not only it looks more complicated than it is, it is actually much harder to edit, fix, ...
-
fun getModName(mod: Module): String { var modTag : String = "" var modKey : String = "" if (tags.get() && mod.tag != null) { modTag += " " modKey += " > " if (!tagsArrayColor.get()) modTag += "§f" if (!tagsStyleValue.get().equals("default", true)) modTag += tagsStyleValue.get().get(0).toString() + if (tagsStyleValue.get().equals("-", true) || tagsStyleValue.get().equals("|", true)) " " else "" modTag += mod.tag if (!tagsStyleValue.get().equals("default", true) && !tagsStyleValue.get().equals("-", true) && !tagsStyleValue.get().equals("|", true)) modTag += tagsStyleValue.get().get(1).toString() modKey = Keyboard.getKeyName(mod.keyBind) } var displayName : String = mod.name + modTag + if (modKey != "NONE") " > " + modKey else "" if (lowerCaseValue.get()) displayName = displayName.toLowerCase() return displayName }If you went through your code you would see that modKey is only set to the keyboard assosiated value if a tag is present.

-
If you went through your code you would see that modKey is only set to the keyboard assosiated value if a tag is present.

@plumer-man, uh, how right way do it?

-
fun getModName(mod: Module): String { var modTag : String = "" var modKey : String = "" if (tags.get() && mod.tag != null) { modTag += " " modKey += " > " if (!tagsArrayColor.get()) modTag += "§f" if (!tagsStyleValue.get().equals("default", true)) modTag += tagsStyleValue.get().get(0).toString() + if (tagsStyleValue.get().equals("-", true) || tagsStyleValue.get().equals("|", true)) " " else "" modTag += mod.tag if (!tagsStyleValue.get().equals("default", true) && !tagsStyleValue.get().equals("-", true) && !tagsStyleValue.get().equals("|", true)) modTag += tagsStyleValue.get().get(1).toString() modKey = Keyboard.getKeyName(mod.keyBind) } var displayName : String = mod.name + modTag + if (modKey != "NONE") " > " + modKey else "" if (lowerCaseValue.get()) displayName = displayName.toLowerCase() return displayName }@wxdbie bruh learn kotlin
-
@wxdbie bruh learn kotlin
@funnycatmemes learning
-
@funnycatmemes learning
@wxdbie learn more
-
@wxdbie learn more
@freerobuxgen2022, i try
-
If you went through your code you would see that modKey is only set to the keyboard assosiated value if a tag is present.

@plumer-man, thank you, I was able < 3
-
W wxdbie has marked this topic as solved on
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login


