From aa3fcae07c4b6731ae15eb48296e3885a9b755db Mon Sep 17 00:00:00 2001 From: DerpleMQ2 Date: Wed, 21 Feb 2024 21:20:28 -0800 Subject: [PATCH] - restore default color but not custom --- bmButtonHandlers.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/bmButtonHandlers.lua b/bmButtonHandlers.lua index f1ccb01..5bbbb16 100644 --- a/bmButtonHandlers.lua +++ b/bmButtonHandlers.lua @@ -163,7 +163,8 @@ function BMButtonHandlers.RenderButtonRect(Button, cursorScreenPos, size, alpha) local draw_list = ImGui.GetWindowDrawList() local buttonStyle = ImGui.GetStyleColorVec4(ImGuiCol.Button) local Colors = btnUtils.split(Button.ButtonColorRGB, ",") - local buttonBGCol = IM_COL32(tonumber(Colors[1]) or (buttonStyle.x * 255), tonumber(Colors[2]) or (buttonStyle.y * 255), tonumber(Colors[3]) or (buttonStyle.z * 255), alpha) + local buttonBGCol = IM_COL32(tonumber(Colors[1]) or (buttonStyle.x * 255), tonumber(Colors[2]) or (buttonStyle.y * 255), tonumber(Colors[3]) or (buttonStyle.z * 255), + #Colors == 0 and (buttonStyle.w * 255) or alpha) draw_list:AddRectFilled(cursorScreenPos, ImVec2(cursorScreenPos.x + size, cursorScreenPos.y + size), buttonBGCol) end