forked from BVengo/sound-controller
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathVolumeListWidget.java
More file actions
36 lines (29 loc) · 1.15 KB
/
Copy pathVolumeListWidget.java
File metadata and controls
36 lines (29 loc) · 1.15 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
package com.bvengo.soundcontroller.gui;
import net.fabricmc.api.EnvType;
import net.fabricmc.api.Environment;
import net.minecraft.client.Minecraft;
import net.minecraft.client.gui.components.ContainerObjectSelectionList;
import net.minecraft.client.gui.screens.options.OptionsSubScreen;
/**
* The list widget that contains all the individual records. Contains a list of {@link VolumeWidgetEntry}.
*/
@Environment(value=EnvType.CLIENT)
public class VolumeListWidget extends ContainerObjectSelectionList<VolumeWidgetEntry> {
private static final int rowWidth = VolumeWidgetEntry.totalWidth;
private static final int rowHeight = 25;
public VolumeListWidget(Minecraft client, int width, int i, OptionsSubScreen optionsScreen) {
super(client, width, optionsScreen.layout.getContentHeight(), optionsScreen.layout.getHeaderHeight(), rowHeight);
this.centerListVertically = false;
}
public void addWidgetEntry(VolumeWidgetEntry widget) {
this.addEntry(widget);
}
@Override
public int getRowWidth() {
return rowWidth;
}
@Override
public void clearEntries() {
super.clearEntries();
}
}