This is the testing Godot forums! All forum posts unique to this forum will be deleted! Please use the main forums here for any posts you want to keep. All forum rules still apply.

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?


  • MegalomaniakMegalomaniak Posts: 2,580Admin

    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,580Admin

    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

Rich Text Editor. To edit a paragraph's style, hit tab to get to the paragraph menu. From there you will be able to pick one style. Nothing defaults to paragraph. An inline formatting menu will show up when you select text. Hit tab to get into that menu. Some elements, such as rich link embeds, images, loading indicators, and error messages may get inserted into the editor. You may navigate to these using the arrow keys inside of the editor and delete them with the delete or backspace key.