mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-18 14:08:19 +00:00
f5e7fa24d6
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. |
||
---|---|---|
.. | ||
client | ||
docs | ||
external | ||
gfx | ||
server | ||
shared | ||
antibot.h | ||
Cargo.toml | ||
client.h | ||
config.h | ||
console.h | ||
console.rs | ||
demo.h | ||
discord.h | ||
editor.h | ||
engine.h | ||
favorites.h | ||
friends.h | ||
ghost.h | ||
graphics.h | ||
input.h | ||
kernel.h | ||
keys.h | ||
lib.rs | ||
map.h | ||
message.h | ||
notifications.h | ||
rust.h | ||
server.h | ||
serverbrowser.h | ||
sound.h | ||
sqlite.h | ||
steam.h | ||
storage.h | ||
textrender.h | ||
updater.h | ||
uuid.h | ||
warning.h |