From 9c2f860ea80310f87b62a2947b4ddea5e7d85587 Mon Sep 17 00:00:00 2001 From: crupest Date: Wed, 24 Feb 2021 23:01:15 +0800 Subject: feat: Scroll bar. Only collapse state. --- include/cru/platform/GraphBase.hpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'include/cru/platform/GraphBase.hpp') diff --git a/include/cru/platform/GraphBase.hpp b/include/cru/platform/GraphBase.hpp index b580ad31..6bf2736f 100644 --- a/include/cru/platform/GraphBase.hpp +++ b/include/cru/platform/GraphBase.hpp @@ -316,6 +316,12 @@ struct Color { (hex >> 24) & mask); } + constexpr Color WithAlpha(std::uint8_t new_alpha) const { + auto result = *this; + result.alpha = new_alpha; + return result; + } + std::uint8_t red; std::uint8_t green; std::uint8_t blue; -- cgit v1.2.3