diff options
author | Raul Santos <raulsntos@gmail.com> | 2022-12-06 04:58:16 +0100 |
---|---|---|
committer | Raul Santos <raulsntos@gmail.com> | 2022-12-16 03:04:05 +0100 |
commit | d843a7ab97a0310d9458c4ed11546bb2da18f8f9 (patch) | |
tree | 53b1ecc7ff8c407168a03dae51d53144c57d4623 /modules/mono/glue/runtime_interop.cpp | |
parent | bc5d67c61345758741fe087c6b5282402b0b2465 (diff) |
C#: Synchronize Color with Core
- Add `Luminance` readonly property.
- Add `LinearToSrgb` and `SrgbToLinear` static methods.
- Add `FromOkHsl` static method.
- Add `FromRgbe9995` static method.
- Add `FromString` static method.
- Expose `FromHtml` static method.
- Expose `HtmlIsValid` static method.
- Add and update some Color documentation.
Diffstat (limited to 'modules/mono/glue/runtime_interop.cpp')
-rw-r--r-- | modules/mono/glue/runtime_interop.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/modules/mono/glue/runtime_interop.cpp b/modules/mono/glue/runtime_interop.cpp index 338e5a0147..a3280a0739 100644 --- a/modules/mono/glue/runtime_interop.cpp +++ b/modules/mono/glue/runtime_interop.cpp @@ -514,6 +514,13 @@ void godotsharp_callable_call_deferred(Callable *p_callable, const Variant **p_a p_callable->call_deferredp(p_args, p_arg_count); } +godot_color godotsharp_color_from_ok_hsl(float p_h, float p_s, float p_l, float p_alpha) { + godot_color ret; + Color *dest = (Color *)&ret; + memnew_placement(dest, Color(Color::from_ok_hsl(p_h, p_s, p_l, p_alpha))); + return ret; +} + // GDNative functions // gdnative.h @@ -1345,6 +1352,7 @@ static const void *unmanaged_callbacks[]{ (void *)godotsharp_callable_get_data_for_marshalling, (void *)godotsharp_callable_call, (void *)godotsharp_callable_call_deferred, + (void *)godotsharp_color_from_ok_hsl, (void *)godotsharp_method_bind_ptrcall, (void *)godotsharp_method_bind_call, (void *)godotsharp_variant_new_string_name, |