mirror of
https://github.com/Shiewk/Widgets.git
synced 2026-04-28 11:34:17 +02:00
Provide maximum recommended width to setting options
This commit is contained in:
+10
-1
@@ -19,12 +19,21 @@ public class WidgetSettingsEditWidget extends ScrollableWidget {
|
||||
private int contentsHeight = 10;
|
||||
public WidgetSettingsEditWidget(int x, int y, int width, int height, TextRenderer textRenderer, ModWidget widget, Runnable onChange) {
|
||||
super(x, y, width, height, Text.empty());
|
||||
this.textRenderer = textRenderer;
|
||||
this.widget = widget;
|
||||
this.textRenderer = textRenderer;
|
||||
this.onChange = onChange;
|
||||
for (WidgetSettingOption customSetting : widget.getSettings().getCustomSettings()) {
|
||||
customSetting.setFocused(false);
|
||||
}
|
||||
setWidth(width);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setWidth(int width) {
|
||||
for (WidgetSettingOption setting : widget.getSettings().getCustomSettings()) {
|
||||
setting.setMaxRenderWidth(width - 10);
|
||||
}
|
||||
super.setWidth(width);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user