Fix: ClickGUI option component offset not synced after layout update

This commit is contained in:
xiaozhou233 committed 2026-08-22 15:59:57 +08:00
1 parent 7a648482ed
commit 7669f995c5
1 file changed
+6
@@ -61,8 +61,11 @@ public class ModuleButton extends Component {
); );
if (expanded) { if (expanded) {
int optionY = 20;
for (OptionComponent option : options) { for (OptionComponent option : options) {
option.setOffsetY(getOffsetY() + optionY);
option.drawScreen(mouseX, mouseY, partialTicks); option.drawScreen(mouseX, mouseY, partialTicks);
optionY += 18;
} }
} }
} }
@@ -80,8 +83,11 @@ public class ModuleButton extends Component {
} }
if (expanded) { if (expanded) {
int optionY = 20;
for (OptionComponent option : options) { for (OptionComponent option : options) {
option.setOffsetY(getOffsetY() + optionY);
option.mouseClicked(mouseX, mouseY, mouseButton); option.mouseClicked(mouseX, mouseY, mouseButton);
optionY += 18;
} }
} }
} }