[raygui] empty string will cause the draw of a title-bar, but nil doesn't
This commit is contained in:
parent
e824a9b663
commit
c212c33886
1 changed files with 5 additions and 2 deletions
|
@ -356,8 +356,11 @@ func ScrollPanel(bounds rl.Rectangle, text string, content rl.Rectangle, scroll
|
|||
cbounds.y = C.float(bounds.Y)
|
||||
cbounds.width = C.float(bounds.Width)
|
||||
cbounds.height = C.float(bounds.Height)
|
||||
ctext := C.CString(text)
|
||||
defer C.free(unsafe.Pointer(ctext))
|
||||
var ctext *C.char
|
||||
if len(text) > 0 {
|
||||
ctext = C.CString(text)
|
||||
defer C.free(unsafe.Pointer(ctext))
|
||||
}
|
||||
var ccontent C.struct_Rectangle
|
||||
ccontent.x = C.float(content.X)
|
||||
ccontent.y = C.float(content.Y)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue