Fix colors

Signed-off-by: Slendi <slendi@socopon.com>
This commit is contained in:
2025-10-10 03:56:03 +03:00
parent acf480832a
commit cabf8b23df
5 changed files with 15 additions and 8 deletions

View File

@@ -655,7 +655,7 @@ auto ImGui::text_input(std::size_t id, std::pmr::string &str, Rectangle rec,
rec.x + HORIZONTAL_PADDING - state.scroll_offset.x,
baseline_y,
};
Color const text_color { 255, 255, 255, 255 };
Color const &text_color = options.text_color;
std::string_view const left_view(str.data(), caret_byte);
std::string_view const right_view(
str.data() + caret_byte, str.size() - caret_byte);
@@ -682,7 +682,7 @@ auto ImGui::text_input(std::size_t id, std::pmr::string &str, Rectangle rec,
Color const highlight { 120, 160, 255, 100 };
DrawRectangleRec(sel_rect, highlight);
}
Color const preedit_color { 200, 220, 255, 255 };
Color const &preedit_color { options.preedit_color };
m_text_renderer->draw_text(*m_font,
std::string_view(
state.preedit_text.data(), state.preedit_text.size()),
@@ -700,7 +700,7 @@ auto ImGui::text_input(std::size_t id, std::pmr::string &str, Rectangle rec,
if (m_focused_id == id && state.caret_visible) {
Rectangle caret_rect = state.caret_rect;
caret_rect.x = std::round(caret_rect.x);
Color const caret_color { 255, 255, 255, 200 };
Color const caret_color { text_color };
DrawRectangleRec(caret_rect, caret_color);
}
}