Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Packages/com.unity.inputsystem/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ however, it has to be formatted properly to pass verification tests.

### Fixed

- Fixed add buttons use add icon in input actions window (ISX-2340)
- Fixed warnings being generated on Unity 6.4 and 6.5. (ISX-2395).
- Fixed extra empty lines being displayed in the control binding list when mouse buttons are pressed [ISXB-1677](https://issuetracker.unity3d.com/product/unity/issues/guid/ISXB-1677)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@
<ui:TextField picking-mode="Ignore" name="rename-text-field" is-delayed="true" focusable="true" class="unity-input-actions-editor-hidden" style="visibility: visible; flex-shrink: 1;" />
<ui:Label text="binding-name" display-tooltip-when-elided="true" name="name" style="flex-grow: 1; justify-content: center; align-items: stretch; margin-left: 4px; -unity-font-style: normal;" />
</ui:VisualElement>
<ui:Button text="+" display-tooltip-when-elided="true" enable-rich-text="false" name="add-new-binding-button" style="opacity: 1; background-color: rgba(255, 255, 255, 0); border-left-color: rgba(255, 255, 255, 0); border-right-color: rgba(255, 255, 255, 0); border-top-color: rgba(255, 255, 255, 0); border-bottom-color: rgba(255, 255, 255, 0); display: none; align-items: flex-end; align-self: auto; flex-direction: row-reverse;" />
<ui:Button display-tooltip-when-elided="true" enable-rich-text="false" name="add-new-binding-button" style="opacity: 1; background-color: rgba(255, 255, 255, 0); border-left-color: rgba(255, 255, 255, 0); border-right-color: rgba(255, 255, 255, 0); border-top-color: rgba(255, 255, 255, 0); border-bottom-color: rgba(255, 255, 255, 0); display: none; align-items: flex-end; align-self: auto; flex-direction: row-reverse;" />
</ui:VisualElement>
</ui:UXML>
Original file line number Diff line number Diff line change
Expand Up @@ -21,18 +21,18 @@
<ui:VisualElement name="action-maps-container" class="body-panel-container actions-container">
<ui:VisualElement name="header" class="body-panel-header">
<ui:Label text="Action Maps" display-tooltip-when-elided="true" style="flex-grow: 1;" />
<ui:Button text="+" display-tooltip-when-elided="true" name="add-new-action-map-button" style="align-items: auto;" />
<ui:Button display-tooltip-when-elided="true" name="add-new-action-map-button" style="align-items: auto; background-color: rgba(255, 255, 255, 0);" />
</ui:VisualElement>
<ui:VisualElement name="body">
<ui:ListView focusable="true" name="action-maps-list-view" />
</ui:VisualElement>
<ui:VisualElement name="rclick-area-to-add-new-action-map" style="flex-direction: column; flex-grow: 1;" />
</ui:VisualElement>
<ui:TwoPaneSplitView name="actions-and-properties-split-view" fixed-pane-index="1" fixed-pane-initial-dimension="320" style="height: auto; min-width: 450px;" view-data-key="actions-editor-splitter-2">
<ui:TwoPaneSplitView name="actions-and-properties-split-view" fixed-pane-index="1" fixed-pane-initial-dimension="320" view-data-key="actions-editor-splitter-2" style="height: auto; min-width: 450px;">
<ui:VisualElement name="actions-container" class="body-panel-container">
<ui:VisualElement name="header" class="body-panel-header" style="justify-content: space-between;">
<ui:Label text="Actions" display-tooltip-when-elided="true" name="actions-label" />
<ui:Button text="+" display-tooltip-when-elided="true" name="add-new-action-button" style="align-items: auto;" />
<ui:Button display-tooltip-when-elided="true" name="add-new-action-button" style="align-items: auto; background-color: rgba(188, 188, 188, 0);" />
</ui:VisualElement>
<ui:VisualElement name="body">
<ui:TreeView view-data-key="unity-tree-view" focusable="true" name="actions-tree-view" show-border="false" reorderable="true" show-alternating-row-backgrounds="None" fixed-item-height="20" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -175,15 +175,33 @@
}

