You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: mods/dependencies.md
+17Lines changed: 17 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -130,6 +130,23 @@ $execute {
130
130
}
131
131
```
132
132
133
+
### User Flags
134
+
135
+
User flags are a frequently used alternative to user objects which does not store a value. This makes them a more optimized solution for our aforementioned scrollbar example.
if (layer->getUserFlag("hjfod.cool-scrollbars/enable")) {
143
+
// add scrollbar
144
+
}
145
+
```
146
+
147
+
Do note that user flags and user objects are separate - `getUserFlag` and `getUserObject` are not interchangeable and need to be consistent with the setter used.
148
+
149
+
Unlike user objects, user flags do not fire an event when set.
0 commit comments