Welcome on MasterOf13FPS! MasterOf13FPS

Register today or sign up if you are already a member and never miss any cool content again :)

How to make in click gui scrollable module list?

SageDEV

New member
Joined
Dec 29, 2020
Messages
180
Reaction score
38
Points
0
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.
 
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
 
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
just float posY = (my value) + offset??
 
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

🤦

 
je ne sais pas
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
 
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
I searching the scroll code, and not found it...
 
shape1
shape2
shape3
shape4
shape5
shape6
Back
Top