| 609 | } |
| 610 | |
| 611 | void GuiImpl::addRect(const float2& size, const float4& color, bool filled, bool sameLine) |
| 612 | { |
| 613 | if (sameLine) |
| 614 | ImGui::SameLine(); |
| 615 | |
| 616 | const ImVec2& cursorPos = ImGui::GetCursorScreenPos(); |
| 617 | ImVec2 bottomLeft{cursorPos.x + size.x, cursorPos.y + size.y}; |
| 618 | ImVec4 rectColor{color.x, color.y, color.z, color.w}; |
| 619 | |
| 620 | if (filled) |
| 621 | { |
| 622 | ImGui::GetWindowDrawList()->AddRectFilled(ImGui::GetCursorScreenPos(), bottomLeft, ImGui::ColorConvertFloat4ToU32(rectColor)); |
| 623 | } |
| 624 | else |
| 625 | { |
| 626 | ImGui::GetWindowDrawList()->AddRect(ImGui::GetCursorScreenPos(), bottomLeft, ImGui::ColorConvertFloat4ToU32(rectColor)); |
| 627 | } |
| 628 | } |
| 629 | |
| 630 | bool GuiImpl::addDropdown(const char label[], const Gui::DropdownList& values, uint32_t& var, bool sameLine) |
| 631 | { |