February 2019
Intermediate to advanced
450 pages
11h 59m
English
We start with a simple layout function called drawLayout(). This will set up the basic application layout similar to the GoMail design we created in Chapter 4, Walk - Building Graphical Windows Applications. The beginning of the code sets out space for the menu and toolbar that will expand to stretch the width of our window. We then start a template layout using NkLayoutRowTemplateBegin() to have a fixed size column on the left for our email list and a wider, variable width column on the right that will expand as our window resizes:
func drawLayout(win *glfw.Window, ctx *nk.Context, height int) { toolbarHeight := float32(36) nk.NkLayoutRowDynamic(ctx, toolbarHeight, 1) nk.NkLabel(ctx, "Toolbar", nk.TextAlignLeft) nk.NkLayoutRowTemplateBegin(ctx ...
Read now
Unlock full access