@@ -15,7 +15,7 @@ void UImGui::ClientSideBar::Begin() noexcept
15
15
ImGui::BeginGroup ();
16
16
}
17
17
18
- void UImGui::ClientSideBar::End (float deltaTime, UImGui::ClientSideBarFlags flags) noexcept
18
+ void UImGui::ClientSideBar::End (float deltaTime, UImGui::ClientSideBarFlags flags, FVector4 destructiveColor, FVector4 destructiveColorActive ) noexcept
19
19
{
20
20
// Create an invisible button that fills up all available space but leaves enough for the buttons
21
21
static float width = 0 ;
@@ -32,7 +32,7 @@ void UImGui::ClientSideBar::End(float deltaTime, UImGui::ClientSideBarFlags flag
32
32
if (flags & UIMGUI_CLIENT_SIDE_BAR_FLAG_MAXIMISE_BUTTON)
33
33
renderMaximiseButton (width, style);
34
34
if (flags & UIMGUI_CLIENT_SIDE_BAR_FLAG_CLOSE_BUTTON)
35
- renderCloseButton (width, style);
35
+ renderCloseButton (width, style, destructiveColor, destructiveColorActive );
36
36
37
37
ImGui::PopStyleColor (3 );
38
38
ImGui::EndGroup ();
@@ -81,10 +81,10 @@ void UImGui::ClientSideBar::renderMaximiseButton(float& width, const ImGuiStyle&
81
81
drawList->AddLine (max, { max.x , min.y }, ImGui::ColorConvertFloat4ToU32 (style.Colors [ImGuiCol_Text]));
82
82
}
83
83
84
- void UImGui::ClientSideBar::renderCloseButton (float & width, const ImGuiStyle& style) noexcept
84
+ void UImGui::ClientSideBar::renderCloseButton (float & width, const ImGuiStyle& style, FVector4 destructiveColor, FVector4 destructiveColorActive ) noexcept
85
85
{
86
- ImGui::PushStyleColor (ImGuiCol_ButtonActive, IM_COL32 ( 255 , 123 , 99 , 255 )); // TODO: This should be fixed when using UImGuiTheme
87
- ImGui::PushStyleColor (ImGuiCol_ButtonHovered, IM_COL32 ( 192 , 28 , 40 , 255 )); // TODO: This should be fixed when using UImGuiTheme
86
+ ImGui::PushStyleColor (ImGuiCol_ButtonActive, ImGui::ColorConvertFloat4ToU32 ({ destructiveColor. x , destructiveColor. y , destructiveColor. z , destructiveColor. w } ));
87
+ ImGui::PushStyleColor (ImGuiCol_ButtonHovered, ImGui::ColorConvertFloat4ToU32 ({ destructiveColorActive. x , destructiveColorActive. y , destructiveColorActive. z , destructiveColorActive. w } ));
88
88
89
89
if (ImGui::SmallButton (" ##uimgui_internal_invisible_close_button" ))
90
90
UImGui::Instance::shutdown ();
0 commit comments