Skip to content

ISX-1851 Remove title from editor window #1822

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

Closed
wants to merge 10 commits into from
Closed
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
4 changes: 3 additions & 1 deletion Packages/com.unity.inputsystem/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ however, it has to be formatted properly to pass verification tests.
### Changed
- From 2023.2 forward: UI toolkit now uses the "UI" action map of project-wide actions as their default input actions. Previously, the actions were hardcoded and were based on `DefaultInputActions` asset which didn't allow user changes. Also, removing bindings or renaming the 'UI' action map of project wide actions will break UI input for UI toolkit.
- Changed the 'Max player count reached' error to a warning instead.
- Removed "Input Actions" title from UI-Toolkit Input Action Editor when used in a window and not embedded in Project Settings.

### Added
- Added new methods and properties to [`InputAction`](xref:UnityEngine.InputSystem.InputAction):
Expand All @@ -39,7 +40,8 @@ however, it has to be formatted properly to pass verification tests.
- Fixed "Listen" functionality for selecting an input sometimes expecting the wrong input type.
- Fixed console errors that can be produced when opening input package settings from the Inspector.
- Fixed InputManager.asset file growing in size on each Reset call.
- Fixed Opening InputDebugger throws 'Action map must have state at this point' error
- Fixed Opening InputDebugger throws 'Action map must have state at this point' error.
- Fixed Project Settings header title styling for Input Actions editor.

## [1.8.0-pre.2] - 2023-11-09

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,15 @@ private void BuildUI()
rootVisualElement.styleSheets.Add(InputActionsEditorWindowUtils.theme);
var view = new InputActionsEditorView(rootVisualElement, stateContainer);
view.postSaveAction += PostSaveAction;

// Hide header when used as a window since redundant with window title and/or tab title
var element = rootVisualElement.Q("header");
if (element != null)
{
element.style.visibility = Visibility.Hidden;
element.style.display = DisplayStyle.None;
}

stateContainer.Initialize();
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<ui:UXML xmlns:ui="UnityEngine.UIElements" xmlns:uie="UnityEditor.UIElements" xsi="http://www.w3.org/2001/XMLSchema-instance" engine="UnityEngine.UIElements" editor="UnityEditor.UIElements" noNamespaceSchemaLocation="../../../../../UIElementsSchema/UIElements.xsd" editor-extension-mode="True">
<Style src="project://database/Packages/com.unity.inputsystem/InputSystem/Editor/UITKAssetEditor/Resources/InputActionsEditorStyles.uss?fileID=7433441132597879392&amp;guid=7dac9c49a90bca4499371d0adc9b617b&amp;type=3#InputActionsEditorStyles" />
<ui:VisualElement name="header" class="header">
<ui:Label text="Input Actions" display-tooltip-when-elided="true" name="title-label" class="header-label" style="width: auto; margin-left: 0; margin-right: 0; margin-top: 0; margin-bottom: 0;" />
<ui:Label text="Input Actions" display-tooltip-when-elided="true" name="title-label" class="header-label" />
<uie:ToolbarSearchField focusable="true" name="search-actions-text-field" class="search-field" style="display: none;" />
<ui:VisualElement name="asset-menu" style="flex-grow: 0; background-color: rgba(0, 0, 0, 0); width: 16px; flex-shrink: 0; -unity-background-scale-mode: scale-to-fit;" />
</ui:VisualElement>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,14 +52,21 @@
background-color: transparent;
margin-right: 5px;
}
.header {
height: 22px;
flex-direction: row;
margin-left: 10px;
margin-right: 7px;
margin-top: 1px;
margin-bottom: 7px;
}

.header-label {
font-size: 19px;
margin-left: 7px;
margin-right: 7px;
margin-top: 7px;
margin-bottom: 7px;
width: 189px;
-unity-font-style: bold;
margin: 0;
padding: 0;
width: auto;
flex-grow: 1;
}

Expand Down Expand Up @@ -92,15 +99,6 @@
height: 16px;
}

.header {
height: 22px;
flex-direction: row;
margin-left: 13px;
margin-right: 13px;
margin-top: 7px;
margin-bottom: 7px;
}

.body-panel-header {
background-color: var(--unity-colors-toolbar-background);
border-bottom-color: var(--unity-colors-toolbar-border);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,8 @@ private void RenameNewActionMaps()
return;
m_ListView.ScrollToItem(m_ListView.selectedIndex);
var element = m_ListView.GetRootElementForIndex(m_ListView.selectedIndex);
if (element == null)
return;
((InputActionMapsTreeViewItem)element).FocusOnRenameTextField();
m_EnterRenamingMode = false;
}
Expand Down