Skip to content

Commit

Permalink
- restore default color but not custom
Browse files Browse the repository at this point in the history
  • Loading branch information
DerpleMQ2 committed Feb 22, 2024
1 parent b1f0517 commit aa3fcae
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion bmButtonHandlers.lua
Expand Up @@ -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
Expand Down

0 comments on commit aa3fcae

Please sign in to comment.