nktemplates

package module
v0.0.0-...-8ad1c96 Latest Latest
Warning

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

Go to latest
Published: Feb 12, 2020 License: MIT Imports: 14 Imported by: 2 modules, 4 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

nuklear-templates

Easy to use layouts for nuklear-go

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ButtonBar

func ButtonBar(ctx *nk.Context, buttons []string, callback func(i int, s string))

A horizontal button bar. Fires the callback when clicked

func ButtonBox

func ButtonBox(ctx *nk.Context, pane1, pane2 func(ctx *nk.Context))

func ClassicEmail3Pane

func ClassicEmail3Pane(title string, win *glfw.Window, ctx *nk.Context, state interface{}, pane1, pane2, pane3 func(ctx *nk.Context))

3 pane layout - two small panes on the top, a large box below for displaying the contents of emails

You provide the contents of panes 1, 2, and 3 as callback functions that take no args and return no values

func LeftCol

func LeftCol(win *glfw.Window, ctx *nk.Context, state interface{}, pane1, pane2, pane3 func())

func LoadImageData

func LoadImageData(data []uint8, x, y int) nk.Image

func LoadImageFile

func LoadImageFile(filename string, x, y int) (*nk.Image, error)

func StartNuke

func StartNuke() (*glfw.Window, *nk.Context, chan struct{}, chan struct{})

Start nuklear

You don't have to use this, you can initialise nuklear by yourself and just use the templates

func TkRatWin

func TkRatWin(win *glfw.Window, ctx *nk.Context, state interface{}, menu1, pane1, pane2 func(ctx *nk.Context))

The Ratatosk layout

func TwoPanelStacked

func TwoPanelStacked(win *glfw.Window, ctx *nk.Context, state interface{}, pane1, pane2 func(ctx *nk.Context))

Types

type Texture

type Texture struct {
	Handle uint32
	// contains filtered or unexported fields
}

func NewGarbageTexture

func NewGarbageTexture(img image.Image, wrapR, wrapS int32) (*Texture, error)

func NewTextureFromData

func NewTextureFromData(data []uint8, width, height int32) (*Texture, error)

func NewTextureFromFile

func NewTextureFromFile(file string, wrapR, wrapS int32) (*Texture, error)

func RawTexture

func RawTexture(data []byte, wrapR, wrapS int32, texture *Texture) (*Texture, error)

func (*Texture) Bind

func (tex *Texture) Bind(texUnit uint32)

func (*Texture) SetUniform

func (tex *Texture) SetUniform(uniformLoc int32) error

func (*Texture) UnBind

func (tex *Texture) UnBind()

Jump to

Keyboard shortcuts

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