Merge pull request #371 from jdbann/fix-scroll-panel-view

Fix ScrollPanel view binding
This commit is contained in:
Milan Nikolic 2024-04-08 15:05:34 +02:00 committed by GitHub
commit 53f26d8a08
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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)