Comments (3)
this fix a sdl build
diff --git a/cmd/nk-example-sdl2/main.go b/cmd/nk-example-sdl2/main.go
index 4c0243b..011e675 100644
--- a/cmd/nk-example-sdl2/main.go
+++ b/cmd/nk-example-sdl2/main.go
@@ -128,7 +128,9 @@ func gfxMain(win *sdl.Window, ctx *nk.Context, state *State) {
size := nk.NkVec2(nk.NkWidgetWidth(ctx), 400)
if nk.NkComboBeginColor(ctx, state.bgColor, size) > 0 {
nk.NkLayoutRowDynamic(ctx, 120, 1)
- state.bgColor = nk.NkColorPicker(ctx, state.bgColor, nk.ColorFormatRGBA)
+ cf := nk.NkColorCf(state.bgColor)
+ cf = nk.NkColorPicker(ctx, cf, nk.ColorFormatRGBA)
+ state.bgColor = nk.NkRgbCf(cf)
nk.NkLayoutRowDynamic(ctx, 25, 1)
r, g, b, a := state.bgColor.RGBAi()
r = nk.NkPropertyi(ctx, "#R:", 0, r, 255, 1, 1)
from nuklear.
Hi,
I am getting the same error. Is there any workaround for this?
Error:
./main.go:112:37: undefined: flag
./main.go:115:37: undefined: flag
Regards,
Swathin
from nuklear.
@kondratev @swathins079 you should not build main.go
only, the package has other files as well, including util.go
Build the binary:
go build -tags sdl2 github.com/golang-ui/nuklear/cmd/nk-example-sdl2
or install:
go install -tags sdl2 github.com/golang-ui/nuklear/cmd/nk-example-sdl2
from nuklear.
Related Issues (20)
- Make toolchain doesn't work for me
- Keypad enter key does not work HOT 2
- Windows example demo won't build HOT 6
- is this project dead? HOT 1
- Can't install nuklear with go get HOT 1
- Freezes after first update HOT 1
- Setter and getter for Spacing, Padding and GroupPadding HOT 1
- Main menu items do not appear HOT 2
- how can i use this project in opengl other version, like gl-3.3 or gl 4.1 HOT 2
- nkEditString return flags error HOT 1
- etc.go getters/setters HOT 1
- Win64 unable to install: `undefined: gl.Strs` HOT 2
- Fix go_vet and golint issues HOT 1
- Sailfish OS HOT 4
- Suggested way to use NkEditString?
- EditMultiline doesn't work in GLFW_GL3. HOT 2
- Random crash on MacOS v10.15.2
- Unable to install
- Add vcpkg installation instructions
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nuklear.