Skip to content

Automatically select the search field when opening a GameplayTag tree view & Keyboard shortcuts#22

Open
Daxxas wants to merge 2 commits intoBandoWare:mainfrom
Daxxas:qol-search
Open

Automatically select the search field when opening a GameplayTag tree view & Keyboard shortcuts#22
Daxxas wants to merge 2 commits intoBandoWare:mainfrom
Daxxas:qol-search

Conversation

@Daxxas
Copy link

@Daxxas Daxxas commented Feb 16, 2026

This is a quality of life change
Automatically select the search field when opening a GameplayTag tree view here, making it possible to directly type in a search instead of having to click on the field before searching
image

- Added up/down key to navigate through a gameplay tag tree
- Added enter key to select a tag in a tag property
- Added enter key to add/remove a tag in a tag container
@Daxxas Daxxas changed the title Automatically select the search field when opening a GameplayTag tree view Automatically select the search field when opening a GameplayTag tree view & Keyboard shortcuts Mar 3, 2026
RemoveTag(item.Tag);

Repaint(); // Have to repaint or the Toggle GUI is not updated accordingly
}
Copy link
Author

Choose a reason for hiding this comment

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

Code block listening to enter key for a gameplaytag container to add/remove the tag to the container

m_TagNameProperty.serializedObject.ApplyModifiedProperties();

m_OnSelectionChange?.Invoke();
}
Copy link
Author

Choose a reason for hiding this comment

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

Code block listening to the enter key to select a gameplaytag

Reload();

m_SearchField.SetFocus();
m_SearchField.downOrUpArrowKeyPressed += SetFocusAndEnsureSelectedItem;
Copy link
Author

Choose a reason for hiding this comment

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

Select the first treeview item on up/down arrows

@@ -85,6 +85,7 @@ public GameplayTagTreeViewBase(TreeViewState treeViewState)
Reload();

m_SearchField.SetFocus();
Copy link
Author

Choose a reason for hiding this comment

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

Directly set the focus on the search field when opening the dropdown to be able to search directly

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.

1 participant