Support explicit values in flag properties, add C# flags support
- Add support for explicit values in properties using `PROPERTY_HINT_FLAGS` that works the same way it does for enums. - Fix enums and flags in VisualScriptEditor (it wasn't considering the explicit value). - Use `PROPERTY_HINT_FLAGS` for C# enums with the FlagsAttribute instead of `PROPERTY_HINT_ENUM`.
This commit is contained in:
@ -265,9 +265,9 @@ class EditorPropertyFlags : public EditorProperty {
|
||||
GDCLASS(EditorPropertyFlags, EditorProperty);
|
||||
VBoxContainer *vbox = nullptr;
|
||||
Vector<CheckBox *> flags;
|
||||
Vector<int> flag_indices;
|
||||
Vector<uint32_t> flag_values;
|
||||
|
||||
void _flag_toggled();
|
||||
void _flag_toggled(int p_index);
|
||||
|
||||
protected:
|
||||
virtual void _set_read_only(bool p_read_only) override;
|
||||
|
||||
Reference in New Issue
Block a user