Skip to content

Commit

Permalink
add brush size setting in toolbar
Browse files Browse the repository at this point in the history
  • Loading branch information
cjbrigato committed Sep 30, 2024
1 parent a45a2aa commit 4137a7e
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion examples/paint/toolbar.go
Original file line number Diff line number Diff line change
Expand Up @@ -161,8 +161,13 @@ func ButtonColorMaker() *g.RowWidget {
imgui.ImageButton("##open_tool", openButtonImg.Texture().ID(), sz.Mul(1.7))
imgui.SameLine()
imgui.ImageButton("##save_tool", saveButtonImg.Texture().ID(), sz.Mul(1.7))
if imgui.ImageButton("##brush_tool", brushButtonImg.Texture().ID(), sz.Mul(0.9)) {
brush_size = 12.0
}
imgui.SameLine()
imgui.ImageButton("##brush_tool", brushButtonImg.Texture().ID(), sz.Mul(1.7))
imgui.PushItemWidth(225.0)
imgui.SliderFloat("##Brush Size", &brush_size, float32(0.1), float32(72.0))
imgui.PopItemWidth()
imgui.SetCursorPos(start_ul)
for i := range defaultColors {
if i%2 != 0 {
Expand Down

0 comments on commit 4137a7e

Please sign in to comment.