ddnet/src/engine
Robert Müller f5e7fa24d6 Add color palette and pipette to editor
Add color palette with up to 8 colors to editor toolbar. The palette colors work like regular color picker buttons, so they open a color picker popup on click and the value can be copied and pasted with Ctrl+Right click and Ctrl+Left click respectively. Less palette colors are shown when not enough space is available (with 5:4 resolutions).

Add color pipette which allows selecting any color displayed on the screen. Selecting a color with the pipette adds the new color to the palette and shifts the other colors to the right. The selected color is also copied to the clipboard immediately. The hotkey Ctrl+Shift+C is added to toggle the color pipette, which allows using the color pipette in popups and dialogs.

The implement this, the function `IGraphics::ReadPixel` and the command `SCommand_TrySwapAndReadPixel` are added to read a specified pixel's color from the backbuffer. Like the screenshot command, this command also requires a swap operation to be performed before the correct pixel color can be read with the Vulkan backend. The `ReadPixel` function therefore accepts a pointer to a `ColorRGBA` that will be filled after the next swap operation.

Closes #7430.
2023-12-30 13:17:30 +01:00
..
client Add color palette and pipette to editor 2023-12-30 13:17:30 +01:00
docs Merge #5918 2022-10-09 13:53:05 +00:00
external Update zlib to version 1.2.13 2022-10-14 14:53:24 +02:00
gfx Handle all color channel counts in image loader 2023-11-20 21:58:29 +01:00
server Change path to demos/auto/server. Use same filename format as client. 2023-12-25 17:31:25 +01:00
shared Merge pull request #7712 from furo321/rework-cfilecollection 2023-12-26 08:02:40 +00:00
antibot.h Remove unused ver parameter of MACRO_INTERFACE 2023-11-28 21:46:03 +01:00
Cargo.toml Add support for Rust code in DDNet 2022-10-19 23:46:06 +02:00
client.h Fix readability-make-member-function-const 2023-12-14 23:38:03 +01:00
config.h Refactor config manager, move config variable handling 2023-11-30 20:26:00 +01:00
console.h Refactor config manager, move config variable handling 2023-11-30 20:26:00 +01:00
console.rs Fix typos 2023-09-05 22:32:09 +03:00
demo.h Make less headers depend on <base/system.h> 2023-12-11 23:52:23 +01:00
discord.h Make less headers depend on <base/system.h> 2023-12-11 23:52:23 +01:00
editor.h Remove unused ver parameter of MACRO_INTERFACE 2023-11-28 21:46:03 +01:00
engine.h Remove unused ver parameter of MACRO_INTERFACE 2023-11-28 21:46:03 +01:00
favorites.h Remove unused ver parameter of MACRO_INTERFACE 2023-11-28 21:46:03 +01:00
friends.h Remove unused ver parameter of MACRO_INTERFACE 2023-11-28 21:46:03 +01:00
ghost.h Remove unused ver parameter of MACRO_INTERFACE 2023-11-28 21:46:03 +01:00
graphics.h Add color palette and pipette to editor 2023-12-30 13:17:30 +01:00
input.h Make less headers depend on <base/system.h> 2023-12-11 23:52:23 +01:00
kernel.h Make less headers depend on <base/system.h> 2023-12-11 23:52:23 +01:00
keys.h Regenerate key lists with latest SDL version 2023-05-30 23:39:47 +02:00
lib.rs Add support for Rust code in DDNet 2022-10-19 23:46:06 +02:00
map.h Make less headers depend on <base/system.h> 2023-12-11 23:52:23 +01:00
message.h Add a simpler IServer::SnapNewItem() API based on some more generated data 2023-02-10 23:12:24 +03:00
notifications.h Add INotifications kernel interface 2023-12-16 18:15:43 +01:00
rust.h Add support for Rust code in DDNet 2022-10-19 23:46:06 +02:00
server.h Use 0.7 translation layer for Sv_RaceFinish netmessage. 2023-12-29 08:33:36 +01:00
serverbrowser.h Make less headers depend on <base/system.h> 2023-12-11 23:52:23 +01:00
sound.h Remove unused ver parameter of MACRO_INTERFACE 2023-11-28 21:46:03 +01:00
sqlite.h Remove useless typedef in c++ 2022-06-25 21:05:54 +02:00
steam.h Make less headers depend on <base/system.h> 2023-12-11 23:52:23 +01:00
storage.h Make less headers depend on <base/system.h> 2023-12-11 23:52:23 +01:00
textrender.h Add color palette and pipette to editor 2023-12-30 13:17:30 +01:00
updater.h Remove unused ver parameter of MACRO_INTERFACE 2023-11-28 21:46:03 +01:00
uuid.h Make sure headers compile standalone 2020-09-26 21:50:27 +02:00
warning.h Make less headers depend on <base/system.h> 2023-12-11 23:52:23 +01:00