mirror of
https://github.com/Shiewk/Widgets.git
synced 2026-04-28 11:34:17 +02:00
Add option to set show condition on widget options
This commit is contained in:
@@ -45,6 +45,7 @@ public class WidgetSettingsEditWidget extends ScrollableWidget {
|
||||
context.getMatrices().pop();
|
||||
int y = textRenderer.fontHeight * 2 + this.height / 50 + 5;
|
||||
for (WidgetSettingOption setting : widget.getSettings().getCustomSettings()) {
|
||||
if (!setting.shouldShow()) continue;
|
||||
if (this.width - setting.getWidth() > textRenderer.getWidth(setting.getName()) + 20){
|
||||
setting.setX(this.getX() + this.width - setting.getWidth() - 5);
|
||||
setting.setY(y);
|
||||
|
||||
Reference in New Issue
Block a user