Skip to content

Commit 463f4ac

Browse files
committed
Add new docs manuals
1 parent 417a70b commit 463f4ac

File tree

3 files changed

+25
-1
lines changed

3 files changed

+25
-1
lines changed

.docfx/manual/index.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
11
# UI Toolkit
22

3-
The UI Toolkit package contains scripts and utilities for creating UI in Unity projects.
3+
The UI Toolkit package contains scripts and utilities for creating UI in Unity projects. The package is intended to solve common problems that arise when developing UI and menus. The package is still early in development, and more scripts will be added over time.
4+
5+
### Reference
6+
7+
- [Menus](menus.md)
8+

.docfx/manual/menus.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# Menus
2+
3+
The UI Toolkit comes with a few scripts to assist in creating UI menus. There are several common problems that arise, especially in regards to menu navigation and controller-support. Generally speaking, basic navigation in menus across any input device can be achieved out-of-box using Unity's EventSystem component; however, this is not always the case.
4+
5+
#### [NavigationStack](xref:Zigurous.UI.NavigationStack)
6+
7+
This script manages a stack of game objects (menus) that you can navigate between. As you navigate to another menu layer or sub-menu, you push the menu's game object onto the stack. Then, when you need to navigate back to the previous menu, you simply pop the game object off the top of the stack. The script can also automatically turn on/off the game objects as they are pushed and popped from the stack. The script also provides an InputAction to handle backwards navigation.
8+
9+
#### [ScrollToSelection](xref:Zigurous.UI.ScrollToSelection)
10+
11+
This script works in conjunction with the EventSystem to handle scrolling a ScrollRect component to the selected game object. For example, when using a controller you usually do not freely scroll menus that display a list of buttons, such as a level select menu. Rather, you simply navigate up and down to the next or previous button, respectively. The ScrollRect will automatically be scrolled to whichever game object is selected.
12+
13+
#### [ScrollWithInput](xref:Zigurous.UI.ScrollWithInput)
14+
15+
For other menus that use a ScrollRect component, you may just want to be able to freely scroll up and down. This may not be supported out of the box for controllers, so this script simply exposes an InputAction that you can bind controls to in order to scroll the menu. There is actually nothing specific to controllers in this script, so you can also use it with any kind of input, but generally mouse+keyboard already works with ScrollRect.

.docfx/manual/toc.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,7 @@
22
href: index.md
33
- name: Installation
44
href: installation.md
5+
- name: Reference
6+
items:
7+
- name: Menus
8+
href: menus.md

0 commit comments

Comments
 (0)