()
| 230 | } |
| 231 | |
| 232 | @FXML |
| 233 | void initialize() { |
| 234 | assert pauseButton != null : "fx:id=\"pauseButton\" was not injected: check your FXML file 'Metacheat.fxml'."; |
| 235 | assert searchStartAddressField != null : "fx:id=\"searchStartAddressField\" was not injected: check your FXML file 'Metacheat.fxml'."; |
| 236 | assert searchEndAddressField != null : "fx:id=\"searchEndAddressField\" was not injected: check your FXML file 'Metacheat.fxml'."; |
| 237 | assert memoryViewPane != null : "fx:id=\"memoryViewPane\" was not injected: check your FXML file 'Metacheat.fxml'."; |
| 238 | assert searchTypesTabPane != null : "fx:id=\"searchTypesTabPane\" was not injected: check your FXML file 'Metacheat.fxml'."; |
| 239 | assert searchValueField != null : "fx:id=\"searchValueField\" was not injected: check your FXML file 'Metacheat.fxml'."; |
| 240 | assert searchTypeByte != null : "fx:id=\"searchTypeByte\" was not injected: check your FXML file 'Metacheat.fxml'."; |
| 241 | assert searchSize != null : "fx:id=\"searchSize\" was not injected: check your FXML file 'Metacheat.fxml'."; |
| 242 | assert searchTypeWord != null : "fx:id=\"searchTypeWord\" was not injected: check your FXML file 'Metacheat.fxml'."; |
| 243 | assert searchTypeSigned != null : "fx:id=\"searchTypeSigned\" was not injected: check your FXML file 'Metacheat.fxml'."; |
| 244 | assert searchChangeNoneOption != null : "fx:id=\"searchChangeNoneOption\" was not injected: check your FXML file 'Metacheat.fxml'."; |
| 245 | assert changeSearchType != null : "fx:id=\"changeSearchType\" was not injected: check your FXML file 'Metacheat.fxml'."; |
| 246 | assert searchChangeAnyOption != null : "fx:id=\"searchChangeAnyOption\" was not injected: check your FXML file 'Metacheat.fxml'."; |
| 247 | assert searchChangeLessOption != null : "fx:id=\"searchChangeLessOption\" was not injected: check your FXML file 'Metacheat.fxml'."; |
| 248 | assert searchChangeGreaterOption != null : "fx:id=\"searchChangeGreaterOption\" was not injected: check your FXML file 'Metacheat.fxml'."; |
| 249 | assert searchChangeByOption != null : "fx:id=\"searchChangeByOption\" was not injected: check your FXML file 'Metacheat.fxml'."; |
| 250 | assert searchChangeByField != null : "fx:id=\"searchChangeByField\" was not injected: check your FXML file 'Metacheat.fxml'."; |
| 251 | assert searchStatusLabel != null : "fx:id=\"searchStatusLabel\" was not injected: check your FXML file 'Metacheat.fxml'."; |
| 252 | assert searchResultsListView != null : "fx:id=\"searchResultsListView\" was not injected: check your FXML file 'Metacheat.fxml'."; |
| 253 | assert watchesPane != null : "fx:id=\"watchesPane\" was not injected: check your FXML file 'Metacheat.fxml'."; |
| 254 | assert snapshotsListView != null : "fx:id=\"snapshotsListView\" was not injected: check your FXML file 'Metacheat.fxml'."; |
| 255 | assert codeInspectorAddress != null : "fx:id=\"codeInspectorAddress\" was not injected: check your FXML file 'Metacheat.fxml'."; |
| 256 | assert codeInspectorWriteList != null : "fx:id=\"codeInspectorWriteList\" was not injected: check your FXML file 'Metacheat.fxml'."; |
| 257 | assert codeInspectorReadList != null : "fx:id=\"codeInspectorReadList\" was not injected: check your FXML file 'Metacheat.fxml'."; |
| 258 | assert cheatsTableView != null : "fx:id=\"cheatsTableView\" was not injected: check your FXML file 'Metacheat.fxml'."; |
| 259 | |
| 260 | isRetina = Screen.getPrimary().getDpi() >= 110; |
| 261 | |
| 262 | Emulator.withComputer(c -> c.getRunningProperty().addListener((val, oldVal, newVal) -> |
| 263 | Platform.runLater(() -> pauseButton.setText(newVal ? "Pause" : "Resume")) |
| 264 | )); |
| 265 | |
| 266 | searchTypesTabPane.getTabs().get(0).setUserData(SearchType.VALUE); |
| 267 | searchTypesTabPane.getTabs().get(1).setUserData(SearchType.CHANGE); |
| 268 | searchTypesTabPane.getTabs().get(2).setUserData(SearchType.TEXT); |
| 269 | searchTypesTabPane.getSelectionModel().selectedItemProperty().addListener((prop, oldVal, newVal) -> { |
| 270 | if (cheatEngine != null) { |
| 271 | cheatEngine.setSearchType((SearchType) newVal.getUserData()); |
| 272 | } |
| 273 | }); |
| 274 | |
| 275 | searchChangeAnyOption.setUserData(SearchChangeType.ANY_CHANGE); |
| 276 | searchChangeByOption.setUserData(SearchChangeType.AMOUNT); |
| 277 | searchChangeGreaterOption.setUserData(SearchChangeType.GREATER); |
| 278 | searchChangeLessOption.setUserData(SearchChangeType.LESS); |
| 279 | searchChangeNoneOption.setUserData(SearchChangeType.NO_CHANGE); |
| 280 | changeSearchType.selectedToggleProperty().addListener((ObservableValue<? extends Toggle> val, Toggle oldVal, Toggle newVal) -> { |
| 281 | if (cheatEngine != null) { |
| 282 | cheatEngine.setSearchChangeType((SearchChangeType) newVal.getUserData()); |
| 283 | } |
| 284 | }); |
| 285 | |
| 286 | searchTypeByte.setUserData(true); |
| 287 | searchTypeWord.setUserData(false); |
| 288 | searchSize.selectedToggleProperty().addListener((ObservableValue<? extends Toggle> val, Toggle oldVal, Toggle newVal) -> { |
| 289 | if (cheatEngine != null) { |
no test coverage detected