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:
@@ -14,6 +14,7 @@ public abstract class WidgetSettingOption implements Drawable, Widget {
|
||||
private final Text name;
|
||||
private int x = 0;
|
||||
private int y = 0;
|
||||
private int maxRenderWidth = 200; // this will always be changed before rendering
|
||||
private boolean focused = false;
|
||||
private BooleanSupplier shouldShow = WidgetUtils.TRUE_SUPPLIER;
|
||||
|
||||
@@ -22,6 +23,14 @@ public abstract class WidgetSettingOption implements Drawable, Widget {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public void setMaxRenderWidth(int maxRenderWidth) {
|
||||
this.maxRenderWidth = maxRenderWidth;
|
||||
}
|
||||
|
||||
public int getMaxRenderWidth() {
|
||||
return maxRenderWidth;
|
||||
}
|
||||
|
||||
public final String getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user