Skip to content

sub / settings menu haptics update#392

Merged
mtschoen-unity merged 26 commits into
developmentfrom
improvements/stella/submenu-haptics
Dec 9, 2017
Merged

sub / settings menu haptics update#392
mtschoen-unity merged 26 commits into
developmentfrom
improvements/stella/submenu-haptics

Conversation

@stella3d

Copy link
Copy Markdown
Contributor

This adds haptic feedback to all the Toggles that are on the main menu that did not have them.

In the process, i made a base class for the menu toggles and buttons. The events aren't in the base class because working with inherited events proved to not work well. Toggles have simpler hover actions since they don't generally need / have tooltips.

I used a weaker click pulse, because the longer pulse was too long for toggles, it felt like. this one feels good to me.

I also had to update the LocomotionTool's settings UI to use TextMeshPro.

@stella3d

Copy link
Copy Markdown
Contributor Author

this should resolve #383

@dunity dunity left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Changes to this PR should not be addressed currently. They can/should be addressed in December, unless all November tasks have already been completed.

That said the following is my feedback:
*Enabling/Disabling a button at the top-level of the settings face doesn't perform any haptic feedback (the "Feedback Enabled/Disabled" button). However, toggling such a button in the snap-settings sub-face does perform a selection/toggle haptic pulse. Both actions should perform the same haptic pulse.

*Clicking on a disabled button should not perform the toggle/selected haptic pulse. Currently you can click on a disabled button (not interactable), which results in the clicked/selected haptic-pulse being performed, this should not occur. In the snapping-settings sub-menu, when disabling snapping (via the top-button), you can click the disabled buttons below to see this effect in action.

@AndrewTHEManeri AndrewTHEManeri left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Same comments as dylan. This is pretty close


public void OnRayEnter(RayEventData eventData)
{
#if INCLUDE_TEXT_MESH_PRO

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Don't think this is #if block is needed?

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Yeah, there are no TMP references in this entire class. Looks like it's left over from before the refactor to MainMenuSelectable

@mtschoen-unity mtschoen-unity left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Great job! I'm glad someone took a high-level view of all this. As I said, the submenu feature was a means to an end for the Locomotion update, so it was done in haste. MainMenuSelectable was a good call!

Just some #if define stuff

protected TextMeshProUGUI m_Description;
#endif

#if INCLUDE_TEXT_MESH_PRO

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Group these fields in the same #ifdef. I know this was my code but I did it wrong :)


public void OnRayEnter(RayEventData eventData)
{
#if INCLUDE_TEXT_MESH_PRO

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Yeah, there are no TMP references in this entire class. Looks like it's left over from before the refactor to MainMenuSelectable

@stella3d

stella3d commented Dec 8, 2017

Copy link
Copy Markdown
Contributor Author

think that should handle updating to merge with latest dev & PR feedback. removed un-needed if defs.

@dunity

dunity commented Dec 9, 2017

Copy link
Copy Markdown
Contributor

There appear to be conflicts with the SettingsUI prefab & this branch. Please be careful not to overwrite any recent fixes/changes on that prefab when merging latest development.

…ditorVR into improvements/stella/submenu-haptics

# Conflicts:
#	Tools/LocomotionTool/Prefabs/SettingsUI.prefab
#	Tools/SelectionTool/Prefabs/SettingsUI.prefab

Also disable haptics on non-interactable elements and use a MainMenuButton on SubmenuFace back button
@mtschoen-unity

Copy link
Copy Markdown
Collaborator

@dunity I merged in dev, updated TMP on the settings UI that needed it, disabled hovers on non-interactable MenuButtons and MenuToggles, and added hovers to Toggles that aren't on. Basically we check interactable, rather than isOn to block hovers.

I also added a MainMenuButton to the "breadcrumb" that says "Snapping" so that it sends hover/click pulses.

Also deleted unused pulses from MainMenuButton.

Approved on my end. Waiting on @dunity's approval to merge do dev.

@mtschoen-unity

Copy link
Copy Markdown
Collaborator

Manual merge successful. Performing Github merge.

@mtschoen-unity
mtschoen-unity merged commit cb49d03 into development Dec 9, 2017
@mtschoen-unity
mtschoen-unity deleted the improvements/stella/submenu-haptics branch December 9, 2017 06:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants