-
Notifications
You must be signed in to change notification settings - Fork 37
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
Roles: Improved wheel menu role selection. #179
base: development
Are you sure you want to change the base?
Roles: Improved wheel menu role selection. #179
Conversation
fd5b258
to
25dc83a
Compare
25dc83a
to
fa65e38
Compare
call vn_mf_fnc_apply_unit_traits; | ||
|
||
call vn_mf_fnc_action_trait; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
these are handled by the call to vn_mf_fnc_change_team
within para_player_init_server.sqf
after a double check, this might cause an issue for missions if player spawn location when joining a server is not in range of a duty officer?
// ./mission/functions/core/teams/fn_change_team.sqf
// ...
if (vn_mf_duty_officers inAreaArray [getPos _player, 20, 20, 0, false, 20] isEqualTo []) exitWith {
["TaskFailed",["","STR_vn_mf_needdutyofficer"]] remoteExecCall ["para_c_fnc_show_notification",_player];
false
};
I think having the button in the wheel but greyed out/disabled would be better UX, keeping buttons in same place is important for muscle memory etc. |
Hmmm. I see what you're saying. I feel like just having it disabled / greyed out would still be confusing: "why is it grey..? why can't i select it...?" What do you think about
That way there's natural feedback for the user about what "greyed out" means in the wheel menu. I'm a fan of explicit UI messages as it saves on having to write user guides. |
I'd make the roles already assigned to the player visually distinct by either greying them out or marking them with an indicator, such as a lock icon. Additionally, when a player tries to select an already assigned role, I'd display a small pop-up or notification explaining why the role is unavailable. This way the UI remains intuitive, prevents redundancy, and provides clear feedback, enhancing overall user experience while keeping the functionality simple and responsive. |
|
||
// save changes to array and push to all players | ||
missionNamespace setVariable ["vn_mf_traits_map", _current_traits_map]; | ||
publicVariable "vn_mf_traits_map"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if player was not allowed to take a role, pruning disconnected players changes to vn_mf_traits_map
would not have been broadcast.
Role icons are now brightly highlighted and wheel menu option border is white when the player already has the role, wheel menu text displays "Remove XXXXXX Training" and clicking the option will remove the role from the player's traits. New notification added which indicates to the player the training has been removed successfully.
Adding a role is basically the inverse. Icons are "dull", wheel menu text shows "Add XXXXXX Training" and the "Training Complete" notification is shown.
Because players can only have one role selected at a time, there's also now "Swapping" logic when a player tries to add a new trait when they already have one selected. As before, removes the existing trait then sets the new trait as active. But now there's an explicit "Training Swapped" notification.
Wheel menu highlighted roles are are also updated after changing teams. If a team has default training roles configured, players will see those default options as highlighted and be able to remove them.
Additional changes
fn_change_team.sqf
.fn_apply_unit_traits.sqf
changes.vn_mf_traits_map
variable broadcast updates could be missed when pruning null/disconnected players and not subsequently updating a player's rolesExtra Screenshots
Previously selected roles now have wheel menu text explicitly indicating the option removes the role
Not allowed the training as role limit is set to zero for this team in teams.hpp
Too many players in the team already have the role (this was simulated by disabling the logic for the screenshot above, hence the 0/0 count)