.add-binging-button-dark-theme {
width: 14px;
height: 14px;
background-image: resource('d_Toolbar Plus More.png');
-unity-background-scale-mode: scale-to-fit;
}

.add-binging-button {
width: 14px;
height: 14px;
background-image: resource('Toolbar Plus More.png');
-unity-background-scale-mode: scale-to-fit;
}

.add-button-dark-theme {
width: 18px;
height: 18px;
background-image: resource('d_Toolbar Plus.png');
-unity-background-scale-mode: scale-to-fit;
}

.add-button {
width: 18px;
height: 18px;
background-image: resource('Toolbar Plus.png');
-unity-background-scale-mode: scale-to-fit;
}

.search-field {
display: none;
width: 190px;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
using CmdEvents = UnityEngine.InputSystem.Editor.InputActionsEditorConstants.CommandEvents;
using System.Collections.Generic;
using System.Linq;
using UnityEditor;
using UnityEngine.UIElements;

namespace UnityEngine.InputSystem.Editor
Expand Down Expand Up @@ -65,6 +66,8 @@ public ActionMapsView(VisualElement root, StateContainer stateContainer)
CreateSelector(Selectors.GetActionMapNames, Selectors.GetSelectedActionMap, (actionMapNames, actionMap, state) => new ViewState(actionMap, actionMapNames, state.GetDisabledActionMaps(actionMapNames.ToList())));

m_AddActionMapButton = root.Q<Button>("add-new-action-map-button");
m_AddActionMapButton.AddToClassList(EditorGUIUtility.isProSkin ? "add-button-dark-theme" : "add-button");

m_AddActionMapButton.clicked += AddActionMap;

ContextMenu.GetContextMenuForActionMapsEmptySpace(this, root.Q<VisualElement>("rclick-area-to-add-new-action-map"));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ public ActionsTreeView(VisualElement root, StateContainer stateContainer)
{
m_ActionMapsListView = root.Q<ListView>("action-maps-list-view");
m_AddActionButton = root.Q<Button>("add-new-action-button");
m_AddActionButton.AddToClassList(EditorGUIUtility.isProSkin ? "add-button-dark-theme" : "add-button");
m_PropertiesScrollview = root.Q<ScrollView>("properties-scrollview");
m_ActionsTreeView = root.Q<TreeView>("actions-tree-view");
//assign unique viewDataKey to store treeView states like expanded/collapsed items - make it unique to avoid conflicts with other TreeViews
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,21 +39,24 @@ public PropertiesView(VisualElement root, StateContainer stateContainer)
if (addInteractionButton == null)
{
addInteractionButton = CreateAddButton(interactionsToggle, "add-new-interaction-button");
addInteractionButton.AddToClassList(EditorGUIUtility.isProSkin ? "add-binging-button-dark-theme" : "add-binging-button");

new ContextualMenuManipulator(_ => {}){target = addInteractionButton, activators = {new ManipulatorActivationFilter(){button = MouseButton.LeftMouse}}};
}
var processorToggle = processorsFoldout.Q<Toggle>();
processorToggle.AddToClassList("properties-foldout-toggle");
if (addProcessorButton == null)
{
addProcessorButton = CreateAddButton(processorToggle, "add-new-processor-button");
addProcessorButton.AddToClassList(EditorGUIUtility.isProSkin ? "add-binging-button-dark-theme" : "add-binging-button");

new ContextualMenuManipulator(_ => {}){target = addProcessorButton, activators = {new ManipulatorActivationFilter(){button = MouseButton.LeftMouse}}};
}
}

private TextElement CreateAddButton(Toggle toggle, string name)
{
var addButton = new Button();
addButton.text = "+";
addButton.name = name;
addButton.focusable = false;
#if UNITY_EDITOR_OSX
Expand Down