Jump to content

[1.15.2] Scroll button not working


Sleepwalkerx

Recommended Posts

List scroll button not working in my Scene. As an example, I took "ModListSceen" and did everything the same as there, but when I click on the scroll bar, nothing works. Please, help.
Here is my code:

public class EntityListWidget extends ExtendedList<EntityListWidget.Entry>{



    private final ResourceLocation img = new ResourceLocation(ArchitectsDream.MODID, "textures/item/dark_dust.png");

    //private final int listWidth;



    public EntityListWidget(Minecraft mcIn, int width, int height, int top, int bottom) {

        super(mcIn, width, height, top, bottom, mcIn.fontRenderer.FONT_HEIGHT * 2 + 8);

        //this.listWidth = listWidth;

    }

    public void addEntryTo(String str){

        addEntry(new Entry(str));

    }

    public class Entry extends ExtendedList.AbstractListEntry<Entry> {

        private final String text;



        public Entry(String text){

            this.text = text;

        }

        @Override

        public void render(

            int entryIdx, int top, int left, 

            int entryWidth, int entryHeight, int mouseX, 

            int mouseY, boolean p_194999_5_, 

            float partialTicks

        ){

            minecraft.fontRenderer.drawString(text, left + 2f, top + 2f, 0xFFFFFF);

            //AbstractGui.blit(getLeft() + 10, top + 20, 0, 0, 16, 16, 64, 16);

        }

    }

}

I also initialize and render my list. It's worth noting that scrolling the mouse wheel works.

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.

Guest
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.