nk-group-layout

command
v0.0.0-...-89da3f6 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 21, 2020 License: MIT Imports: 7 Imported by: 0

README

nk-group-layout

This example shows, how to use group layout provided by nuklear API.

Please note, that the following explanations are taken from the nuklear doc, available here

Groups

Groups are basically windows inside windows. They allow to subdivide space in a window to layout widgets as a group. Almost all more complex widget layouting requirements can be solved using groups and basic layouting fuctionality. Groups just like windows are identified by an unique name and internally keep track of scrollbar offsets by default. However additional versions are provided to directly manage the scrollbar.

To create a group you have to call one of the three nk.NkGroupBegin functions to start group declarations and nk.NkGroupEnd at the end. Furthermore it is required to check the return value of nk.NkGroupBegin and only process widgets inside the window if the value is not 0. Nesting groups is possible and even encouraged since many layouting schemes can only be achieved by nesting. Groups, unlike windows, need nk.NkGroupEnd to be only called if the corosponding nk.NkGroupBegin call does not return 0. Note that group names should be unique.

Install

Make sure, that the following packages are installed

  • github.com/go-gl/gl/v3.2-core/gl
  • github.com/go-gl/glfw/v3.2/glfw
  • github.com/golang-ui/nuklear/nk
  • github.com/xlab/closer

Then run

$ go run main.go

Now a runnable binary should have been created in your $GOBIN path

Maintainer

jannst mkawaganga@gmail.com

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL