Skip to content

Commit 3fbae5d

Browse files
committed
Fix documentation folder
1 parent 5e65fc1 commit 3fbae5d

15 files changed

Lines changed: 14 additions & 678 deletions

org.mixedrealitytoolkit.theming/~Documentation/Images/ColorThemeItemData.png renamed to org.mixedrealitytoolkit.theming/Documentation~/Images/ColorThemeItemData.png

File renamed without changes.

org.mixedrealitytoolkit.theming/~Documentation/Images/TextColorMapping.png renamed to org.mixedrealitytoolkit.theming/Documentation~/Images/TextColorMapping.png

File renamed without changes.
85.3 KB
Loading
10.1 KB
Loading

org.mixedrealitytoolkit.theming/~Documentation/Images/ThemeDataSource.png renamed to org.mixedrealitytoolkit.theming/Documentation~/Images/ThemeDataSource.png

File renamed without changes.

org.mixedrealitytoolkit.theming/README.md

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# MRTK Theming 3.0
1+
# MRTK UX Theming
22

33
## Overview
44

@@ -10,22 +10,22 @@ The system has three layers:
1010
|---|---|---|
1111
| **Schema** | `ThemeDataSource` + `ThemeDefinition` | Declares what named items exist and what type each one is |
1212
| **Values** | `Theme` (ScriptableObject) | Provides a concrete value for every item in the definition |
13-
| **Binding** | `DataBinding` (MonoBehaviour) + binders | Connects a theme item to a specific component on a GameObject |
13+
| **Binding** | `ThemeBinding` (MonoBehaviour) + binders | Connects a theme item to a specific component on a GameObject |
1414

1515
---
1616

1717
## Theme data source
1818

1919
A `ThemeDataSource` ScriptableObject is the single source of truth for which theme is currently active. Create one per logical theme domain (e.g. one for the whole app, or one per scene).
2020

21-
![ThemeDataSource](./~Documentation/Images/ThemeDataSource.png)
21+
![ThemeDataSource](./Documentation~/Images/ThemeDataSource.png)
2222

2323
The `ThemeDataSource` holds:
2424

2525
- **`activeTheme`** — the currently applied `Theme` asset.
2626
- **`themeDefinition`** — the schema that all compatible themes must conform to.
2727

28-
To switch themes at runtime, assign a new `Theme` to `themeDataSource.value`. Every `DataBinding` component subscribed to that source will immediately receive and apply the new values.
28+
To switch themes at runtime, assign a new `Theme` to `themeDataSource.value`. Every `ThemeBinding` component subscribed to that source will immediately receive and apply the new values.
2929

3030
### Theme definition
3131

@@ -36,32 +36,34 @@ Each item has:
3636
- **Name** — a string key used to match binders to values at runtime (e.g. `"Primary Color"`, `"Backplate Material"`).
3737
- **Data type** — a concrete subclass of `BaseThemeItemData<T>` (e.g. `ColorThemeItemData`, `MaterialThemeItemData`).
3838

39+
![ColorThemeItemData](./Documentation~/Images/ColorThemeItemData.png)
40+
3941
---
4042

4143
## Theme
4244

4345
A `Theme` ScriptableObject is assigned to a `ThemeDataSource` and provides a concrete value for every item declared in that source's `ThemeDefinition`.
4446

45-
![TextColorMapping](./~Documentation/Images/TextColorMapping.png)
47+
![TextColorMapping](./Documentation~/Images/TextColorMapping.png)
4648

4749
The `Theme` inspector automatically displays one field per definition item, typed correctly. Themes are **complete** — every item in the definition must have a value. This ensures that switching themes always fully overwrites every bound property, with no leftover values from a previous theme.
4850

4951
---
5052

51-
## Data binding
53+
## Theme binding
5254

53-
The `DataBinding` MonoBehaviour connects a `ThemeDataSource` to one or more components on the same GameObject (or its children). Add it to any GameObject that should respond to theme changes.
55+
The `ThemeBinding` MonoBehaviour connects a `ThemeDataSource` to one or more components on the same GameObject (or its children). Add it to any GameObject that should respond to theme changes.
5456

55-
![DataBindingThemeSource](./~Documentation/Images/DataBindingThemeSource.png)
57+
![ThemeBindingThemeSource](./Documentation~/Images/ThemeBindingThemeSource.png)
5658

57-
`DataBinding` holds:
59+
`ThemeBinding` holds:
5860

5961
- **`themeDataSource`** — the source to subscribe to.
6062
- **`binders`** — a list of `IBinder` implementations, each connecting one theme item to one component.
6163

6264
On `OnEnable`, each binder subscribes to the data source and immediately receives the current theme. On `OnDisable`, binders unsubscribe.
6365

64-
![DataBinding](./~Documentation/Images/DataBinding.png)
66+
![ThemeBinding](./Documentation~/Images/ThemeBinding.png)
6567

6668
### Theme binders
6769

@@ -122,15 +124,15 @@ public class MyCustomBinder : BaseThemeBinder<Color, MyComponent>
122124
}
123125
```
124126

125-
The new binder will automatically appear in the `DataBinding` binder type dropdown in the Inspector, and the **Bound Theme Item** dropdown will show only the definition items whose data type is compatible with `T`.
127+
The new binder will automatically appear in the `ThemeBinding` binder type dropdown in the Inspector, and the **Bound Theme Item** dropdown will show only the definition items whose data type is compatible with `T`.
126128

127129
---
128130

129131
## How theme switching works at runtime
130132

131133
1. `themeDataSource.value = newTheme` is called.
132134
2. `ThemeDataSource` fires a `ChangeEvent<Theme>` to all listeners.
133-
3. Each `DataBinding` component's binders receive the event via `OnThemeChanged`.
135+
3. Each `ThemeBinding` component's binders receive the event via `OnThemeChanged`.
134136
4. Each binder calls `Theme.TryGetItemData(ThemeDefinitionItemName, ...)` to look up its value.
135137
5. If found, `Apply` is called with the new value. If not found, a warning is logged.
136138

org.mixedrealitytoolkit.theming/~Documentation.meta

Lines changed: 0 additions & 8 deletions
This file was deleted.

org.mixedrealitytoolkit.theming/~Documentation/Images.meta

Lines changed: 0 additions & 8 deletions
This file was deleted.

org.mixedrealitytoolkit.theming/~Documentation/Images/ColorThemeItemData.png.meta

Lines changed: 0 additions & 130 deletions
This file was deleted.
Binary file not shown.

0 commit comments

Comments
 (0)