Skip to content

Arsenal Stats - Add support for multiline text#9856

Merged
LinkIsGrim merged 14 commits intoacemod:masterfrom
DartRuffian:arsenal-multilineStats
Sep 9, 2024
Merged

Arsenal Stats - Add support for multiline text#9856
LinkIsGrim merged 14 commits intoacemod:masterfrom
DartRuffian:arsenal-multilineStats

Conversation

@DartRuffian
Copy link
Copy Markdown
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
Copy Markdown
Member

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
Copy Markdown
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
Copy Markdown
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 DartRuffian force-pushed the arsenal-multilineStats branch from 101b26c to 56b150d Compare July 19, 2024 01:14
@DartRuffian
Copy link
Copy Markdown
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.

@DartRuffian DartRuffian force-pushed the arsenal-multilineStats branch from 651a3b7 to e2a2f08 Compare August 31, 2024 05:12
@Walthzer
Copy link
Copy Markdown
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
Copy Markdown
Member

#9771 has a reference implementation if you need

@Walthzer
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
Member

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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
Contributor

Walthzer commented Sep 1, 2024

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

@DartRuffian
Copy link
Copy Markdown
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
Comment thread .hemtt/project.toml Outdated
Comment thread addons/arsenal/ACE_Arsenal_Stats.hpp Outdated
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
Copy Markdown
Member

@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).

Comment thread addons/arsenal/functions/fnc_handleStats.sqf Outdated
Comment thread addons/arsenal/functions/fnc_handleStats.sqf Outdated
Comment thread addons/arsenal/functions/fnc_handleStats.sqf Outdated
Comment thread addons/arsenal/ui/RscAttributes.hpp
@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
@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