I make a clickgui, but i dont know how to make scrollable module list, i know it is using Mouse.getDWheel(); but i dont know, how to use it.. I see sources other clients with scrollable module list, and in each it is done differently.
if (Mouse.hasWheel()) { |
int wheel = Mouse.getDWheel(); |
if (wheel < 0) { |
this.offset += 10; |
if (this.offset < 0) { |
this.offset = 0; |
} |
if (this.offset > 100) { |
this.offset = 100; |
} |
} else if (wheel > 0) { |
this.offset -= 10; |
if (this.offset < 0) { |
this.offset = 0; |
} |
if (this.offset > 100) { |
this.offset = 100; |
} |
} |
} |
just float posY = (my value) + offset??the simplest way to use the mouse.getdwheel is to do something like:
if (Mouse.hasWheel()) { int wheel = Mouse.getDWheel(); if (wheel < 0) { this.offset += 10; if (this.offset < 0) { this.offset = 0; } if (this.offset > 100) { this.offset = 100; } } else if (wheel > 0) { this.offset -= 10; if (this.offset < 0) { this.offset = 0; } if (this.offset > 100) { this.offset = 100; } } }
and use the offset variable to adjust the y amount for whatever you want to scroll
How about just testing it?? it sounds right bruhjust float posY = (my value) + offset??
btw yesterday or for you 10 hours back I have not been at the computer. now i remembered it and going to test.How about just testing it?? it sounds right bruh
it's works for one module only, other modules dont scrolling.How about just testing it?? it sounds right bruh
it's works for one module only, other modules dont scrolling.
WHAT? IF IM DONT KNOW WTF IS THIS IM STUPID??? WHY ALL U TOXICS AND DONT TRY TO HELP NOOBS??????
WHAT? IF IM DONT KNOW WTF IS THIS IM STUPID??? WHY ALL U TOXICS AND DONT TRY TO HELP NOOBS??????
You are writing this on purpose so that I get angry? have a conscience at least, after my message you probably had to think of the point that I was not pleased
why didn't you think about it and tell yourself that i looked in the minecraft code?You are writing this on purpose so that I get angry? have a conscience at least, after my message you probably had to think of the point that I was not pleased
You are writing this on purpose so that I get angry? have a conscience at least, after my message you probably had to think of the point that I was not pleased
maybe because Minecraft code is shit??why didn't you think about it and tell yourself that i looked in the minecraft code?
idkwhy is this so hard
lol you look in the code of the single player vs multiplayer guis you will inevitably find how the scroll works there is nothing hard it's just a variable even minecraft manages to do it be it you who and too stupid to look where just minecraft which and too badly coded for just a scroll i don't knowje ne sais pas
Or maybe you are just simply too trash to understand the minecraft source code..maybe because Minecraft code is shit??
man, why u abusing me? I only quest for scroll, and u want to arrange a conflict?Or maybe you are just simply too trash to understand the minecraft source code..
be human, I just asked about scrolling, no need to strain so much because of my "stupidity"Or maybe you are just simply too trash to understand the minecraft source code..
I searching the scroll code, and not found it...lol you look in the code of the single player vs multiplayer guis you will inevitably find how the scroll works there is nothing hard it's just a variable even minecraft manages to do it be it you who and too stupid to look where just minecraft which and too badly coded for just a scroll i don't know