From 72784a6eee68b4e017ee4876553e82fff7616ed3 Mon Sep 17 00:00:00 2001 From: Harry Huang Date: Tue, 13 Feb 2024 20:21:40 +0800 Subject: [PATCH] Small Update --- assets/UI/Main.css | 12 ++++---- .../arkpets/controllers/ModelsModule.java | 28 ++++++++++--------- docs/scripts/ExePacking.iss | 1 + 3 files changed, 22 insertions(+), 19 deletions(-) diff --git a/assets/UI/Main.css b/assets/UI/Main.css index f876e1e9..7cb9bf7a 100644 --- a/assets/UI/Main.css +++ b/assets/UI/Main.css @@ -97,12 +97,6 @@ JFXButton>AnchorPane>SVGPath { -fx-border-color: -theme-color; } -.btn-secondary .btn-icon, -.btn-iconified-secondary .btn-icon { - /* Regular */ - -fx-fill: -theme-color; -} - .btn-iconified-secondary { /* Regular */ -fx-text-fill: -theme-color; @@ -114,6 +108,12 @@ JFXButton>AnchorPane>SVGPath { -fx-border-style: solid; } +.btn-secondary .btn-icon, +.btn-iconified-secondary .btn-icon { + /* Regular */ + -fx-fill: -theme-color; +} + JFXCheckBox { -jfx-checked-color: -theme-color; -jfx-unchecked-color: dimgray; diff --git a/desktop/src/cn/harryh/arkpets/controllers/ModelsModule.java b/desktop/src/cn/harryh/arkpets/controllers/ModelsModule.java index b7498638..37b5d7ad 100644 --- a/desktop/src/cn/harryh/arkpets/controllers/ModelsModule.java +++ b/desktop/src/cn/harryh/arkpets/controllers/ModelsModule.java @@ -431,19 +431,6 @@ public void modelReload(boolean doPopNotice) { Logger.info("ModelManager", "Reloading"); initModelAssets(doPopNotice); initModelSearch(); - modelSearch(""); - // Select recent model - if (assetItemList != null && !modelCellList.isEmpty() && - app.config.character_asset != null && !app.config.character_asset.isEmpty()) { - // Scroll to recent selected model - AssetItem recentSelected = assetItemList.searchByRelPath(app.config.character_asset); - if (recentSelected != null) - for (JFXListCell cell : searchModelView.getItems()) - if (recentSelected.equals(cell.getItem())) { - searchModelView.scrollTo(cell); - searchModelView.getSelectionModel().select(cell); - } - } // Setup filter pane filterTagSet = FXCollections.observableSet(); filterTagSet.addListener((SetChangeListener)change -> { @@ -477,6 +464,21 @@ public void modelReload(boolean doPopNotice) { filterPaneTagFlow.getChildren().add(tag); }); } + // Update model list + modelSearch(""); + // Select recent model + if (assetItemList != null && !modelCellList.isEmpty() && + app.config.character_asset != null && !app.config.character_asset.isEmpty()) { + // Scroll to recent selected model + AssetItem recentSelected = assetItemList.searchByRelPath(app.config.character_asset); + if (recentSelected != null) + for (JFXListCell cell : searchModelView.getItems()) + if (recentSelected.equals(cell.getItem())) { + searchModelView.scrollTo(cell); + searchModelView.getSelectionModel().select(cell); + } + } + toggleFilterPane.getStyleClass().add("btn-noticeable"); // Finish reload loadFailureTip.setVisible(modelCellList.isEmpty()); app.rootModule.launchBtn.setDisable(modelCellList.isEmpty()); diff --git a/docs/scripts/ExePacking.iss b/docs/scripts/ExePacking.iss index ca22d903..cf5ea947 100644 --- a/docs/scripts/ExePacking.iss +++ b/docs/scripts/ExePacking.iss @@ -62,4 +62,5 @@ Type: filesandordirs; Name: "{app}\logs" Type: filesandordirs; Name: "{app}\temp" Type: filesandordirs; Name: "{app}\models" Type: filesandordirs; Name: "{app}\models_enemies" +Type: filesandordirs; Name: "{app}\models_illust" Type: files; Name: "{userstartup}\ArkPetsStartupService.vbs"