CCBlueX Forum

    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups

    Solved Binded key in ArrayList

    Support
    6
    27
    326
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • wxdbie
      wxdbie last edited by

      Could please tell how make ArrayList show binded key. Like here:6d76df04-a94d-464e-b6dd-6180cd285f04-изображение.png

      Ali00035 1 Reply Last reply Reply Quote 0
      • Plumer Man
        Plumer Man @wxdbie last edited by Plumer Man

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

        0108bf60-02bb-4f84-a17c-23eb768f1b67-image.png

        wxdbie 2 Replies Last reply Reply Quote 0
        • Ali00035
          Ali00035 Banned @wxdbie last edited by

          @wxdbie okay but why

          wxdbie 1 Reply Last reply Reply Quote 0
          • wxdbie
            wxdbie @Ali00035 last edited by

            @stfwissue ?

            Ali00035 1 Reply Last reply Reply Quote 0
            • Ali00035
              Ali00035 Banned @wxdbie last edited by

              @wxdbie https://github.com/CCBlueX/LiquidBounce/blob/legacy/src/main/java/net/ccbluex/liquidbounce/features/command/commands/BindsCommand.kt

              wxdbie 1 Reply Last reply Reply Quote 0
              • wxdbie
                wxdbie @Ali00035 last edited by

                @stfwissue ty. How to remove "NONE"?:java_FuSl5Ith84.png

                Ali00035 Plumer Man 2 Replies Last reply Reply Quote 0
                • Ali00035
                  Ali00035 Banned @wxdbie last edited by

                  @wxdbie I don't know

                  1 Reply Last reply Reply Quote 0
                  • Plumer Man
                    Plumer Man @wxdbie last edited by Plumer Man

                    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  : "" )
                    
                    Ali00035 wxdbie 3 Replies Last reply Reply Quote 0
                    • Ali00035
                      Ali00035 Banned @Plumer Man last edited by

                      @plumer-man Plumer Man pro gamer and coder 2022

                      1 Reply Last reply Reply Quote 0
                      • wxdbie
                        wxdbie @Plumer Man last edited by

                        @plumer-man ty < 3

                        1 Reply Last reply Reply Quote 0
                        • Topic has been marked as solved  wxdbie wxdbie 
                        • Topic has been marked as unsolved  wxdbie wxdbie 
                        • wxdbie
                          wxdbie @Plumer Man last edited by

                          @plumer-man, how to remove ">" from functions that are not binded key?
                          java_edHXZfM0IS.png

                          modKey = Keyboard.getKeyName(mod.keyBind)
                          
                          var displayName : String = mod.name + modTag + if (modKey != "NONE") " > " + modKey else ""
                          
                          Ali00035 Plumer Man 2 Replies Last reply Reply Quote 0
                          • Ali00035
                            Ali00035 Banned @wxdbie last edited by

                            This post is deleted!
                            wxdbie 1 Reply Last reply Reply Quote 0
                            • wxdbie
                              wxdbie @Ali00035 last edited by

                              @stfwissue It did not work : (

                              Ali00035 1 Reply Last reply Reply Quote 0
                              • Ali00035
                                Ali00035 Banned @wxdbie last edited by

                                @wxdbie I got no idea then 😞

                                1 Reply Last reply Reply Quote 0
                                • Plumer Man
                                  Plumer Man @wxdbie last edited by

                                  Can you send more code samples i cant see anything wronge with the code you sent

                                  wxdbie 1 Reply Last reply Reply Quote 0
                                  • wxdbie
                                    wxdbie @Plumer Man last edited by

                                    @plumer-man

                                    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
                                        }
                                    
                                    CzechHek Plumer Man F 3 Replies Last reply Reply Quote 0
                                    • CzechHek
                                      CzechHek @wxdbie last edited by

                                      @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, ...

                                      wxdbie 1 Reply Last reply Reply Quote 0
                                      • wxdbie
                                        wxdbie @CzechHek last edited by

                                        @czechhek, well how do you make it easy? 😕

                                        1 Reply Last reply Reply Quote 0
                                        • Plumer Man
                                          Plumer Man @wxdbie last edited by Plumer Man

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

                                          0108bf60-02bb-4f84-a17c-23eb768f1b67-image.png

                                          wxdbie 2 Replies Last reply Reply Quote 0
                                          • wxdbie
                                            wxdbie @Plumer Man last edited by

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

                                            1 Reply Last reply Reply Quote 0
                                            • F
                                              funnycatmemes @wxdbie last edited by

                                              @wxdbie bruh learn kotlin

                                              wxdbie 1 Reply Last reply Reply Quote 0
                                              • First post
                                                Last post
                                              About
                                              • Terms of Service
                                              • Privacy Policy
                                              • Status
                                              • Contact Us
                                              Downloads
                                              • Releases
                                              • Source code
                                              • License
                                              Docs
                                              • Tutorials
                                              • CustomHUD
                                              • AutoSettings
                                              • ScriptAPI
                                              Community
                                              • Forum
                                              • Guilded
                                              • YouTube
                                              • Twitter
                                              • D.Tube