@@ -139,9 +139,9 @@ use crate::util::{bail, ident, KvParser};
139
139
/// (fields annotated with `@export`). In the gdext API, these two concepts are represented with `#[var]` and `#[export]` attributes respectively,
140
140
/// which in turn are backed by the [`Var`](../register/property/trait.Var.html) and [`Export`](../register/property/trait.Export.html) traits.
141
141
///
142
- /// ## Property registration
142
+ /// ## Register properties with `#[var]`
143
143
///
144
- /// To create a property, you can use the `#[var]` annotation:
144
+ /// To create a property, you can use the `#[var]` annotation, which supports types implementing [`Var`](../register/property/trait.Var.html).
145
145
///
146
146
/// ```
147
147
/// # use godot::prelude::*;
@@ -207,9 +207,18 @@ use crate::util::{bail, ident, KvParser};
207
207
/// }
208
208
/// ```
209
209
///
210
- /// ## Property exports
210
+ /// You can additionally provide low-level configuration of a property with the keys `hint`, `hint_string` and `usage_flags`.
211
+ /// This is typically not necessary, but exists for full flexibility. These keys can be combined, but the combination must be
212
+ /// meaningful in Godot, and godot-rust should generally cover known useful combinations in higher-level APIs.
211
213
///
212
- /// For exporting properties to the editor, you can use the `#[export]` attribute:
214
+ /// - `#[var(hint = ENUM)]` denoting a constant from [`PropertyHint`](../global/struct.PropertyHint.html),
215
+ /// - `#[var(hint_string = "one,two")]` providing a hint string for the property, which is interpreted by Godot depending on hint and context.
216
+ /// - `#[var(usage_flags = [EDITOR, READ_ONLY])]` providing a list of [`PropertyUsageFlags`](../global/struct.PropertyUsageFlags.html).
217
+ ///
218
+ /// ## Export properties with `#[export]`
219
+ ///
220
+ /// To export properties to the editor, you can use the `#[export]` attribute, which supports types implementing
221
+ /// [`Export`](../register/property/trait.Export.html):
213
222
///
214
223
/// ```
215
224
/// # use godot::prelude::*;
0 commit comments