Hello, Im using dear imgui and im currently trying to make some modifications to the group boxes. I want the group box to have a bar on the very top of it. I tried drawing filled rect:
indent preformatted text by 4 spaces
float x1 = window->Pos.x;
float x2 = window->Pos.x+ size_arg.x;
const ImRect bb(ImVec2(x1, 0), ImVec2(x2, window->DC.CursorPos.y));
window->DrawList->AddRectFilled(bb.Min, bb.Max, GetColorU32(ImGuiCol_Separator)); indent preformatted text by 4 spaces
But when I do that the filled rect is offseted to the right by about 3 pixels. Why is that?
Edit: This code is written in the BeginGroupBox function. Also the white is the groupbox and the orange is the rectangle im trying to draw.