Skip to content
This repository has been archived by the owner on Dec 31, 2022. It is now read-only.

Commit

Permalink
Merge pull request #142 from the-goodies/upstream_master
Browse files Browse the repository at this point in the history
Fixed BeginPopupV and BeginPopupModalV having incorrect flags type
  • Loading branch information
dertseha authored Feb 27, 2021
2 parents 8ea0023 + 5e1b7b0 commit 2d2d232
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 8 deletions.
6 changes: 4 additions & 2 deletions Popup.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,8 @@ const (

// BeginPopupV returns true if the popup is open, and you can start outputting to it.
// Only call EndPopup() if BeginPopup() returns true.
func BeginPopupV(name string, flags PopupFlags) bool {
// WindowFlags are forwarded to the window.
func BeginPopupV(name string, flags WindowFlags) bool {
nameArg, nameFin := wrapString(name)
defer nameFin()
return C.iggBeginPopup(nameArg, C.int(flags)) != 0
Expand All @@ -49,7 +50,8 @@ func BeginPopup(name string) bool {

// BeginPopupModalV creates modal dialog (regular window with title bar, block interactions behind the modal window,
// can't close the modal window by clicking outside).
func BeginPopupModalV(name string, open *bool, flags PopupFlags) bool {
// WindowFlags are forwarded to the window.
func BeginPopupModalV(name string, open *bool, flags WindowFlags) bool {
nameArg, nameFin := wrapString(name)
defer nameFin()
openArg, openFin := wrapBool(open)
Expand Down
4 changes: 2 additions & 2 deletions State.go
Original file line number Diff line number Diff line change
Expand Up @@ -260,8 +260,8 @@ const (

// MouseCursor returns desired cursor type, reset in imgui.NewFrame(), this is updated during the frame.
// Valid before Render(). If you use software rendering by setting io.MouseDrawCursor ImGui will render those for you.
func MouseCursor() int {
return int(C.iggGetMouseCursor())
func MouseCursor() MouseCursorID {
return MouseCursorID(C.iggGetMouseCursor())
}

// SetMouseCursor sets desired cursor type.
Expand Down
6 changes: 3 additions & 3 deletions Tables.go
Original file line number Diff line number Diff line change
Expand Up @@ -378,12 +378,12 @@ func TableGetColumnName() string {
}

// TableGetColumnFlagsV return column flags so you can query their Enabled/Visible/Sorted/Hovered status flags. Pass -1 to use current column.
func TableGetColumnFlagsV(columnN int) int {
return int(C.iggTableGetColumnFlags(C.int(columnN)))
func TableGetColumnFlagsV(columnN int) TableColumnFlags {
return TableColumnFlags(C.iggTableGetColumnFlags(C.int(columnN)))
}

// TableGetColumnFlags calls TableGetColumnFlagsV(-1).
func TableGetColumnFlags() int {
func TableGetColumnFlags() TableColumnFlags {
return TableGetColumnFlagsV(-1)
}

Expand Down
2 changes: 1 addition & 1 deletion Widgets.go
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ func ProgressBarV(fraction float32, size Vec2, overlay string) {
C.iggProgressBar(C.float(fraction), sizeArg, overlayArg)
}

// ProgressBar calls ProgressBarV(fraction, Vec2{X: -1, Y: 0}, "").
// ProgressBar calls ProgressBarV(fraction, Vec2{X: -math.SmallestNonzeroFloat32, Y: 0}, "").
func ProgressBar(fraction float32) {
ProgressBarV(fraction, Vec2{X: -math.SmallestNonzeroFloat32, Y: 0}, "")
}
Expand Down

0 comments on commit 2d2d232

Please sign in to comment.