Skip to content

Commit

Permalink
Small Update
Browse files Browse the repository at this point in the history
  • Loading branch information
isHarryh committed Feb 13, 2024
1 parent 903fb96 commit 72784a6
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 19 deletions.
12 changes: 6 additions & 6 deletions assets/UI/Main.css
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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;
Expand Down
28 changes: 15 additions & 13 deletions desktop/src/cn/harryh/arkpets/controllers/ModelsModule.java
Original file line number Diff line number Diff line change
Expand Up @@ -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<AssetItem> cell : searchModelView.getItems())
if (recentSelected.equals(cell.getItem())) {
searchModelView.scrollTo(cell);
searchModelView.getSelectionModel().select(cell);
}
}
// Setup filter pane
filterTagSet = FXCollections.observableSet();
filterTagSet.addListener((SetChangeListener<String>)change -> {
Expand Down Expand Up @@ -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<AssetItem> 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());
Expand Down
1 change: 1 addition & 0 deletions docs/scripts/ExePacking.iss
Original file line number Diff line number Diff line change
Expand Up @@ -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"

0 comments on commit 72784a6

Please sign in to comment.