()
| 170 | } |
| 171 | |
| 172 | private void initSetup() { |
| 173 | this.gui.setMinecraftPath(Minecraft.getMinecraftPath()); |
| 174 | this.updatedMinecraftPath(); |
| 175 | this.gui.setEditedTextFieldMinecraftPath(this::updatedMinecraftPath); |
| 176 | |
| 177 | // steam path |
| 178 | this.gui.setSourcePath(Steam.getSteamPath()); |
| 179 | this.updateDisplayForSteam(); |
| 180 | this.gui.setEditedTextFieldSourcePath(this::updateDisplayForSteam); |
| 181 | |
| 182 | this.gui.setSelectMinecraftPath(path -> { |
| 183 | File newPath = this.changePath(new File(path)); |
| 184 | this.gui.setMinecraftPath(newPath); |
| 185 | Periphery.CONFIG.setMinecraftPath(newPath); |
| 186 | Periphery.write(); |
| 187 | }); |
| 188 | |
| 189 | this.gui.setSelectSourcePath(path -> { |
| 190 | File newPath = this.changePath(new File(path)); |
| 191 | this.gui.setSourcePath(newPath); |
| 192 | Periphery.CONFIG.setSteamPath(newPath); |
| 193 | Periphery.write(); |
| 194 | }); |
| 195 | } |
| 196 | |
| 197 | private void updatedMinecraftPath() { |
| 198 | String minecraftPathString = this.gui.getMincraftPath(); |
no test coverage detected