Jump to content

ForgeSlider class not working as expected


Recommended Posts

Hello, I’m currently making a GUI for my small mod and tried to implement the ForgeSlider class. Everything works fine, the slider is rendering, I can click it to change the value, however I can’t drag the mouse while clicking down to move the slider knob. I have tried many things from changing the version from 1.19.2 to 1.19.4 -> same issue. I also tried to change the value in the onDrag() function, that didn’t work as well.

All I do in my screen class is

- make a new ForgeSlider variable

- initialize and assign the slider in the init()

- render the slider in the render()

What I also noticed is that when I create a class that inherits from the ForgeSlider and override the onDrag the function is not even called.

Is this intended or is it a bug, and if so how can I fix it?

(Forge version 43.2.10 but it also applies to the 1.19.4 version)


EDIT: a few minutes after this post I found the answer. Turns out google search is just trash and I should’ve searched on the forums xD

Edited by Flof
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Create New...

Important Information

By using this site, you agree to our Terms of Use.