Skip to content

Commit

Permalink
[Fix]: #12
Browse files Browse the repository at this point in the history
  • Loading branch information
MinRi2 committed Feb 11, 2024
1 parent 3fcba66 commit b47cc9d
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion src/MinerTools/ui/settings/MSettingsDialog.java
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,18 @@
import arc.scene.ui.*;
import arc.scene.ui.layout.*;
import mindustry.gen.*;
import mindustry.ui.*;

public class MSettingsDialog extends Dialog{
private final Table buttons;
private final ScrollPane pane;
public MSettingsMenu menu;

public MSettingsDialog(){
menu = MinerVars.ui.settings;

buttons = new Table();
pane = new ScrollPane(menu, Styles.noBarPane);

buttons.bottom();

Expand All @@ -31,7 +35,12 @@ private void rebuild(){
clearChildren();

menu.rebuild();
stack(menu, buttons).width(Core.scene.getWidth() * (3f / 4f)).growY();

Cell<?> cell = stack(pane, buttons).grow();

if(Core.scene.getWidth() >= 1920f / 2f){
cell.maxWidth(Core.scene.getWidth() * 3f / 4f);
}
}

@Override
Expand Down

0 comments on commit b47cc9d

Please sign in to comment.