Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Arsenal - Favorites System #9307

Merged
merged 42 commits into from
Aug 20, 2023
Merged

Conversation

LinkIsGrim
Copy link
Contributor

@LinkIsGrim LinkIsGrim commented Aug 5, 2023

When merged this pull request will:

  • Add a favorites system to the arsenal.
  • Make FUNC(refresh) public, add parameter to skip updating current/unique items.
  • Fix tooltips for the menu bar not showing unless a button or the menu bar area was clicked last (hovering over the buttons will kill search bar focus, though).

Default mode can be controlled by CBA Setting, so can the highlight color. I'd go for icons instead but we'd have to either overwrite mod icons if an item is favorited or make left panel a listnbox as well (and it would be cluttered on the right panel unless its width was increased).

EDIT: Now that this works, I've tried out using icons. The ones available in vanilla look ugly as sin, and clutter is still a problem, particularly with magazine names.

107410_20230805151855_1

Favorites can be added/removed by double clicking an item while holding left shift and are saved to profileNamespace.
Still works with sorting/searching.
Current items (including inventory) are also displayed in favorites, without the highlight color.

107410_20230805172642_1

107410_20230805172700_1

Favorites are always saved in lowercase to prevent them being affected by configCase changes (mod pack changes or updates).

IMPORTANT

  • If the contribution affects the documentation, please include your changes in this pull request so the documentation will appear on the website.
  • Development Guidelines are read, understood and applied.
  • Title of this PR uses our standard template Component - Add|Fix|Improve|Change|Make|Remove {changes}.

@LinkIsGrim LinkIsGrim added the kind/feature Release Notes: **ADDED:** label Aug 5, 2023
@@ -19,6 +19,9 @@
#define ASCENDING 0
#define DESCENDING 1

// Favorites
#define FAVORITES_COLOR (GVAR(favoritesColor) + [1])
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since alpha is modified for the right panel (in case the item doesn't fit), I opted for this solution instead, but it's a bit dirty.

@LinkIsGrim
Copy link
Contributor Author

That should be all the bugs handled (besides the search bar losing focus if you hover over a button in the menu bar).

@PabstMirror PabstMirror added this to the 3.16.0 milestone Aug 20, 2023
@LinkIsGrim LinkIsGrim merged commit d33a158 into acemod:master Aug 20, 2023
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/feature Release Notes: **ADDED:**
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants