Skip to content

Commit

Permalink
Merge pull request #371 from jdbann/fix-scroll-panel-view
Browse files Browse the repository at this point in the history
Fix ScrollPanel view binding
  • Loading branch information
gen2brain authored Apr 8, 2024
2 parents c3665eb + 0b4f8b1 commit 53f26d8
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions raygui/raygui.go
Original file line number Diff line number Diff line change
Expand Up @@ -375,6 +375,12 @@ func ScrollPanel(bounds rl.Rectangle, text string, content rl.Rectangle, scroll
cview.y = C.float(view.Y)
cview.width = C.float(view.Width)
cview.height = C.float(view.Height)
defer func() {
view.X = float32(cview.x)
view.Y = float32(cview.y)
view.Width = float32(cview.width)
view.Height = float32(cview.height)
}()

res := C.GuiScrollPanel(cbounds, ctext, ccontent, &cscroll, &cview)

Expand Down

0 comments on commit 53f26d8

Please sign in to comment.