Skip to content

Commit 76d7e8e

Browse files
authored
Merge pull request #926 from rswinkle/typos_and_minor_issues
Typos and minor issues
2 parents fee5a7c + 88380b4 commit 76d7e8e

11 files changed

Lines changed: 27 additions & 21 deletions

File tree

demo/common/overview.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -640,7 +640,7 @@ overview(struct nk_context *ctx)
640640
nk_layout_row(ctx, NK_STATIC, 25, 2, ratio);
641641
active = nk_edit_string(ctx, NK_EDIT_FIELD|NK_EDIT_SIG_ENTER, text[7], &text_len[7], 64, nk_filter_ascii);
642642
if (nk_button_label(ctx, "Submit") ||
643-
(active & NK_EDIT_COMMITED))
643+
(active & NK_EDIT_COMMITTED))
644644
{
645645
text[7][text_len[7]] = '\n';
646646
text_len[7]++;

demo/d3d9/nuklear_d3d9.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ nk_d3d9_render(enum nk_anti_aliasing AA)
153153
config.arc_segment_count = 22;
154154
config.tex_null = d3d9.tex_null;
155155

156-
/* convert shapes into vertexes */
156+
/* convert shapes into vertices */
157157
nk_buffer_init_default(&vbuf);
158158
nk_buffer_init_default(&ebuf);
159159
nk_convert(&d3d9.ctx, &d3d9.cmds, &vbuf, &ebuf, &config);

demo/glfw_opengl2/nuklear_glfw_gl2.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ nk_glfw3_render(enum nk_anti_aliasing AA)
154154
config.shape_AA = AA;
155155
config.line_AA = AA;
156156

157-
/* convert shapes into vertexes */
157+
/* convert shapes into vertices */
158158
nk_buffer_init_default(&vbuf);
159159
nk_buffer_init_default(&ebuf);
160160
nk_convert(&glfw.ctx, &dev->cmds, &vbuf, &ebuf, &config);

demo/sdl3_renderer/nuklear_sdl3_renderer.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -261,7 +261,7 @@ nk_sdl_render(struct nk_context* ctx, enum nk_anti_aliasing AA)
261261
config.shape_AA = AA;
262262
config.line_AA = AA;
263263

264-
/* convert shapes into vertexes */
264+
/* convert shapes into vertices */
265265
nk_buffer_init(&vbuf, &sdl->allocator, NK_BUFFER_DEFAULT_INITIAL_SIZE);
266266
nk_buffer_init(&ebuf, &sdl->allocator, NK_BUFFER_DEFAULT_INITIAL_SIZE);
267267
nk_convert(&sdl->ctx, &sdl->ogl.cmds, &vbuf, &ebuf, &config);

demo/sdl_opengl2/nuklear_sdl_gl2.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ nk_sdl_render(enum nk_anti_aliasing AA)
136136
config.shape_AA = AA;
137137
config.line_AA = AA;
138138

139-
/* convert shapes into vertexes */
139+
/* convert shapes into vertices */
140140
nk_buffer_init_default(&vbuf);
141141
nk_buffer_init_default(&ebuf);
142142
nk_convert(&sdl.ctx, &dev->cmds, &vbuf, &ebuf, &config);

demo/sdl_renderer/nuklear_sdl_renderer.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ nk_sdl_render(enum nk_anti_aliasing AA)
129129
config.shape_AA = AA;
130130
config.line_AA = AA;
131131

132-
/* convert shapes into vertexes */
132+
/* convert shapes into vertices */
133133
nk_buffer_init_default(&vbuf);
134134
nk_buffer_init_default(&ebuf);
135135
nk_convert(&sdl.ctx, &dev->cmds, &vbuf, &ebuf, &config);

demo/x11_opengl2/nuklear_xlib_gl2.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ nk_x11_render(enum nk_anti_aliasing AA, int max_vertex_buffer, int max_element_b
166166
config.shape_AA = AA;
167167
config.line_AA = AA;
168168

169-
/* convert shapes into vertexes */
169+
/* convert shapes into vertices */
170170
nk_buffer_init_default(&vbuf);
171171
nk_buffer_init_default(&ebuf);
172172
nk_convert(&x11.ctx, &dev->cmds, &vbuf, &ebuf, &config);

nuklear.h

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1140,7 +1140,7 @@ NK_API void nk_input_end(struct nk_context*);
11401140
* hardware directly. Therefore it is possible to just define
11411141
* `NK_INCLUDE_VERTEX_BUFFER_OUTPUT` which includes optional vertex output.
11421142
* To access the vertex output you first have to convert all draw commands into
1143-
* vertexes by calling `nk_convert` which takes in your preferred vertex format.
1143+
* vertices by calling `nk_convert` which takes in your preferred vertex format.
11441144
* After successfully converting all draw commands just iterate over and execute all
11451145
* vertex draw commands:
11461146
*
@@ -1271,7 +1271,7 @@ NK_API const struct nk_command* nk__next(struct nk_context*, const struct nk_com
12711271

12721272
/**
12731273
* \brief Converts all internal draw commands into vertex draw commands and fills
1274-
* three buffers with vertexes, vertex draw commands and vertex indices.
1274+
* three buffers with vertices, vertex draw commands and vertex indices.
12751275
*
12761276
* \details
12771277
* The vertex format as well as some other configuration values have to be
@@ -1390,7 +1390,7 @@ NK_API const struct nk_draw_command* nk__draw_next(const struct nk_draw_command*
13901390
* order. The topmost window thereby is the currently active window.<br /><br />
13911391
*
13921392
* To change window position inside the stack occurs either automatically by
1393-
* user input by being clicked on or programmatically by calling `nk_window_focus`.
1393+
* user input by being clicked on or programmatically by calling `nk_window_set_focus`.
13941394
* Windows by default are visible unless explicitly being defined with flag
13951395
* `NK_WINDOW_HIDDEN`, the user clicked the close button on windows with flag
13961396
* `NK_WINDOW_CLOSABLE` or if a window was explicitly hidden by calling
@@ -3733,8 +3733,11 @@ enum nk_edit_events {
37333733
NK_EDIT_INACTIVE = NK_FLAG(1), /**!< edit widget is not active and is not being modified */
37343734
NK_EDIT_ACTIVATED = NK_FLAG(2), /**!< edit widget went from state inactive to state active */
37353735
NK_EDIT_DEACTIVATED = NK_FLAG(3), /**!< edit widget went from state active to state inactive */
3736-
NK_EDIT_COMMITED = NK_FLAG(4) /**!< edit widget has received an enter and lost focus */
3736+
NK_EDIT_COMMITTED = NK_FLAG(4) /**!< edit widget has received an enter and lost focus */
37373737
};
3738+
3739+
#define NK_EDIT_COMMITED NK_EDIT_COMMITTED
3740+
37383741
NK_API nk_flags nk_edit_string(struct nk_context*, nk_flags, char *buffer, int *len, int max, nk_plugin_filter);
37393742
NK_API nk_flags nk_edit_string_zero_terminated(struct nk_context*, nk_flags, char *buffer, int max, nk_plugin_filter);
37403743
NK_API nk_flags nk_edit_buffer(struct nk_context*, nk_flags, struct nk_text_edit*, nk_plugin_filter);
@@ -4964,7 +4967,7 @@ NK_API nk_bool nk_input_is_key_down(const struct nk_input*, enum nk_keys);
49644967
* \page "Draw List"
49654968
* The optional vertex buffer draw list provides a 2D drawing context
49664969
* with antialiasing functionality which takes basic filled or outlined shapes
4967-
* or a path and outputs vertexes, elements and draw commands.
4970+
* or a path and outputs vertices, elements and draw commands.
49684971
* The actual draw list API is not required to be used directly while using this
49694972
* library since converting the default library draw command output is done by
49704973
* just calling `nk_convert` but I decided to still make this library accessible
@@ -10029,7 +10032,7 @@ nk_draw_list_alloc_vertices(struct nk_draw_list *list, nk_size count)
1002910032
/* This assert triggers because your are drawing a lot of stuff and nuklear
1003010033
* defined `nk_draw_index` as `nk_ushort` to safe space be default.
1003110034
*
10032-
* So you reached the maximum number of indices or rather vertexes.
10035+
* So you reached the maximum number of indices or rather vertices.
1003310036
* To solve this issue please change typedef `nk_draw_index` to `nk_uint`
1003410037
* and don't forget to specify the new element size in your drawing
1003510038
* backend (OpenGL, DirectX, ...). For example in OpenGL for `glDrawElements`
@@ -28156,7 +28159,7 @@ nk_do_edit(nk_flags *state, struct nk_command_buffer *out,
2815628159
if (flags & NK_EDIT_CTRL_ENTER_NEWLINE && shift_mod)
2815728160
nk_textedit_text(edit, "\n", 1);
2815828161
else if (flags & NK_EDIT_SIG_ENTER)
28159-
ret |= NK_EDIT_COMMITED;
28162+
ret |= NK_EDIT_COMMITTED;
2816028163
else nk_textedit_text(edit, "\n", 1);
2816128164
}
2816228165

src/nuklear.h

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -924,7 +924,7 @@ NK_API void nk_input_end(struct nk_context*);
924924
* hardware directly. Therefore it is possible to just define
925925
* `NK_INCLUDE_VERTEX_BUFFER_OUTPUT` which includes optional vertex output.
926926
* To access the vertex output you first have to convert all draw commands into
927-
* vertexes by calling `nk_convert` which takes in your preferred vertex format.
927+
* vertices by calling `nk_convert` which takes in your preferred vertex format.
928928
* After successfully converting all draw commands just iterate over and execute all
929929
* vertex draw commands:
930930
*
@@ -1055,7 +1055,7 @@ NK_API const struct nk_command* nk__next(struct nk_context*, const struct nk_com
10551055

10561056
/**
10571057
* \brief Converts all internal draw commands into vertex draw commands and fills
1058-
* three buffers with vertexes, vertex draw commands and vertex indices.
1058+
* three buffers with vertices, vertex draw commands and vertex indices.
10591059
*
10601060
* \details
10611061
* The vertex format as well as some other configuration values have to be
@@ -1174,7 +1174,7 @@ NK_API const struct nk_draw_command* nk__draw_next(const struct nk_draw_command*
11741174
* order. The topmost window thereby is the currently active window.<br /><br />
11751175
*
11761176
* To change window position inside the stack occurs either automatically by
1177-
* user input by being clicked on or programmatically by calling `nk_window_focus`.
1177+
* user input by being clicked on or programmatically by calling `nk_window_set_focus`.
11781178
* Windows by default are visible unless explicitly being defined with flag
11791179
* `NK_WINDOW_HIDDEN`, the user clicked the close button on windows with flag
11801180
* `NK_WINDOW_CLOSABLE` or if a window was explicitly hidden by calling
@@ -3517,8 +3517,11 @@ enum nk_edit_events {
35173517
NK_EDIT_INACTIVE = NK_FLAG(1), /**!< edit widget is not active and is not being modified */
35183518
NK_EDIT_ACTIVATED = NK_FLAG(2), /**!< edit widget went from state inactive to state active */
35193519
NK_EDIT_DEACTIVATED = NK_FLAG(3), /**!< edit widget went from state active to state inactive */
3520-
NK_EDIT_COMMITED = NK_FLAG(4) /**!< edit widget has received an enter and lost focus */
3520+
NK_EDIT_COMMITTED = NK_FLAG(4) /**!< edit widget has received an enter and lost focus */
35213521
};
3522+
3523+
#define NK_EDIT_COMMITED NK_EDIT_COMMITTED
3524+
35223525
NK_API nk_flags nk_edit_string(struct nk_context*, nk_flags, char *buffer, int *len, int max, nk_plugin_filter);
35233526
NK_API nk_flags nk_edit_string_zero_terminated(struct nk_context*, nk_flags, char *buffer, int max, nk_plugin_filter);
35243527
NK_API nk_flags nk_edit_buffer(struct nk_context*, nk_flags, struct nk_text_edit*, nk_plugin_filter);
@@ -4748,7 +4751,7 @@ NK_API nk_bool nk_input_is_key_down(const struct nk_input*, enum nk_keys);
47484751
* \page "Draw List"
47494752
* The optional vertex buffer draw list provides a 2D drawing context
47504753
* with antialiasing functionality which takes basic filled or outlined shapes
4751-
* or a path and outputs vertexes, elements and draw commands.
4754+
* or a path and outputs vertices, elements and draw commands.
47524755
* The actual draw list API is not required to be used directly while using this
47534756
* library since converting the default library draw command output is done by
47544757
* just calling `nk_convert` but I decided to still make this library accessible

src/nuklear_edit.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -269,7 +269,7 @@ nk_do_edit(nk_flags *state, struct nk_command_buffer *out,
269269
if (flags & NK_EDIT_CTRL_ENTER_NEWLINE && shift_mod)
270270
nk_textedit_text(edit, "\n", 1);
271271
else if (flags & NK_EDIT_SIG_ENTER)
272-
ret |= NK_EDIT_COMMITED;
272+
ret |= NK_EDIT_COMMITTED;
273273
else nk_textedit_text(edit, "\n", 1);
274274
}
275275

0 commit comments

Comments
 (0)