text_outline_color: fix BGR TO RGB

Previously the outline color would swap the blue and green, making it
inconsistent with how other colors function
pull/1199/head v0.7.1-rc1
flightlessmango 5 months ago
parent 9998593d92
commit c38132c964

@ -97,6 +97,7 @@ void HudElements::convert_colors(const struct overlay_params& params)
HUDElements.colors.fps_value_low = convert(params.fps_color[0]);
HUDElements.colors.fps_value_med = convert(params.fps_color[1]);
HUDElements.colors.fps_value_high = convert(params.fps_color[2]);
HUDElements.colors.text_outline = convert(params.text_outline_color);
ImGuiStyle& style = ImGui::GetStyle();
style.Colors[ImGuiCol_PlotLines] = convert(params.frametime_color);

@ -115,7 +115,8 @@ class HudElements{
cpu_load_high,
fps_value_low,
fps_value_med,
fps_value_high;
fps_value_high,
text_outline;
} colors {};
void TextColored(ImVec4 col, const char *fmt, ...);

@ -403,9 +403,7 @@ void RenderOutlinedText(const char* text, ImU32 textColor) {
float outlineThickness = HUDElements.params->text_outline_thickness;
ImVec2 textSize = ImGui::CalcTextSize(text);
ImVec4 colorVec4 = ImGui::ColorConvertU32ToFloat4(HUDElements.params->text_outline_color);
colorVec4.w = HUDElements.params->alpha;
ImU32 outlineColor = ImGui::ColorConvertFloat4ToU32(colorVec4);
ImU32 outlineColor = ImGui::ColorConvertFloat4ToU32(HUDElements.colors.text_outline);
ImVec2 pos = window->DC.CursorPos;
ImDrawList* drawList = ImGui::GetWindowDrawList();

@ -856,7 +856,7 @@ parse_overlay_config(struct overlay_params *params,
params->font_scale_media_player = 0.55f;
// Convert from 0xRRGGBB to ImGui's format
std::array<unsigned *, 21> colors = {
std::array<unsigned *, 22> colors = {
&params->cpu_color,
&params->gpu_color,
&params->vram_color,
@ -878,6 +878,7 @@ parse_overlay_config(struct overlay_params *params,
&params->fps_color[0],
&params->fps_color[1],
&params->fps_color[2],
&params->text_outline_color,
};
for (auto color : colors){

Loading…
Cancel
Save