ddnet/src/game
Robert Müller 78217c44d7 Add mode selection to color picker popups (RGBA, HSVA, HSLA)
Add buttons for selecting the color mode (RGBA, HSVA, HSLA) in color picker popups in menu and editor. Previously, the color picker popups always showed the color components in HSVA. Now the mode can be switched so the components are shown in either RGBA or HSLA. The hex color code is always RGBA, same as before.

In the editor, the RGBA mode is used per default, to prevent any loss of information due to color conversions, as the map format stores RGBA values. In the menus, the HSVA mode is the default, same as before, although the config actually stores HSLA values.

The HSVA color picker controls (1D slider for hue, 2D picker for saturation and value) are still shown for all modes.

As many color conversions as possible are avoided by only converting between color formats when necessary. Switching between color modes should not change the selected color. Changing the RGBA hex value in the editor will set the exact value also when another color mode is selected. However, changing the color with the other controls in HSVA/HSLA mode will cause a conversion and possible loss of information. The conversion directly from RGBA to HSVA and vice versa is also explicitly avoided, as this internally converts to HSLA first, which is done separately already.

Closes #7409.
2023-11-05 13:46:01 +01:00
..
client Add mode selection to color picker popups (RGBA, HSVA, HSLA) 2023-11-05 13:46:01 +01:00
editor Add mode selection to color picker popups (RGBA, HSVA, HSLA) 2023-11-05 13:46:01 +01:00
server CPlayer: Remove unused variable 2023-11-03 21:36:33 +03:00
alloc.h Move alloc.h to game/ and use it in client/prediction/entity.h 2023-09-15 18:04:29 +03:00
collision.cpp Merge pull request #5398 from AssassinTee/feature/elasticity-tuning 2023-07-28 13:58:42 +00:00
collision.h Merge pull request #5398 from AssassinTee/feature/elasticity-tuning 2023-07-28 13:58:42 +00:00
ddracechat.h Add /lasttp 2023-09-21 21:02:55 +02:00
ddracecommands.h Add freeze/unfreeze testing commands 2023-11-01 17:26:29 +01:00
gamecore.cpp Fix dead reckoning 2023-09-24 18:14:09 +02:00
gamecore.h CCharacterCore: Break the friendship with CCharacter 2023-09-15 18:04:29 +03:00
layers.cpp Remove Parallax Zoom from map file 2023-10-29 23:43:19 +01:00
layers.h Remove Parallax Zoom from map file 2023-10-29 23:43:19 +01:00
localization.cpp Remove CLocConstString 2023-08-30 19:24:38 +02:00
localization.h Remove CLocConstString 2023-08-30 19:24:38 +02:00
mapbugs.cpp Remove obsolete clang-tidy NOLINT comments 2023-10-11 17:22:59 +02:00
mapbugs.h Remove code for CRC in most places, except where needed for net compat 2020-10-14 17:08:58 +02:00
mapbugs_list.h Revert "Add mapbug "stoppers-passthrough@ddnet.tw"" 2018-08-22 08:33:21 +02:00
mapitems.cpp Add IsSwitchTile(Flags|Number|Delay)Used functions 2023-04-26 19:04:56 +02:00
mapitems.h Fix client crash on maps with invalid image and sound indices 2023-10-29 17:55:20 +01:00
mapitems_ex.cpp Remove Parallax Zoom from map file 2023-10-29 23:43:19 +01:00
mapitems_ex.h Remove Parallax Zoom from map file 2023-10-29 23:43:19 +01:00
mapitems_ex_types.h Remove Parallax Zoom from map file 2023-10-29 23:43:19 +01:00
prng.cpp Huge variable naming format 2022-07-08 18:01:29 +02:00
prng.h Replace all usages of C standard headers with C++ headers 2023-03-01 19:26:51 +01:00
teamscore.cpp Remove unnecessary include in protocol, move definitions to cpp file 2023-01-03 14:10:58 +01:00
teamscore.h Remove unnecessary include in protocol, move definitions to cpp file 2023-01-03 14:10:58 +01:00
tuning.h implement tuning values for elasticity 2023-07-28 15:35:45 +02:00
variables.h disable by default 2023-10-03 23:04:56 +02:00
version.h Version 17.3 2023-09-23 15:28:55 +02:00
voting.h Run clang-format 2020-09-26 21:50:15 +02:00