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 Stats - Add support for multiline text #9856

Merged
merged 14 commits into from
Sep 9, 2024

Conversation

DartRuffian
Copy link
Contributor

@DartRuffian DartRuffian commented Mar 14, 2024

When merged this pull request will:

  • Title

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}.

TODO

  • Add support for returning array of data as stat text statement
  • Resize stat controls based on text statement result
  • Fix stat result text being slightly offset after switching to RscTextMulti

@DartRuffian DartRuffian marked this pull request as draft March 14, 2024 02:18
@LinkIsGrim
Copy link
Contributor

You'll need to use ctrlTextHeight and ctrlSetPositionH liberally on the stats box/controls and offset the actions box accordingly (though the actions box can just have ctrlPositionY = ctrlPositionY statsBox + ctrlPositionH statsBox + offset, if it's not already exactly that).

@DartRuffian
Copy link
Contributor Author

You'll need to use ctrlTextHeight and ctrlSetPositionH liberally on the stats box/controls and offset the actions box accordingly (though the actions box can just have ctrlPositionY = ctrlPositionY statsBox + ctrlPositionH statsBox + offset, if it's not already exactly that).

Alright, I'll try that out, thanks

@DartRuffian
Copy link
Contributor Author

Something I noticed is that RscTextMulti seems to add some offset to the text, as its now no longer vertically centered with the bar.
107410_20240321174644_1

@DartRuffian DartRuffian changed the title Arsenal - Add Support for Multiline Stat Text Statements Arsenal Stats - Add support for multiline text Mar 28, 2024
@DartRuffian
Copy link
Contributor Author

I added an idc for statsStaticBackground2 since I was needed one for the main background. It can be removed but I figured it wouldn't do any harm to just add one for both backgrounds.

@Walthzer
Copy link
Contributor

Walthzer commented Sep 1, 2024

Quickly threw something together, needs a bit of cleaning. Is this what you are trying to do?
image

@LinkIsGrim
Copy link
Contributor

#9771 has a reference implementation if you need

@Walthzer
Copy link
Contributor

Walthzer commented Sep 1, 2024

Replaced row counting with control tracking as in #9771
Working on the phantom doubled bars rn.
Also arsenalActions defaults to row heights of (5 * GRID_H) but arsenalStats uses (4 * GRID_H)? 🤔
image

@Walthzer
Copy link
Contributor

Walthzer commented Sep 1, 2024

Been a long time since I last used git in a situation like this. How do I open a PR on DarkRuffians fork again? So he can import the changes to this PR. 🤦‍♂️

@LinkIsGrim
Copy link
Contributor

Been a long time since I last used git in a situation like this. How do I open a PR on DarkRuffians fork again? So he can import the changes to this PR. 🤦‍♂️

Open a PR @ https://github.com/DartRuffian/ACE3/pulls and point to branch arsenal-multilineStats

@DartRuffian
Copy link
Contributor Author

Thanks for helping with the PR
I was on and off on this for a while because I thought I'd make some progress and then hit a different block

@DartRuffian
Copy link
Contributor Author

Not sure if you can mark it as ready (if it is), if not just let me know and I can mark it

@Walthzer
Copy link
Contributor

Walthzer commented Sep 1, 2024

Thanks for helping with the PR I was on and off on this for a while because I thought I'd make some progress and then hit a different block

Happy to help. UI is annoying to get into, but after you get the hang of it, its pretty straight forward. Actually spend more time trying to open a PR then making the changes. 😢

@Walthzer
Copy link
Contributor

Walthzer commented Sep 1, 2024

I can't mark it, but it should be ready.

@DartRuffian
Copy link
Contributor Author

Happy to help. UI is annoying to get into, but after you get the hang of it, its pretty straight forward. Actually spend more time trying to open a PR then making the changes. 😢

I've messed with it before, most advanced thing I did was was just a basic bar that animated downwards based on a value.

@DartRuffian DartRuffian marked this pull request as ready for review September 1, 2024 20:44
.hemtt/project.toml Outdated Show resolved Hide resolved
addons/arsenal/ACE_Arsenal_Stats.hpp Outdated Show resolved Hide resolved
DartRuffian and others added 3 commits September 1, 2024 19:39
Co-authored-by: Grim <69561145+LinkIsGrim@users.noreply.github.com>
Co-authored-by: Grim <69561145+LinkIsGrim@users.noreply.github.com>
Copy link
Contributor

@LinkIsGrim LinkIsGrim left a comment

Choose a reason for hiding this comment

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

Just so HEMTT doesn't yell. Code LGTM, need to test (weekend).

addons/arsenal/functions/fnc_handleStats.sqf Outdated Show resolved Hide resolved
addons/arsenal/functions/fnc_handleStats.sqf Outdated Show resolved Hide resolved
addons/arsenal/functions/fnc_handleStats.sqf Outdated Show resolved Hide resolved
@LinkIsGrim LinkIsGrim added the kind/enhancement Release Notes: **IMPROVED:** label Sep 9, 2024
@LinkIsGrim LinkIsGrim added this to the 3.18.0 milestone Sep 9, 2024
@LinkIsGrim LinkIsGrim merged commit 8c582f1 into acemod:master Sep 9, 2024
4 checks passed
@DartRuffian DartRuffian deleted the arsenal-multilineStats branch September 10, 2024 23:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/enhancement Release Notes: **IMPROVED:**
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants