Commit graph

12 commits

Author SHA1 Message Date
Rémi Verschelde e2e9b08cc7
Color: Bind from_hsv as static method 2021-11-11 11:50:02 +01:00
Aaron Franke 2e13e3ed4a
Allow clamping vectors and colors 2021-06-03 12:05:20 -04:00
Danil Alexeev e63976d4b2
Fix Color::get_{r,g,b,a}8
Closes #47022.
2021-04-09 16:11:02 +03:00
Aaron Franke f55445079a
Replace ColorN and from HTML with a string constructor 2021-02-01 17:27:19 -05:00
Aaron Franke 1be0d6b30e
Type consistencies in core 2021-01-26 13:04:22 -05:00
Rémi Verschelde 9349a5507f
Merge pull request #35505 from dalexeev/rtl_colors
Unified named colors in RichTextLabel
2021-01-08 09:03:55 +01:00
Rémi Verschelde b5334d14f7
Update copyright statements to 2021
Happy new year to the wonderful Godot community!

2020 has been a tough year for most of us personally, but a good year for
Godot development nonetheless with a huge amount of work done towards Godot
4.0 and great improvements backported to the long-lived 3.2 branch.

We've had close to 400 contributors to engine code this year, authoring near
7,000 commit! (And that's only for the `master` branch and for the engine code,
there's a lot more when counting docs, demos and other first-party repos.)

Here's to a great year 2021 for all Godot users 🎆
2021-01-01 20:19:21 +01:00
Aaron Franke 5465e604bb
Improve argument names for core types 2020-12-07 05:01:33 -05:00
Danil Alexeev 01d0addf56 Unified named colors in RichTextLabel
Now the BB tag `[color]` uses the color names from the `Color` class.
Also, the use of the `#` symbol in an HTML color code has become optional.
2020-11-17 02:55:36 +03:00
Rémi Verschelde 0f249f5c0a
Variant: Sync docs with new constructors, fixups after #43403
Change DocData comparators for MethodDoc and ArgumentDoc to get a better
ordering of constructors.
2020-11-09 23:39:53 +01:00
Rémi Verschelde 771b3c583d
Color: Fix -Wtype-limits GCC warning after refactoring
Warning from GCC 10.2.0 with `warnings=extra`:
```
./core/math/color.h: In member function 'int32_t Color::get_r8() const':
./core/typedefs.h:107:42: error: comparison of unsigned expression in '< 0' is always false [-Werror=type-limits]
  107 | #define CLAMP(m_a, m_min, m_max) (((m_a) < (m_min)) ? (m_min) : (((m_a) > (m_max)) ? m_max : m_a))
      |                                    ~~~~~~^~~~~~~~~
./core/math/color.h:201:49: note: in expansion of macro 'CLAMP'
  201 |  _FORCE_INLINE_ int32_t get_r8() const { return CLAMP(uint32_t(r * 255.0), 0, 255); }
      |                                                 ^~~~~
```

Also some code consistency changes while at it.
2020-11-09 14:11:21 +01:00
reduz 127458ed17 Reorganized core/ directory, it was too fatty already
-Removed FuncRef, since Callable makes it obsolete
-Removed int_types.h as its obsolete in c++11+
-Changed color names code
2020-11-07 20:17:12 -03:00
Renamed from core/color.h (Browse further)