-
Notifications
You must be signed in to change notification settings - Fork 739
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
maptools - Improve behaviour upon first open (show under mouse position instead of bottom-left corner) #8848
maptools - Improve behaviour upon first open (show under mouse position instead of bottom-left corner) #8848
Conversation
Don't show the map tools at the bottom-left corner of the map when you first open it, but right where your mouse is.
With this PR, if you open the map tool, close it, move the map, then reopen the map tool, will it be at the previous position, or will it open at the new mouse position on the map? |
It will open at the previous position, just as the map tool always did. see
|
Would you be willing to add a setting move it back to mouse position each time it's opened? |
https://github.com/acemod/ACE3/blob/master/addons/maptools/CfgVehicles.hpp#L35 (lines 35 and 42) |
Well I would need to get acquainted with settings first. (I haven't done any modding yet. This is my first PR) What kind of config method did you have in mind?
The more I think of it, the more I think it's best to keep it simple. Meaning that I could rework it to always be centered when it is toggled to be shown. What do you think of that? 🙂 |
I will give it a go. Thanks 🙂 |
Yeah that's fine by me, I'd like it to always move to mouse, so my suggestion it be a setting was just in case other people didn't want that. Pabst's code should be good. Although I'd suggest renaming the variable, since now it won't just be on the first opening. Maybe something like
https://cbateam.github.io/CBA_A3/docs/files/settings/fnc_addSetting-sqf.html If you did want to do a setting, instead of adding a bool in [
QGVAR(moveToMouse), "CHECKBOX",
[LSTRING(moveToMouse_displayName), LSTRING(moveToMouse_description)],
_category,
true,
0
] call CBA_fnc_addSetting; strings in <Key ID="STR_ACE_MapTools_moveToMouse_displayName">
<English>Always open map tool to mouse position.</English>
</Key>
<Key ID="STR_ACE_MapTools_moveToMouse_description">
<English>By default the map tool will only move to mouse position the first time it is opened, enable this to move it every time it's opened.</English>
</Key> Then you'd have a bool called |
incorporated feedback from co-authors Co-Authored-By: Drofseh <Drofseh@users.noreply.github.com> Co-Authored-By: PabstMirror <pabstmirror@gmail.com>
Thanks @Drofseh for the advice here. :-) |
One minor thing I noticed is the tool only shows after moving the mouse We should just move the logic to fnc_updateMapToolMarkers around line 21
I can do this if it sounds ok |
Yes that would be awesome. I am kind of embarrassed that it is that simple to change it, because I really tried to find the proper place for the code in order to not need the mouse to be moved. But I guess I am just not familiar enough with SQF and the entire Arma and ACE API yet. 😊 I am more than happy with you doing it. 🙂 |
When merged this pull request will:
IMPORTANT
- does not affect the documentation of Map Tools
- sorry no; such a small change does not justify reading through all of that :-/
Component - Add|Fix|Improve|Change|Make|Remove {changes}
.