Skip to content

Commit 89da3f6

Browse files
authored
- fix SDL2 example build (#85)
1 parent f0bd027 commit 89da3f6

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

cmd/nk-example-sdl2/main.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,9 @@ func gfxMain(win *sdl.Window, ctx *nk.Context, state *State) {
128128
size := nk.NkVec2(nk.NkWidgetWidth(ctx), 400)
129129
if nk.NkComboBeginColor(ctx, state.bgColor, size) > 0 {
130130
nk.NkLayoutRowDynamic(ctx, 120, 1)
131-
state.bgColor = nk.NkColorPicker(ctx, state.bgColor, nk.ColorFormatRGBA)
131+
cf := nk.NkColorCf(state.bgColor)
132+
cf = nk.NkColorPicker(ctx, cf, nk.ColorFormatRGBA)
133+
state.bgColor = nk.NkRgbCf(cf)
132134
nk.NkLayoutRowDynamic(ctx, 25, 1)
133135
r, g, b, a := state.bgColor.RGBAi()
134136
r = nk.NkPropertyi(ctx, "#R:", 0, r, 255, 1, 1)

0 commit comments

Comments
 (0)