- Notifications
You must be signed in to change notification settings - Fork 330
CHANGE: Deprecate useIMGUIEditorForAssets #2283
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
base: develop
Are you sure you want to change the base?
Conversation
PR Reviewer Guide 🔍Here are some key observations to aid the review process:
🤖 Helpful? Please react with 👍/👎 | Questions❓Please reach out in Slack #ask-u-pr-agent |
| private const string tolltip = "Determine which axis 'wins' if both are actuated at the same time. " | ||
| + "If 'Neither' is selected, the result is 0 (or, more precisely, " | ||
| + "the midpoint between minValue and maxValue)."); | ||
| | ||
| public override void OnGUI() | ||
| { | ||
| if (!InputSystem.settings.useIMGUIEditorForAssets) | ||
| return; | ||
| | ||
| target.whichSideWins = (AxisComposite.WhichSideWins)EditorGUILayout.EnumPopup(m_WhichAxisWinsLabel, target.whichSideWins); | ||
| } | ||
| + "the midpoint between minValue and maxValue)."; | ||
| | ||
| public override void OnDrawVisualElements(VisualElement root, Action onChangedCallback) | ||
| { | ||
| var modeField = new EnumField(m_WhichAxisWinsLabel.text, target.whichSideWins) | ||
| var modeField = new EnumField(label, target.whichSideWins) | ||
| { | ||
| tooltip = m_WhichAxisWinsLabel.tooltip | ||
| tooltip = tolltip | ||
| }; |
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.
Suggestion: The constant name tolltip contains a typo. It should be corrected to tooltip. For better clarity and to avoid confusion with the VisualElement.tooltip property, consider renaming it to tooltipText. [general, importance: 6]
| private const string tolltip = "Determine which axis 'wins' if both are actuated at the same time. " | |
| + "If 'Neither' is selected, the result is 0 (or, more precisely, " | |
| + "the midpoint between minValue and maxValue)."); | |
| public override void OnGUI() | |
| { | |
| if (!InputSystem.settings.useIMGUIEditorForAssets) | |
| return; | |
| target.whichSideWins = (AxisComposite.WhichSideWins)EditorGUILayout.EnumPopup(m_WhichAxisWinsLabel, target.whichSideWins); | |
| } | |
| + "the midpoint between minValue and maxValue)."; | |
| public override void OnDrawVisualElements(VisualElement root, Action onChangedCallback) | |
| { | |
| var modeField = new EnumField(m_WhichAxisWinsLabel.text, target.whichSideWins) | |
| var modeField = new EnumField(label, target.whichSideWins) | |
| { | |
| tooltip = m_WhichAxisWinsLabel.tooltip | |
| tooltip = tolltip | |
| }; | |
| private const string tooltipText = "Determine which axis 'wins' if both are actuated at the same time. " | |
| + "If 'Neither' is selected, the result is 0 (or, more precisely, " | |
| + "the midpoint between minValue and maxValue)."; | |
| public override void OnDrawVisualElements(VisualElement root, Action onChangedCallback) | |
| { | |
| var modeField = new EnumField(label, target.whichSideWins) | |
| { | |
| tooltip = tooltipText | |
| }; |
🤖 Helpful? Please react with 👍/👎 | Questions❓Please reach out in Slack #ask-u-pr-agent
| private const string tooltip = "How to synthesize a Vector2 from the inputs. Digital " | ||
| + "treats part bindings as buttons (on/off) whereas Analog preserves " | ||
| + "floating-point magnitudes as read from controls."); | ||
| | ||
| public override void OnGUI() | ||
| { | ||
| if (!InputSystem.settings.useIMGUIEditorForAssets) | ||
| return; | ||
| | ||
| target.mode = (Vector2Composite.Mode)EditorGUILayout.EnumPopup(m_ModeLabel, target.mode); | ||
| } | ||
| + "floating-point magnitudes as read from controls."; | ||
| | ||
| public override void OnDrawVisualElements(VisualElement root, Action onChangedCallback) | ||
| { | ||
| var modeField = new EnumField(m_ModeLabel.text, target.mode) | ||
| var modeField = new EnumField(label, target.mode) | ||
| { | ||
| tooltip = m_ModeLabel.tooltip | ||
| tooltip = tooltip | ||
| }; |
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.
Suggestion: The assignment tooltip = tooltip is confusing as it relies on C# scoping rules to differentiate between the class constant and the VisualElement property. To improve readability and consistency with other parts of the PR, rename the tooltip constant to tooltipText. [general, importance: 6]
| private const string tooltip = "How to synthesize a Vector2 from the inputs. Digital " | |
| + "treats part bindings as buttons (on/off) whereas Analog preserves " | |
| + "floating-point magnitudes as read from controls."); | |
| public override void OnGUI() | |
| { | |
| if (!InputSystem.settings.useIMGUIEditorForAssets) | |
| return; | |
| target.mode = (Vector2Composite.Mode)EditorGUILayout.EnumPopup(m_ModeLabel, target.mode); | |
| } | |
| + "floating-point magnitudes as read from controls."; | |
| public override void OnDrawVisualElements(VisualElement root, Action onChangedCallback) | |
| { | |
| var modeField = new EnumField(m_ModeLabel.text, target.mode) | |
| var modeField = new EnumField(label, target.mode) | |
| { | |
| tooltip = m_ModeLabel.tooltip | |
| tooltip = tooltip | |
| }; | |
| private const string tooltipText = "How to synthesize a Vector2 from the inputs. Digital " | |
| + "treats part bindings as buttons (on/off) whereas Analog preserves " | |
| + "floating-point magnitudes as read from controls."; | |
| public override void OnDrawVisualElements(VisualElement root, Action onChangedCallback) | |
| { | |
| var modeField = new EnumField(label, target.mode) | |
| { | |
| tooltip = tooltipText | |
| }; |
🤖 Helpful? Please react with 👍/👎 | Questions❓Please reach out in Slack #ask-u-pr-agent
Description
Please fill this section with a description what the pull request is trying to address and what changes were made.
Testing status & QA
Please describe the testing already done by you and what testing you request/recommend QA to execute. If you used or created any testing project please link them here too for QA.
Overall Product Risks
Please rate the potential complexity and halo effect from low to high for the reviewers. Note down potential risks to specific Editor branches if any.
Comments to reviewers
Please describe any additional information such as what to focus on, or historical info for the reviewers.
Checklist
Before review:
Changed,Fixed,Addedsections.Area_CanDoX,Area_CanDoX_EvenIfYIsTheCase,Area_WhenIDoX_AndYHappens_ThisIsTheResult.During merge:
NEW: ___.FIX: ___.DOCS: ___.CHANGE: ___.RELEASE: 1.1.0-preview.3.