mirror of
https://github.com/WerWolv/ImHex.git
synced 2026-04-02 13:37:42 -05:00
impr: Allow all highlights to overlap each other
This commit is contained in:
@@ -8,6 +8,7 @@
|
||||
#include <hex/providers/buffered_reader.hpp>
|
||||
|
||||
#include <imgui.h>
|
||||
#include <imgui_internal.h>
|
||||
|
||||
#if defined(OS_WINDOWS)
|
||||
#include <windows.h>
|
||||
@@ -844,4 +845,15 @@ namespace hex {
|
||||
#endif
|
||||
}
|
||||
|
||||
std::optional<ImColor> blendColors(const std::optional<ImColor> &a, const std::optional<ImColor> &b) {
|
||||
if (!a.has_value() && !b.has_value())
|
||||
return std::nullopt;
|
||||
else if (a.has_value() && !b.has_value())
|
||||
return a;
|
||||
else if (!a.has_value() && b.has_value())
|
||||
return b;
|
||||
else
|
||||
return ImAlphaBlendColors(a.value(), b.value());
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user