Skip to content

Commit

Permalink
Merge pull request #787 from gucio321/plot-typefix
Browse files Browse the repository at this point in the history
fix constants
  • Loading branch information
gucio321 authored Apr 26, 2024
2 parents 9616518 + e758313 commit b299dac
Show file tree
Hide file tree
Showing 8 changed files with 102 additions and 102 deletions.
2 changes: 1 addition & 1 deletion ClickableWidgets.go
Original file line number Diff line number Diff line change
Expand Up @@ -549,7 +549,7 @@ func (t *TreeNodeWidget) Build() {
if open {
t.layout.Build()

if (t.flags & imgui.TreeNodeFlagsNoTreePushOnOpen) == 0 {
if (imgui.TreeNodeFlags(t.flags) & imgui.TreeNodeFlagsNoTreePushOnOpen) == 0 {
imgui.TreePop()
}
}
Expand Down
8 changes: 4 additions & 4 deletions Direction.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ type Direction imgui.Dir

// directions.
const (
DirectionLeft Direction = imgui.DirLeft
DirectionRight Direction = imgui.DirRight
DirectionUp Direction = imgui.DirUp
DirectionDown Direction = imgui.DirDown
DirectionLeft = Direction(imgui.DirLeft)
DirectionRight = Direction(imgui.DirRight)
DirectionUp = Direction(imgui.DirUp)
DirectionDown = Direction(imgui.DirDown)
)
162 changes: 81 additions & 81 deletions Flags.go

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion MasterWindow.go
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ func NewMasterWindow(title string, width, height int, flags MasterWindowFlags) *
io := imgui.CurrentIO()

// TODO: removed ConfigFlagEnablePowerSavingMode
io.SetConfigFlags(imgui.BackendFlagsRendererHasVtxOffset)
// TODO: removed io.SetConfigFlags(imgui.BackendFlagsRendererHasVtxOffset)
io.SetBackendFlags(imgui.BackendFlagsRendererHasVtxOffset)

// Disable imgui.ini
Expand Down
4 changes: 2 additions & 2 deletions Plot.go
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ func (p *PlotCanvasWidget) Build() {
}

imgui.PlotSetupAxisV(
imgui.AxisX,
imgui.AxisX1,
Context.FontAtlas.RegisterString(p.xLabel),
imgui.PlotAxisFlags(p.xFlags),
)
Expand Down Expand Up @@ -340,7 +340,7 @@ func (p *BarHPlot) Plot() {
int32(len(p.data)),
p.height,
p.shift,
imgui.PlotErrorBarsFlagsHorizontal,
imgui.PlotBarsFlagsHorizontal,
int32(p.offset),
0,
)
Expand Down
20 changes: 10 additions & 10 deletions Style.go
Original file line number Diff line number Diff line change
Expand Up @@ -199,24 +199,24 @@ type MouseCursorType imgui.MouseCursor
// cursor types.
const (
// MouseCursorNone no mouse cursor.
MouseCursorNone MouseCursorType = imgui.MouseCursorNone
MouseCursorNone = MouseCursorType(imgui.MouseCursorNone)
// MouseCursorArrow standard arrow mouse cursor.
MouseCursorArrow MouseCursorType = imgui.MouseCursorArrow
MouseCursorArrow = MouseCursorType(imgui.MouseCursorArrow)
// MouseCursorTextInput when hovering over InputText, etc.
MouseCursorTextInput MouseCursorType = imgui.MouseCursorTextInput
MouseCursorTextInput = MouseCursorType(imgui.MouseCursorTextInput)
// MouseCursorResizeAll (Unused by imgui functions).
MouseCursorResizeAll MouseCursorType = imgui.MouseCursorResizeAll
MouseCursorResizeAll = MouseCursorType(imgui.MouseCursorResizeAll)
// MouseCursorResizeNS when hovering over an horizontal border.
MouseCursorResizeNS MouseCursorType = imgui.MouseCursorResizeNS
MouseCursorResizeNS = MouseCursorType(imgui.MouseCursorResizeNS)
// MouseCursorResizeEW when hovering over a vertical border or a column.
MouseCursorResizeEW MouseCursorType = imgui.MouseCursorResizeEW
MouseCursorResizeEW = MouseCursorType(imgui.MouseCursorResizeEW)
// MouseCursorResizeNESW when hovering over the bottom-left corner of a window.
MouseCursorResizeNESW MouseCursorType = imgui.MouseCursorResizeNESW
MouseCursorResizeNESW = MouseCursorType(imgui.MouseCursorResizeNESW)
// MouseCursorResizeNWSE when hovering over the bottom-right corner of a window.
MouseCursorResizeNWSE MouseCursorType = imgui.MouseCursorResizeNWSE
MouseCursorResizeNWSE = MouseCursorType(imgui.MouseCursorResizeNWSE)
// MouseCursorHand (Unused by imgui functions. Use for e.g. hyperlinks).
MouseCursorHand MouseCursorType = imgui.MouseCursorHand
MouseCursorCount MouseCursorType = imgui.MouseCursorCOUNT
MouseCursorHand = MouseCursorType(imgui.MouseCursorHand)
MouseCursorCount = MouseCursorType(imgui.MouseCursorCOUNT)
)

// SetMouseCursor sets mouse cursor layout.
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ module github.com/AllenDang/giu
go 1.21

require (
github.com/AllenDang/cimgui-go v0.0.0-20240321080015-b8f29f999b6d
github.com/AllenDang/cimgui-go v0.0.0-20240424153022-294abe7370df
github.com/AllenDang/go-findfont v0.0.0-20200702051237-9f180485aeb8
github.com/faiface/mainthread v0.0.0-20171120011319-8b78f0a41ae3
github.com/mazznoer/csscolorparser v0.1.3
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
github.com/AllenDang/cimgui-go v0.0.0-20240321080015-b8f29f999b6d h1:AUfBQnUrFx3HutYvsJq/NPYjz7wnoY91zRO/AOW8/m8=
github.com/AllenDang/cimgui-go v0.0.0-20240321080015-b8f29f999b6d/go.mod h1:e6feXR4FrATVY/UrWS3si3KCJOm0wruwbxVI/B85fUM=
github.com/AllenDang/cimgui-go v0.0.0-20240424153022-294abe7370df h1:onXInWfJVhU1b6pvMf8wgkKNTwBiqKEIVWIumk/IM7Y=
github.com/AllenDang/cimgui-go v0.0.0-20240424153022-294abe7370df/go.mod h1:e6feXR4FrATVY/UrWS3si3KCJOm0wruwbxVI/B85fUM=
github.com/AllenDang/go-findfont v0.0.0-20200702051237-9f180485aeb8 h1:dKZMqib/yUDoCFigmz2agG8geZ/e3iRq304/KJXqKyw=
github.com/AllenDang/go-findfont v0.0.0-20200702051237-9f180485aeb8/go.mod h1:b4uuDd0s6KRIPa84cEEchdQ9ICh7K0OryZHbSzMca9k=
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
Expand Down

0 comments on commit b299dac

Please sign in to comment.