MCPcopy Create free account
hub / github.com/FabricMC/Matcher / setup

Method setup

src/main/java/matcher/gui/menu/UidMenu.java:74–93  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

72 }
73
74 private void setup() {
75 Dialog<UidConfig> dialog = new Dialog<>();
76 //dialog.initModality(Modality.APPLICATION_MODAL);
77 dialog.setResizable(true);
78 dialog.setTitle("UID Setup");
79 dialog.getDialogPane().getButtonTypes().addAll(ButtonType.OK, ButtonType.CANCEL);
80
81 Node okButton = dialog.getDialogPane().lookupButton(ButtonType.OK);
82
83 UidSetupPane content = new UidSetupPane(Config.getUidConfig(), dialog.getOwner(), okButton);
84 dialog.getDialogPane().setContent(content);
85 dialog.setResultConverter(button -> button == ButtonType.OK ? content.createConfig() : null);
86
87 dialog.showAndWait().ifPresent(newConfig -> {
88 if (!newConfig.isValid()) return;
89
90 Config.setUidConfig(newConfig);
91 Config.saveAsLast();
92 });
93 }
94
95 private void importMatches(DoubleConsumer progressConsumer) {
96 UidConfig config = Config.getUidConfig();

Callers 1

initMethod · 0.95

Calls 6

getUidConfigMethod · 0.95
createConfigMethod · 0.95
setUidConfigMethod · 0.95
saveAsLastMethod · 0.95
getOwnerMethod · 0.65
isValidMethod · 0.45

Tested by

no test coverage detected