Joypad: press and hold to make slider / Hslider / Vslider continue to change value

CalyadCalyad Posts: 5Member

From what I can see, using a Joypad to press and hold on a slider of any sort doesn't seem to continue to change the value of the slider.

Is there some built-in thing I am missing, and this should work? Like "myslider.magic_undocumented_property = true" or something?

Or is there a very easy workaround?

Answers

  • MegalomaniakMegalomaniak Posts: 2,618Admin

    What type of processing are you using? Frame time processing, physics processing, input processing or what?

    Post your code so we could actually have something to give some feedback on.

  • CalyadCalyad Posts: 5Member

    I didn't have any code on this part. It's all the fresh-out-of-the-box Godot stuff that goes on behind the scenes.

    It's just like when you stick a bunch of UI elements into a brand new scene and have it grab_focus()
    Buttons automagically find neighbors and stuff, and the controller switches between them with the default input map.

    I just did this with some sliders. By default it lets me adjust the values of the sliders with the joypad, but only by one tick per joystick press. I was trying to keep the code additions to a minimum. If there's no "built in press-and-hold" mechanism I'll probably just have other buttons that adjust the sliders by, say, 10 ticks. But I was hoping there was some other "out of the box" code, or line of code, that would accomplish this.

  • MegalomaniakMegalomaniak Posts: 2,618Admin

    Well then I recommend you look into how these different processing types work and pick the one that fits the best. Depending on what you want the slider to control each of them can have their pros and cons.

  • CalyadCalyad Posts: 5Member

    So it sounds like you don't know any built-in property / signal / something that actually allows this, either, then?

    I mean, of course, you can always MAKE things do whatever you want. But I don't want to be like the guy who wrote hundreds of lines of code because he didn't know that setget was a thing.

Leave a Comment

BoldItalicStrikethroughOrdered listUnordered list
Emoji
Image
Align leftAlign centerAlign rightToggle HTML viewToggle full pageToggle lights
Drop image/file