Skip to content

Commit

Permalink
Fixed some small bugs and added calc example
Browse files Browse the repository at this point in the history
Fixed window movement for windows without header and some small
wrong calculation inside the panel layout code. In addition I
added another example implementing a simple calculator.
  • Loading branch information
vurtun committed Apr 15, 2016
1 parent 0c4772d commit d7a9f14
Show file tree
Hide file tree
Showing 5 changed files with 474 additions and 56 deletions.
2 changes: 1 addition & 1 deletion demo/x11/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ main(void)

/* GUI */
{struct nk_panel layout;
if (nk_begin(ctx, &layout, "Demo", nk_rect(50, 50, 200, 300),
if (nk_begin(ctx, &layout, "Demo", nk_rect(50, 50, 200, 200),
NK_WINDOW_BORDER|NK_WINDOW_MOVABLE|NK_WINDOW_SCALABLE|
NK_WINDOW_CLOSABLE|NK_WINDOW_MINIMIZABLE|NK_WINDOW_TITLE))
{
Expand Down
5 changes: 5 additions & 0 deletions example/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -32,3 +32,8 @@ extended:
rm -f bin/extended $(OBJS)
$(CC) $(CFLAGS) -o bin/extended extended.c $(LIBS)

calculator:
@mkdir -p bin
rm -f bin/calculator $(OBJS)
$(CC) $(CFLAGS) -o bin/calculator calculator.c $(LIBS)

Loading

0 comments on commit d7a9f14

Please sign in to comment.