240 #ifndef NK_NUKLEAR_H_ 241 #define NK_NUKLEAR_H_ 253 #define NK_UNDEFINED (-1.0f) 254 #define NK_UTF_INVALID 0xFFFD 255 #define NK_UTF_SIZE 4 257 #define NK_INPUT_MAX 16 259 #ifndef NK_MAX_NUMBER_BUFFER 260 #define NK_MAX_NUMBER_BUFFER 64 262 #ifndef NK_SCROLLBAR_HIDING_TIMEOUT 263 #define NK_SCROLLBAR_HIDING_TIMEOUT 4.0f 274 #if (defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199409L)) 275 #define NK_API static inline 276 #elif defined(__cplusplus) 277 #define NK_API static inline 279 #define NK_API static 282 #define NK_API extern 286 #define NK_INTERN static 287 #define NK_STORAGE static 288 #define NK_GLOBAL static 290 #define NK_FLAG(x) (1 << (x)) 291 #define NK_STRINGIFY(x) #x 292 #define NK_MACRO_STRINGIFY(x) NK_STRINGIFY(x) 293 #define NK_STRING_JOIN_IMMEDIATE(arg1, arg2) arg1 ## arg2 294 #define NK_STRING_JOIN_DELAY(arg1, arg2) NK_STRING_JOIN_IMMEDIATE(arg1, arg2) 295 #define NK_STRING_JOIN(arg1, arg2) NK_STRING_JOIN_DELAY(arg1, arg2) 298 #define NK_UNIQUE_NAME(name) NK_STRING_JOIN(name,__COUNTER__) 300 #define NK_UNIQUE_NAME(name) NK_STRING_JOIN(name,__LINE__) 303 #ifndef NK_STATIC_ASSERT 304 #define NK_STATIC_ASSERT(exp) typedef char NK_UNIQUE_NAME(_dummy_array)[(exp)?1:-1] 309 #define NK_FILE_LINE __FILE__ ":" NK_MACRO_STRINGIFY(__COUNTER__) 311 #define NK_FILE_LINE __FILE__ ":" NK_MACRO_STRINGIFY(__LINE__) 315 #define NK_MIN(a,b) ((a) < (b) ? (a) : (b)) 316 #define NK_MAX(a,b) ((a) < (b) ? (b) : (a)) 317 #define NK_CLAMP(i,v,x) (NK_MAX(NK_MIN(v,x), i)) 325 #ifdef NK_INCLUDE_FIXED_TYPES 327 #define NK_INT8 int8_t 328 #define NK_UINT8 uint8_t 329 #define NK_INT16 int16_t 330 #define NK_UINT16 uint16_t 331 #define NK_INT32 int32_t 332 #define NK_UINT32 uint32_t 333 #define NK_SIZE_TYPE uintptr_t 334 #define NK_POINTER_TYPE uintptr_t 340 #define NK_UINT8 unsigned char 343 #define NK_INT16 signed short 346 #define NK_UINT16 unsigned short 349 #if defined(_MSC_VER) 350 #define NK_INT32 __int32 352 #define NK_INT32 signed int 356 #if defined(_MSC_VER) 357 #define NK_UINT32 unsigned __int32 359 #define NK_UINT32 unsigned int 363 #if defined(_WIN64) && defined(_MSC_VER) 364 #define NK_SIZE_TYPE unsigned __int64 365 #elif (defined(_WIN32) || defined(WIN32)) && defined(_MSC_VER) 366 #define NK_SIZE_TYPE unsigned __int32 367 #elif defined(__GNUC__) || defined(__clang__) 368 #if defined(__x86_64__) || defined(__ppc64__) 369 #define NK_SIZE_TYPE unsigned long 371 #define NK_SIZE_TYPE unsigned int 374 #define NK_SIZE_TYPE unsigned long 377 #ifndef NK_POINTER_TYPE 378 #if defined(_WIN64) && defined(_MSC_VER) 379 #define NK_POINTER_TYPE unsigned __int64 380 #elif (defined(_WIN32) || defined(WIN32)) && defined(_MSC_VER) 381 #define NK_POINTER_TYPE unsigned __int32 382 #elif defined(__GNUC__) || defined(__clang__) 383 #if defined(__x86_64__) || defined(__ppc64__) 384 #define NK_POINTER_TYPE unsigned long 386 #define NK_POINTER_TYPE unsigned int 389 #define NK_POINTER_TYPE unsigned long 429 struct nk_draw_command;
437 struct nk_draw_vertex_layout_element;
441 struct nk_style_slide;
540 #ifdef NK_INCLUDE_DEFAULT_ALLOCATOR 600 #ifdef NK_INCLUDE_COMMAND_USERDATA 1011 #define nk_foreach(c, ctx) for((c) = nk__begin(ctx); (c) != 0; (c) = nk__next(ctx,c)) 1012 #ifdef NK_INCLUDE_VERTEX_BUFFER_OUTPUT 1047 NK_API const struct nk_draw_command* nk__draw_next(
const struct nk_draw_command*,
const struct nk_buffer*,
const struct nk_context*);
1053 #define nk_draw_foreach(cmd,ctx, b) for((cmd)=nk__draw_begin(ctx, b); (cmd)!=0; (cmd)=nk__draw_next(cmd, b, ctx)) 1818 #define nk_tree_push(ctx, type, title, state) nk_tree_push_hashed(ctx, type, title, state, NK_FILE_LINE,nk_strlen(NK_FILE_LINE),__LINE__) 1819 #define nk_tree_push_id(ctx, type, title, state, id) nk_tree_push_hashed(ctx, type, title, state, NK_FILE_LINE,nk_strlen(NK_FILE_LINE),id) 1821 #define nk_tree_image_push(ctx, type, img, title, state) nk_tree_image_push_hashed(ctx, type, img, title, state, NK_FILE_LINE,nk_strlen(NK_FILE_LINE),__LINE__) 1822 #define nk_tree_image_push_id(ctx, type, img, title, state, id) nk_tree_image_push_hashed(ctx, type, img, title, state, NK_FILE_LINE,nk_strlen(NK_FILE_LINE),id) 1886 #ifdef NK_INCLUDE_STANDARD_VARARGS 1893 NK_API void nk_value_uint(
struct nk_context*,
const char *prefix,
unsigned int);
2465 struct nk_user_font_glyph;
2468 struct nk_user_font_glyph *glyph,
2471 #ifdef NK_INCLUDE_VERTEX_BUFFER_OUTPUT 2472 struct nk_user_font_glyph {
2491 #ifdef NK_INCLUDE_VERTEX_BUFFER_OUTPUT 2499 #ifdef NK_INCLUDE_FONT_BAKING 2500 enum nk_font_coord_type {
2505 struct nk_baked_font {
2508 float ascent, descent;
2518 struct nk_font_config {
2519 struct nk_font_config *
next;
2528 unsigned char ttf_data_owned_by_atlas;
2530 unsigned char merge_mode;
2532 unsigned char pixel_snap;
2534 unsigned char oversample_v, oversample_h;
2536 unsigned char padding[3];
2540 enum nk_font_coord_type coord_type;
2546 struct nk_baked_font *
font;
2552 struct nk_font_glyph {
2555 float x0, y0, x1,
y1,
w,
h;
2560 struct nk_font *
next;
2562 struct nk_baked_font
info;
2564 struct nk_font_glyph *glyphs;
2565 const struct nk_font_glyph *fallback;
2568 struct nk_font_config *
config;
2571 enum nk_font_atlas_format {
2572 NK_FONT_ATLAS_ALPHA8,
2573 NK_FONT_ATLAS_RGBA32
2576 struct nk_font_atlas {
2588 struct nk_font_glyph *glyphs;
2590 struct nk_font *fonts;
2591 struct nk_font_config *
config;
2601 #ifdef NK_INCLUDE_DEFAULT_ALLOCATOR 2602 NK_API void nk_font_atlas_init_default(
struct nk_font_atlas*);
2606 NK_API void nk_font_atlas_begin(
struct nk_font_atlas*);
2607 NK_API struct nk_font_config nk_font_config(float pixel_height);
2608 NK_API struct nk_font *nk_font_atlas_add(
struct nk_font_atlas*,
const struct nk_font_config*);
2609 #ifdef NK_INCLUDE_DEFAULT_FONT 2610 NK_API struct nk_font* nk_font_atlas_add_default(
struct nk_font_atlas*,
float height,
const struct nk_font_config*);
2613 #ifdef NK_INCLUDE_STANDARD_IO 2614 NK_API struct nk_font* nk_font_atlas_add_from_file(
struct nk_font_atlas *
atlas,
const char *file_path,
float height,
const struct nk_font_config*);
2616 NK_API struct nk_font *nk_font_atlas_add_compressed(
struct nk_font_atlas*,
void *memory,
nk_size size,
float height,
const struct nk_font_config*);
2617 NK_API struct nk_font* nk_font_atlas_add_compressed_base85(
struct nk_font_atlas*,
const char *
data,
float height,
const struct nk_font_config *
config);
2618 NK_API const void* nk_font_atlas_bake(
struct nk_font_atlas*,
int *
width,
int *
height,
enum nk_font_atlas_format);
2620 NK_API const struct nk_font_glyph* nk_font_find_glyph(
struct nk_font*,
nk_rune unicode);
2621 NK_API void nk_font_atlas_cleanup(
struct nk_font_atlas *
atlas);
2622 NK_API void nk_font_atlas_clear(
struct nk_font_atlas*);
2706 #ifdef NK_INCLUDE_DEFAULT_ALLOCATOR 2736 #ifdef NK_INCLUDE_DEFAULT_ALLOCATOR 2805 #ifndef NK_TEXTEDIT_UNDOSTATECOUNT 2806 #define NK_TEXTEDIT_UNDOSTATECOUNT 99 2809 #ifndef NK_TEXTEDIT_UNDOCHARCOUNT 2810 #define NK_TEXTEDIT_UNDOCHARCOUNT 999 2877 #ifdef NK_INCLUDE_DEFAULT_ALLOCATOR 2967 #ifdef NK_INCLUDE_COMMAND_USERDATA 3103 unsigned short w,
unsigned short h,
nk_handle callback_data);
3139 NK_API void nk_stroke_curve(
struct nk_command_buffer*,
float,
float,
float,
float,
float,
float,
float,
float,
float line_thickness,
struct nk_color);
3218 #ifdef NK_INCLUDE_VERTEX_BUFFER_OUTPUT 3233 enum nk_draw_list_stroke {
3240 enum nk_draw_vertex_layout_attribute {
3244 NK_VERTEX_ATTRIBUTE_COUNT
3247 enum nk_draw_vertex_layout_format {
3257 NK_FORMAT_COLOR_BEGIN,
3258 NK_FORMAT_R8G8B8 = NK_FORMAT_COLOR_BEGIN,
3259 NK_FORMAT_R16G15B16,
3260 NK_FORMAT_R32G32B32,
3264 NK_FORMAT_R16G15B16A16,
3265 NK_FORMAT_R32G32B32A32,
3266 NK_FORMAT_R32G32B32A32_FLOAT,
3267 NK_FORMAT_R32G32B32A32_DOUBLE,
3271 NK_FORMAT_COLOR_END = NK_FORMAT_RGBA32,
3275 #define NK_VERTEX_LAYOUT_END NK_VERTEX_ATTRIBUTE_COUNT,NK_FORMAT_COUNT,0 3276 struct nk_draw_vertex_layout_element {
3277 enum nk_draw_vertex_layout_attribute attribute;
3278 enum nk_draw_vertex_layout_format
format;
3282 struct nk_draw_command {
3283 unsigned int elem_count;
3289 #ifdef NK_INCLUDE_COMMAND_USERDATA 3294 struct nk_draw_list {
3296 struct nk_vec2 circle_vtx[12];
3303 unsigned int element_count;
3304 unsigned int vertex_count;
3305 unsigned int cmd_count;
3308 unsigned int path_count;
3309 unsigned int path_offset;
3314 #ifdef NK_INCLUDE_COMMAND_USERDATA 3320 NK_API void nk_draw_list_init(
struct nk_draw_list*);
3322 NK_API void nk_draw_list_clear(
struct nk_draw_list*);
3325 #define nk_draw_list_foreach(cmd, can, b) for((cmd)=nk__draw_list_begin(can, b); (cmd)!=0; (cmd)=nk__draw_list_next(cmd, b, can)) 3326 NK_API const struct nk_draw_command* nk__draw_list_begin(
const struct nk_draw_list*,
const struct nk_buffer*);
3327 NK_API const struct nk_draw_command* nk__draw_list_next(
const struct nk_draw_command*,
const struct nk_buffer*,
const struct nk_draw_list*);
3328 NK_API const struct nk_draw_command* nk__draw_list_end(
const struct nk_draw_list*,
const struct nk_buffer*);
3329 NK_API void nk_draw_list_clear(
struct nk_draw_list *list);
3332 NK_API void nk_draw_list_path_clear(
struct nk_draw_list*);
3333 NK_API void nk_draw_list_path_line_to(
struct nk_draw_list*,
struct nk_vec2 pos);
3334 NK_API void nk_draw_list_path_arc_to_fast(
struct nk_draw_list*,
struct nk_vec2 center,
float radius,
int a_min,
int a_max);
3335 NK_API void nk_draw_list_path_arc_to(
struct nk_draw_list*,
struct nk_vec2 center,
float radius,
float a_min,
float a_max,
unsigned int segments);
3336 NK_API void nk_draw_list_path_rect_to(
struct nk_draw_list*,
struct nk_vec2 a,
struct nk_vec2 b,
float rounding);
3338 NK_API void nk_draw_list_path_fill(
struct nk_draw_list*,
struct nk_color);
3339 NK_API void nk_draw_list_path_stroke(
struct nk_draw_list*,
struct nk_color,
enum nk_draw_list_stroke closed,
float thickness);
3343 NK_API void nk_draw_list_stroke_rect(
struct nk_draw_list*,
struct nk_rect rect,
struct nk_color,
float rounding,
float thickness);
3345 NK_API void nk_draw_list_stroke_circle(
struct nk_draw_list*,
struct nk_vec2 center,
float radius,
struct nk_color,
unsigned int segs,
float thickness);
3347 NK_API void nk_draw_list_stroke_poly_line(
struct nk_draw_list*,
const struct nk_vec2 *pnts,
const unsigned int cnt,
struct nk_color,
enum nk_draw_list_stroke,
float thickness,
enum nk_anti_aliasing);
3350 NK_API void nk_draw_list_fill_rect(
struct nk_draw_list*,
struct nk_rect rect,
struct nk_color,
float rounding);
3353 NK_API void nk_draw_list_fill_circle(
struct nk_draw_list*,
struct nk_vec2 center,
float radius,
struct nk_color col,
unsigned int segs);
3359 #ifdef NK_INCLUDE_COMMAND_USERDATA 3360 NK_API void nk_draw_list_push_userdata(
struct nk_draw_list*,
nk_handle userdata);
3810 #ifndef NK_MAX_LAYOUT_ROW_TEMPLATE_COLUMNS 3811 #define NK_MAX_LAYOUT_ROW_TEMPLATE_COLUMNS 16 3813 #ifndef NK_CHART_MAX_SLOT 3814 #define NK_CHART_MAX_SLOT 4 3911 #ifndef NK_WINDOW_MAX_NAME 3912 #define NK_WINDOW_MAX_NAME 64 4024 #ifndef NK_BUTTON_BEHAVIOR_STACK_SIZE 4025 #define NK_BUTTON_BEHAVIOR_STACK_SIZE 8 4028 #ifndef NK_FONT_STACK_SIZE 4029 #define NK_FONT_STACK_SIZE 8 4032 #ifndef NK_STYLE_ITEM_STACK_SIZE 4033 #define NK_STYLE_ITEM_STACK_SIZE 16 4036 #ifndef NK_FLOAT_STACK_SIZE 4037 #define NK_FLOAT_STACK_SIZE 32 4040 #ifndef NK_VECTOR_STACK_SIZE 4041 #define NK_VECTOR_STACK_SIZE 16 4044 #ifndef NK_FLAGS_STACK_SIZE 4045 #define NK_FLAGS_STACK_SIZE 32 4048 #ifndef NK_COLOR_STACK_SIZE 4049 #define NK_COLOR_STACK_SIZE 32 4052 #define NK_CONFIGURATION_STACK_TYPE(prefix, name, type)\ 4053 struct nk_config_stack_##name##_element {\ 4054 prefix##_##type *address;\ 4055 prefix##_##type old_value;\ 4057 #define NK_CONFIG_STACK(type,size)\ 4058 struct nk_config_stack_##type {\ 4060 struct nk_config_stack_##type##_element elements[size];\ 4063 #define nk_float float 4093 #define NK_VALUE_PAGE_CAPACITY \ 4094 (((NK_MAX(sizeof(struct nk_window),sizeof(struct nk_panel)) / sizeof(nk_uint))) / 2) 4147 #ifdef NK_INCLUDE_VERTEX_BUFFER_OUTPUT 4148 struct nk_draw_list draw_list;
4150 #ifdef NK_INCLUDE_COMMAND_USERDATA 4177 #define NK_PI 3.141592654f 4178 #define NK_UTF_INVALID 0xFFFD 4179 #define NK_MAX_FLOAT_PRECISION 2 4181 #define NK_UNUSED(x) ((void)(x)) 4182 #define NK_SATURATE(x) (NK_MAX(0, NK_MIN(1.0f, x))) 4183 #define NK_LEN(a) (sizeof(a)/sizeof(a)[0]) 4184 #define NK_ABS(a) (((a) < 0) ? -(a) : (a)) 4185 #define NK_BETWEEN(x, a, b) ((a) <= (x) && (x) < (b)) 4186 #define NK_INBOX(px, py, x, y, w, h)\ 4187 (NK_BETWEEN(px,x,x+w) && NK_BETWEEN(py,y,y+h)) 4188 #define NK_INTERSECT(x0, y0, w0, h0, x1, y1, w1, h1) \ 4189 (!(((x1 > (x0 + w0)) || ((x1 + w1) < x0) || (y1 > (y0 + h0)) || (y1 + h1) < y0))) 4190 #define NK_CONTAINS(x, y, w, h, bx, by, bw, bh)\ 4191 (NK_INBOX(x,y, bx, by, bw, bh) && NK_INBOX(x+w,y+h, bx, by, bw, bh)) 4193 #define nk_vec2_sub(a, b) nk_vec2((a).x - (b).x, (a).y - (b).y) 4194 #define nk_vec2_add(a, b) nk_vec2((a).x + (b).x, (a).y + (b).y) 4195 #define nk_vec2_len_sqr(a) ((a).x*(a).x+(a).y*(a).y) 4196 #define nk_vec2_muls(a, t) nk_vec2((a).x * (t), (a).y * (t)) 4198 #define nk_ptr_add(t, p, i) ((t*)((void*)((nk_byte*)(p) + (i)))) 4199 #define nk_ptr_add_const(t, p, i) ((const t*)((const void*)((const nk_byte*)(p) + (i)))) 4200 #define nk_zero_struct(s) nk_zero(&s, sizeof(s)) 4206 #if defined(__PTRDIFF_TYPE__) 4207 # define NK_UINT_TO_PTR(x) ((void*)(__PTRDIFF_TYPE__)(x)) 4208 # define NK_PTR_TO_UINT(x) ((nk_size)(__PTRDIFF_TYPE__)(x)) 4209 #elif !defined(__GNUC__) 4210 # define NK_UINT_TO_PTR(x) ((void*)&((char*)0)[x]) 4211 # define NK_PTR_TO_UINT(x) ((nk_size)(((char*)x)-(char*)0)) 4212 #elif defined(NK_USE_FIXED_TYPES) 4213 # define NK_UINT_TO_PTR(x) ((void*)(uintptr_t)(x)) 4214 # define NK_PTR_TO_UINT(x) ((uintptr_t)(x)) 4216 # define NK_UINT_TO_PTR(x) ((void*)(x)) 4217 # define NK_PTR_TO_UINT(x) ((nk_size)(x)) 4220 #define NK_ALIGN_PTR(x, mask)\ 4221 (NK_UINT_TO_PTR((NK_PTR_TO_UINT((nk_byte*)(x) + (mask-1)) & ~(mask-1)))) 4222 #define NK_ALIGN_PTR_BACK(x, mask)\ 4223 (NK_UINT_TO_PTR((NK_PTR_TO_UINT((nk_byte*)(x)) & ~(mask-1)))) 4225 #define NK_OFFSETOF(st,m) ((nk_ptr)&(((st*)0)->m)) 4226 #define NK_CONTAINER_OF(ptr,type,member)\ 4227 (type*)((void*)((char*)(1 ? (ptr): &((type*)0)->member) - NK_OFFSETOF(type, member))) 4234 template<
typename T>
struct nk_alignof;
4235 template<
typename T,
int size_diff>
struct nk_helper{
enum {
value = size_diff};};
4237 template<
typename T>
struct nk_alignof{
struct Big {
T x;
char c;};
enum {
4239 #define NK_ALIGNOF(t) (nk_alignof<t>::value) 4240 #elif defined(_MSC_VER) 4241 #define NK_ALIGNOF(t) (__alignof(t)) 4243 #define NK_ALIGNOF(t) ((char*)(&((struct {char c; t _h;}*)0)->_h) - (char*)0) 4254 #ifdef NK_IMPLEMENTATION 4256 #ifndef NK_POOL_DEFAULT_CAPACITY 4257 #define NK_POOL_DEFAULT_CAPACITY 16 4260 #ifndef NK_DEFAULT_COMMAND_BUFFER_SIZE 4261 #define NK_DEFAULT_COMMAND_BUFFER_SIZE (4*1024) 4264 #ifndef NK_BUFFER_DEFAULT_INITIAL_SIZE 4265 #define NK_BUFFER_DEFAULT_INITIAL_SIZE (4*1024) 4269 #ifdef NK_INCLUDE_DEFAULT_ALLOCATOR 4272 #ifdef NK_INCLUDE_STANDARD_IO 4275 #ifdef NK_INCLUDE_STANDARD_VARARGS 4280 #define NK_ASSERT(expr) assert(expr) 4284 #define NK_MEMSET nk_memset 4287 #define NK_MEMCPY nk_memcopy 4290 #define NK_SQRT nk_sqrt 4293 #define NK_SIN nk_sin 4296 #define NK_COS nk_cos 4299 #define NK_STRTOD nk_strtod 4302 #define NK_DTOA nk_dtoa 4305 #define NK_DEFAULT (-1) 4307 #ifndef NK_VSNPRINTF 4312 #if (defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L)) ||\ 4313 (defined(__cplusplus) && (__cplusplus >= 201103L)) || \ 4314 (defined(_POSIX_C_SOURCE) && (_POSIX_C_SOURCE >= 200112L)) ||\ 4315 (defined(_XOPEN_SOURCE) && (_XOPEN_SOURCE >= 500)) ||\ 4316 defined(_ISOC99_SOURCE) || defined(_BSD_SOURCE) 4317 #define NK_VSNPRINTF(s,n,f,a) vsnprintf(s,n,f,a) 4319 #define NK_VSNPRINTF(s,n,f,a) vsprintf(s,f,a) 4323 #define NK_SCHAR_MIN (-127) 4324 #define NK_SCHAR_MAX 127 4325 #define NK_UCHAR_MIN 0 4326 #define NK_UCHAR_MAX 256 4327 #define NK_SSHORT_MIN (-32767) 4328 #define NK_SSHORT_MAX 32767 4329 #define NK_USHORT_MIN 0 4330 #define NK_USHORT_MAX 65535 4331 #define NK_SINT_MIN (-2147483647) 4332 #define NK_SINT_MAX 2147483647 4333 #define NK_UINT_MIN 0 4334 #define NK_UINT_MAX 4294967295u 4349 NK_GLOBAL const struct nk_rect nk_null_rect = {-8192.0f, -8192.0f, 16384, 16384};
4350 #define NK_FLOAT_PRECISION 0.00000000000001 4394 nk_inv_sqrt(
float number)
4397 const float threehalfs = 1.5f;
4398 union {
nk_uint i;
float f;} conv = {0};
4401 conv.i = 0x5f375A84 - (conv.i >> 1);
4402 conv.f = conv.f * (threehalfs - (
x2 * conv.f * conv.f));
4409 return x * nk_inv_sqrt(
x);
4418 NK_STORAGE const float a3 = -1.38078780785773762e-1
f;
4419 NK_STORAGE const float a4 = -2.67353392911981221e-2
f;
4420 NK_STORAGE const float a5 = +2.08026600266304389e-2
f;
4421 NK_STORAGE const float a6 = -3.03996055049204407e-3
f;
4422 NK_STORAGE const float a7 = +1.38235642404333740e-4
f;
4423 return a0 +
x*(
a1 +
x*(
a2 +
x*(a3 +
x*(a4 +
x*(a5 +
x*(a6 +
x*a7))))));
4432 NK_STORAGE const float a3 = -1.18134036025221444e-1
f;
4433 NK_STORAGE const float a4 = +1.07123798512170878e-1
f;
4434 NK_STORAGE const float a5 = -1.86637164165180873e-2
f;
4435 NK_STORAGE const float a6 = +9.90140908664079833e-4
f;
4436 NK_STORAGE const float a7 = -5.23022132118824778e-14
f;
4437 return a0 +
x*(
a1 +
x*(
a2 +
x*(a3 +
x*(a4 +
x*(a5 +
x*(a6 +
x*a7))))));
4456 return nk_null_rect;
4501 ret.
x =
r.x; ret.y =
r.y;
4509 ret.
x =
r.w; ret.y =
r.h;
4514 nk_shrink_rect(struct
nk_rect r, float amount)
4519 res.x =
r.x + amount;
4520 res.y =
r.y + amount;
4521 res.w =
r.w - 2 * amount;
4522 res.h =
r.h - 2 * amount;
4531 r.x += pad.x;
r.y += pad.y;
4541 ret.
x =
x; ret.y =
y;
4573 NK_INTERN int nk_str_match_here(
const char *regexp,
const char *text);
4574 NK_INTERN int nk_str_match_star(
int c,
const char *regexp,
const char *text);
4575 NK_INTERN int nk_is_lower(
int c) {
return (
c >=
'a' &&
c <=
'z') || (
c >= 0xE0 &&
c <= 0xFF);}
4576 NK_INTERN int nk_is_upper(
int c){
return (
c >=
'A' &&
c <=
'Z') || (
c >= 0xC0 &&
c <= 0xDF);}
4577 NK_INTERN int nk_to_upper(
int c) {
return (
c >=
'a' &&
c <=
'z') ? (
c - (
'a' -
'A')) :
c;}
4578 NK_INTERN int nk_to_lower(
int c) {
return (
c >=
'A' &&
c <=
'Z') ? (
c - (
'a' +
'A')) :
c;}
4584 char *
dst = (
char*)dst0;
4585 const char *
src = (
const char*)src0;
4590 #define nk_wsize sizeof(nk_word) 4591 #define nk_wmask (nk_wsize-1) 4592 #define NK_TLOOP(s) if (t) NK_TLOOP1(s) 4593 #define NK_TLOOP1(s) do { s; } while (--t) 4601 t = nk_wsize - (
t & nk_wmask);
4603 NK_TLOOP1(*
dst++ = *
src++);
4606 NK_TLOOP(*(nk_word*)(
void*)
dst = *(
const nk_word*)(
const void*)
src;
4607 src += nk_wsize;
dst += nk_wsize);
4609 NK_TLOOP(*
dst++ = *
src++);
4620 NK_TLOOP1(*--
dst = *--
src);
4623 NK_TLOOP(
src -= nk_wsize;
dst -= nk_wsize;
4624 *(nk_word*)(
void*)
dst = *(
const nk_word*)(
const void*)
src);
4626 NK_TLOOP(*--
dst = *--
src);
4640 #define nk_word unsigned 4641 #define nk_wsize sizeof(nk_word) 4642 #define nk_wmask (nk_wsize - 1) 4649 if (
sizeof(
unsigned int) > 2)
4655 if (
size < 3 * nk_wsize) {
4670 t =
size / nk_wsize;
4672 *(nk_word*)((
void*)
dst) =
c;
4677 t = (
size & nk_wmask);
4701 while (
str && *
str++ !=
'\0') siz++;
4709 const char *
p =
str;
4716 while (*
p ==
' ')
p++;
4721 while (*
p && *
p >=
'0' && *
p <=
'9') {
4735 const char *
p =
str;
4743 while (*
p ==
' ')
p++;
4749 while (*
p && *
p !=
'.' && *
p !=
'e') {
4756 for(
m = 0.1; *
p && *
p !=
'e';
p++ ) {
4767 }
else if (*
p ==
'+') {
4772 for (
pow = 0; *
p;
p++)
4773 pow =
pow * 10 + (
int) (*
p -
'0');
4775 for (
m = 1.0, i = 0; i <
pow; i++)
4792 double double_value;
4793 double_value = NK_STRTOD(
str, endptr);
4794 float_value = (float)double_value;
4807 if (c1 <= 'Z' && c1 >=
'A') {
4811 if (c2 <= 'Z' && c2 >=
'A') {
4815 return ((d >= 0) << 1) - 1;
4833 if (c1 <= 'Z' && c1 >=
'A') {
4837 if (c2 <= 'Z' && c2 >=
'A') {
4841 return ((d >= 0) << 1) - 1;
4848 nk_str_match_here(
const char *regexp,
const char *text)
4850 if (regexp[0] ==
'\0')
4852 if (regexp[1] ==
'*')
4853 return nk_str_match_star(regexp[0], regexp+2, text);
4854 if (regexp[0] ==
'$' && regexp[1] ==
'\0')
4855 return *text ==
'\0';
4856 if (*text!=
'\0' && (regexp[0]==
'.' || regexp[0]==*text))
4857 return nk_str_match_here(regexp+1, text+1);
4862 nk_str_match_star(
int c,
const char *regexp,
const char *text)
4865 if (nk_str_match_here(regexp, text))
4867 }
while (*text !=
'\0' && (*text++ ==
c ||
c ==
'.'));
4880 if (regexp[0] ==
'^')
4881 return nk_str_match_here(regexp+1, text);
4883 if (nk_str_match_here(regexp, text))
4885 }
while (*text++ !=
'\0');
4891 const char *
pattern,
int *out_score)
4899 #define NK_ADJACENCY_BONUS 5 4901 #define NK_SEPARATOR_BONUS 10 4903 #define NK_CAMEL_BONUS 10 4905 #define NK_LEADING_LETTER_PENALTY (-3) 4907 #define NK_MAX_LEADING_LETTER_PENALTY (-9) 4909 #define NK_UNMATCHED_LETTER_PENALTY (-1) 4913 char const * pattern_iter =
pattern;
4921 char const * best_letter = 0;
4922 int best_letter_score = 0;
4930 const char pattern_letter = *pattern_iter;
4931 const char str_letter =
str[str_iter];
4933 int next_match = *pattern_iter !=
'\0' &&
4934 nk_to_lower(pattern_letter) == nk_to_lower(str_letter);
4935 int rematch = best_letter && nk_to_upper(*best_letter) == nk_to_upper(str_letter);
4937 int advanced = next_match && best_letter;
4938 int pattern_repeat = best_letter && *pattern_iter !=
'\0';
4939 pattern_repeat = pattern_repeat &&
4940 nk_to_lower(*best_letter) == nk_to_lower(pattern_letter);
4942 if (advanced || pattern_repeat) {
4943 score += best_letter_score;
4945 best_letter_score = 0;
4948 if (next_match || rematch)
4952 if (pattern_iter ==
pattern) {
4954 int penalty = NK_LEADING_LETTER_PENALTY *
count;
4955 if (penalty < NK_MAX_LEADING_LETTER_PENALTY)
4956 penalty = NK_MAX_LEADING_LETTER_PENALTY;
4963 new_score += NK_ADJACENCY_BONUS;
4967 new_score += NK_SEPARATOR_BONUS;
4970 if (prev_lower && nk_is_upper(str_letter))
4971 new_score += NK_CAMEL_BONUS;
4978 if (new_score >= best_letter_score) {
4980 if (best_letter != 0)
4981 score += NK_UNMATCHED_LETTER_PENALTY;
4983 best_letter = &
str[str_iter];
4984 best_letter_score = new_score;
4988 score += NK_UNMATCHED_LETTER_PENALTY;
4993 prev_lower = nk_is_lower(str_letter) != 0;
4994 prev_separator = str_letter ==
'_' || str_letter ==
' ';
5001 score += best_letter_score;
5004 if (*pattern_iter !=
'\0')
5017 nk_string_float_limit(
char *
string,
int prec)
5027 if (
dot == (prec+1)) {
5038 nk_pow(
double x,
int n)
5050 return plus ?
r : 1.0 /
r;
5054 nk_ifloord(
double x)
5056 x = (double)((
int)
x - ((
x < 0.0) ? 1 : 0));
5063 x = (float)((
int)
x - ((
x < 0.0f) ? 1 : 0));
5072 return (
x > i) ? i+1: i;
5075 float r =
x - (float)
t;
5076 return (
r > 0.0
f) ?
t+1:
t;
5087 neg = (
n < 0) ? 1 : 0;
5088 ret = (neg) ? (
int)-
n : (int)
n;
5089 while ((ret / 10) > 0) {
5098 nk_strrev_ascii(
char *
s)
5104 for (; i <
end; ++i) {
5106 s[i] =
s[
len - 1 - i];
5112 nk_itoa(
char *
s,
long n)
5125 s[i++] = (char)(
'0' + (
n % 10));
5137 nk_dtoa(
char *
s,
double n)
5140 int digit = 0,
m = 0, m1 = 0;
5148 s[0] =
'0';
s[1] =
'\0';
5157 useExp = (
m >= 14 || (neg &&
m >= 9) ||
m <= -9);
5158 if (neg) *(
c++) =
'-';
5164 n =
n / (double)nk_pow(10.0,
m);
5173 while (
n > NK_FLOAT_PRECISION ||
m >= 0) {
5174 double weight = nk_pow(10.0,
m);
5179 *(
c++) = (
char)(
'0' + (char)
digit);
5181 if (
m == 0 &&
n > 0)
5198 *(
c++) = (
char)(
'0' + (char)(m1 % 10));
5203 for (i = 0,
j =
m-1; i<
j; i++,
j--) {
5215 #ifdef NK_INCLUDE_STANDARD_VARARGS 5216 #ifndef NK_INCLUDE_STANDARD_IO 5218 nk_vsnprintf(
char *
buf,
int buf_size,
const char *fmt, va_list
args)
5223 NK_ARG_TYPE_DEFAULT,
5227 NK_ARG_FLAG_LEFT = 0x01,
5228 NK_ARG_FLAG_PLUS = 0x02,
5229 NK_ARG_FLAG_SPACE = 0x04,
5230 NK_ARG_FLAG_NUM = 0x10,
5231 NK_ARG_FLAG_ZERO = 0x20
5235 enum nk_arg_type arg_type = NK_ARG_TYPE_DEFAULT;
5237 int width = NK_DEFAULT;
5242 const char *iter = fmt;
5245 NK_ASSERT(buf_size);
5246 if (!
buf || !buf_size || !fmt)
return 0;
5247 for (iter = fmt; *iter &&
len < buf_size; iter++) {
5249 while (*iter && (*iter !=
'%') && (
len < buf_size))
5251 if (!(*iter) ||
len >= buf_size)
break;
5256 if (*iter ==
'-') flag |= NK_ARG_FLAG_LEFT;
5257 else if (*iter ==
'+') flag |= NK_ARG_FLAG_PLUS;
5258 else if (*iter ==
' ') flag |= NK_ARG_FLAG_SPACE;
5259 else if (*iter ==
'#') flag |= NK_ARG_FLAG_NUM;
5260 else if (*iter ==
'0') flag |= NK_ARG_FLAG_ZERO;
5267 if (*iter >=
'1' && *iter <=
'9') {
5273 }
else if (*iter ==
'*') {
5296 if (*(iter+1) ==
'h') {
5297 arg_type = NK_ARG_TYPE_CHAR;
5299 }
else arg_type = NK_ARG_TYPE_SHORT;
5301 }
else if (*iter ==
'l') {
5302 arg_type = NK_ARG_TYPE_LONG;
5304 }
else arg_type = NK_ARG_TYPE_DEFAULT;
5308 NK_ASSERT(arg_type == NK_ARG_TYPE_DEFAULT);
5310 NK_ASSERT(
width == NK_DEFAULT);
5313 }
else if (*iter ==
's') {
5315 const char *
str = va_arg(
args,
const char*);
5316 NK_ASSERT(
str !=
buf &&
"buffer and argument are not allowed to overlap!");
5317 NK_ASSERT(arg_type == NK_ARG_TYPE_DEFAULT);
5319 NK_ASSERT(
width == NK_DEFAULT);
5320 if (
str ==
buf)
return -1;
5323 }
else if (*iter ==
'n') {
5325 signed int *
n = va_arg(
args,
int*);
5326 NK_ASSERT(arg_type == NK_ARG_TYPE_DEFAULT);
5328 NK_ASSERT(
width == NK_DEFAULT);
5330 }
else if (*iter ==
'c' || *iter ==
'i' || *iter ==
'd') {
5333 const char *num_iter;
5334 int num_len, num_print, padding;
5339 if (arg_type == NK_ARG_TYPE_CHAR)
5341 else if (arg_type == NK_ARG_TYPE_SHORT)
5342 value = (
signed short)va_arg(
args,
int);
5343 else if (arg_type == NK_ARG_TYPE_LONG)
5345 else if (*iter ==
'c')
5346 value = (
unsigned char)va_arg(
args,
int);
5350 nk_itoa(number_buffer,
value);
5352 padding =
NK_MAX(cur_width -
NK_MAX(cur_precision, num_len), 0);
5353 if ((flag & NK_ARG_FLAG_PLUS) || (flag & NK_ARG_FLAG_SPACE))
5354 padding =
NK_MAX(padding-1, 0);
5357 if (!(flag & NK_ARG_FLAG_LEFT)) {
5358 while (padding-- > 0 && (
len < buf_size)) {
5359 if ((flag & NK_ARG_FLAG_ZERO) && (
precision == NK_DEFAULT))
5366 if ((flag & NK_ARG_FLAG_PLUS) &&
value >= 0 &&
len < buf_size)
5368 else if ((flag & NK_ARG_FLAG_SPACE) &&
value >= 0 &&
len < buf_size)
5372 num_print =
NK_MAX(cur_precision, num_len);
5373 while (
precision && (num_print > num_len) && (
len < buf_size)) {
5379 num_iter = number_buffer;
5381 buf[
len++] = *num_iter++;
5384 if (flag & NK_ARG_FLAG_LEFT) {
5385 while ((padding-- > 0) && (
len < buf_size))
5388 }
else if (*iter ==
'o' || *iter ==
'x' || *iter ==
'X' || *iter ==
'u') {
5390 unsigned long value = 0;
5391 int num_len = 0, num_print, padding = 0;
5394 unsigned int base = (*iter ==
'o') ? 8: (*iter ==
'u')? 10: 16;
5397 const char *upper_output_format =
"0123456789ABCDEF";
5398 const char *lower_output_format =
"0123456789abcdef";
5399 const char *output_format = (*iter ==
'x') ?
5400 lower_output_format: upper_output_format;
5403 if (arg_type == NK_ARG_TYPE_CHAR)
5404 value = (
unsigned char)va_arg(
args,
int);
5405 else if (arg_type == NK_ARG_TYPE_SHORT)
5406 value = (
unsigned short)va_arg(
args,
int);
5407 else if (arg_type == NK_ARG_TYPE_LONG)
5409 else value = va_arg(
args,
unsigned int);
5415 number_buffer[num_len++] = (char)
digit;
5417 }
while (
value > 0);
5419 num_print =
NK_MAX(cur_precision, num_len);
5420 padding =
NK_MAX(cur_width -
NK_MAX(cur_precision, num_len), 0);
5421 if (flag & NK_ARG_FLAG_NUM)
5422 padding =
NK_MAX(padding-1, 0);
5425 if (!(flag & NK_ARG_FLAG_LEFT)) {
5426 while ((padding-- > 0) && (
len < buf_size)) {
5427 if ((flag & NK_ARG_FLAG_ZERO) && (
precision == NK_DEFAULT))
5434 if (num_print && (flag & NK_ARG_FLAG_NUM)) {
5435 if ((*iter ==
'o') && (
len < buf_size)) {
5437 }
else if ((*iter ==
'x') && ((
len+1) < buf_size)) {
5440 }
else if ((*iter ==
'X') && ((
len+1) < buf_size)) {
5445 while (
precision && (num_print > num_len) && (
len < buf_size)) {
5451 while (num_len > 0) {
5453 buf[
len++] = number_buffer[num_len-1];
5458 if (flag & NK_ARG_FLAG_LEFT) {
5459 while ((padding-- > 0) && (
len < buf_size))
5462 }
else if (*iter ==
'f') {
5464 const char *num_iter;
5468 int num_len = 0, frac_len = 0,
dot = 0;
5471 NK_ASSERT(arg_type == NK_ARG_TYPE_DEFAULT);
5472 NK_DTOA(number_buffer,
value);
5476 num_iter = number_buffer;
5477 while (*num_iter && *num_iter !=
'.')
5480 prefix = (*num_iter ==
'.')?(
int)(num_iter - number_buffer)+1:0;
5481 padding =
NK_MAX(cur_width - (prefix +
NK_MIN(cur_precision, num_len - prefix)) , 0);
5482 if ((flag & NK_ARG_FLAG_PLUS) || (flag & NK_ARG_FLAG_SPACE))
5483 padding =
NK_MAX(padding-1, 0);
5486 if (!(flag & NK_ARG_FLAG_LEFT)) {
5487 while (padding-- > 0 && (
len < buf_size)) {
5488 if (flag & NK_ARG_FLAG_ZERO)
5495 num_iter = number_buffer;
5496 if ((flag & NK_ARG_FLAG_PLUS) && (
value >= 0) && (
len < buf_size))
5498 else if ((flag & NK_ARG_FLAG_SPACE) && (
value >= 0) && (
len < buf_size))
5501 if (
dot) frac_len++;
5504 if (*num_iter ==
'.')
dot = 1;
5505 if (frac_len >= cur_precision)
break;
5510 while (frac_len < cur_precision) {
5511 if (!
dot &&
len < buf_size) {
5521 if (flag & NK_ARG_FLAG_LEFT) {
5522 while ((padding-- > 0) && (
len < buf_size))
5527 NK_ASSERT(0 &&
"specifier is not supported!");
5531 buf[(
len >= buf_size)?(buf_size-1):
len] = 0;
5538 nk_strfmt(
char *
buf,
int buf_size,
const char *fmt, va_list
args)
5542 NK_ASSERT(buf_size);
5543 if (!
buf || !buf_size || !fmt)
return 0;
5544 #ifdef NK_INCLUDE_STANDARD_IO 5547 buf[buf_size-1] = 0;
5559 #define NK_ROTL(x,r) ((x) << (r) | ((x) >> (32 - r))) 5562 const int nblocks =
len/4;
5564 const nk_uint c1 = 0xcc9e2d51;
5565 const nk_uint c2 = 0x1b873593;
5573 conv.b = (
data + nblocks*4);
5574 blocks = (
const nk_uint*)conv.i;
5575 for (i = -nblocks; i; ++i) {
5578 k1 = NK_ROTL(
k1,15);
5582 h1 = NK_ROTL(h1,13);
5583 h1 = h1*5+0xe6546b64;
5594 k1 = NK_ROTL(
k1,15);
5613 #ifdef NK_INCLUDE_STANDARD_IO 5624 if (!
path || !siz || !alloc)
5657 nk_parse_hex(
const char *
p,
int length)
5663 if (
p[
len] >=
'a' &&
p[
len] <=
'f')
5664 i += ((
p[
len] -
'a') + 10);
5665 else if (
p[
len] >=
'A' &&
p[
len] <=
'F')
5666 i += ((
p[
len] -
'A') + 10);
5667 else i += (
p[
len] -
'0');
5688 const char *
c = rgb;
5701 const char *
c = rgb;
5713 #define NK_TO_HEX(i) ((i) <= 9 ? '0' + (i): 'A' - 10 + (i)) 5714 output[0] = (char)NK_TO_HEX((
col.r & 0xF0) >> 4);
5715 output[1] = (char)NK_TO_HEX((
col.r & 0x0F));
5716 output[2] = (char)NK_TO_HEX((
col.g & 0xF0) >> 4);
5717 output[3] = (char)NK_TO_HEX((
col.g & 0x0F));
5718 output[4] = (char)NK_TO_HEX((
col.b & 0xF0) >> 4);
5719 output[5] = (char)NK_TO_HEX((
col.b & 0x0F));
5720 output[6] = (char)NK_TO_HEX((
col.a & 0xF0) >> 4);
5721 output[7] = (char)NK_TO_HEX((
col.a & 0x0F));
5729 #define NK_TO_HEX(i) ((i) <= 9 ? '0' + (i): 'A' - 10 + (i)) 5730 output[0] = (char)NK_TO_HEX((
col.r & 0xF0) >> 4);
5731 output[1] = (char)NK_TO_HEX((
col.r & 0x0F));
5732 output[2] = (char)NK_TO_HEX((
col.g & 0xF0) >> 4);
5733 output[3] = (char)NK_TO_HEX((
col.g & 0x0F));
5734 output[4] = (char)NK_TO_HEX((
col.b & 0xF0) >> 4);
5735 output[5] = (char)NK_TO_HEX((
col.b & 0x0F));
5779 ret.
r = (
in & 0xFF);
5780 ret.g = ((
in >> 8) & 0xFF);
5781 ret.b = ((
in >> 16) & 0xFF);
5853 float hf = ((float)
NK_CLAMP(0,
h, 255)) / 255.0
f;
5854 float sf = ((float)
NK_CLAMP(0,
s, 255)) / 255.0
f;
5855 float vf = ((float)
NK_CLAMP(0,
v, 255)) / 255.0
f;
5856 float af = ((float)
NK_CLAMP(0,
a, 255)) / 255.0
f;
5884 h =
h / (60.0f/360.0f);
5888 q =
v * (1.0f - (
s *
f));
5889 t =
v * (1.0f -
s * (1.0f -
f));
5892 case 0:
default:
out.r =
v;
out.g =
t;
out.b =
p;
break;
5922 *
r = (float)
in.r *
s;
5923 *
g = (
float)
in.g *
s;
5924 *
b = (float)
in.b *
s;
5925 *
a = (
float)
in.a *
s;
5938 *
r = (double)
in.r *
s;
5939 *
g = (
double)
in.g *
s;
5940 *
b = (double)
in.b *
s;
5941 *
a = (
double)
in.a *
s;
5966 float *out_v,
float *out_a,
struct nk_color in)
5974 const float t =
g;
g =
b;
b =
t;
5978 const float t =
r;
r =
g;
g =
t;
5981 chroma =
r - ((
g <
b) ?
g:
b);
5982 *out_h =
NK_ABS(
K + (
g -
b)/(6.0
f * chroma + 1e-20
f));
5983 *out_s = chroma / (
r + 1e-20
f);
5985 *out_a = (float)
in.a / 255.0f;
6094 nk_zero(&
s,
sizeof(
s));
6097 s.region[0] = (
unsigned short)
r.x;
6098 s.region[1] = (
unsigned short)
r.y;
6099 s.region[2] = (
unsigned short)
r.w;
6100 s.region[3] = (
unsigned short)
r.h;
6108 nk_zero(&
s,
sizeof(
s));
6111 s.region[0] = (
unsigned short)
r.x;
6112 s.region[1] = (
unsigned short)
r.y;
6113 s.region[2] = (
unsigned short)
r.w;
6114 s.region[3] = (
unsigned short)
r.h;
6123 nk_zero(&
s,
sizeof(
s));
6126 s.region[0] = (
unsigned short)
r.x;
6127 s.region[1] = (
unsigned short)
r.y;
6128 s.region[2] = (
unsigned short)
r.w;
6129 s.region[3] = (
unsigned short)
r.h;
6137 nk_zero(&
s,
sizeof(
s));
6151 nk_zero(&
s,
sizeof(
s));
6166 nk_zero(&
s,
sizeof(
s));
6180 return !(
img->w == 0 &&
img->h == 0);
6184 nk_unify(
struct nk_rect *clip,
const struct nk_rect *
a,
float x0,
float y0,
6199 float pad_x,
float pad_y,
enum nk_heading direction)
6201 float w_half, h_half;
6206 r.w =
r.w - 2 * pad_x;
6207 r.h =
r.h - 2 * pad_y;
6212 w_half =
r.w / 2.0f;
6213 h_half =
r.h / 2.0f;
6215 if (direction ==
NK_UP) {
6219 }
else if (direction ==
NK_RIGHT) {
6223 }
else if (direction ==
NK_DOWN) {
6236 int text_len,
float space,
int *glyphs,
float *text_width,
6237 nk_rune *sep_list,
int sep_count)
6241 float last_width = 0;
6250 float sep_width = 0;
6251 sep_count =
NK_MAX(sep_count,0);
6254 while (glyph_len && (
width < space) && (
len < text_len)) {
6257 for (i = 0; i < sep_count; ++i) {
6258 if (unicode != sep_list[i])
continue;
6259 sep_width = last_width =
width;
6264 if (i == sep_count){
6265 last_width = sep_width =
width;
6272 if (
len >= text_len) {
6274 *text_width = last_width;
6278 *text_width = sep_width;
6279 return (!sep_len) ?
len: sep_len;
6283 enum {NK_DO_NOT_STOP_ON_NEW_LINE, NK_STOP_ON_NEW_LINE};
6286 const char *begin,
int byte_len,
float row_height,
const char **remaining,
6287 struct nk_vec2 *out_offset,
int *glyphs,
int op)
6289 float line_height = row_height;
6291 float line_width = 0.0f;
6297 if (!begin || byte_len <= 0 || !
font)
6301 if (!glyph_len)
return text_size;
6302 glyph_width =
font->width(
font->userdata,
font->height, begin, glyph_len);
6305 while ((text_len < byte_len) && glyph_len) {
6306 if (unicode ==
'\n') {
6307 text_size.
x =
NK_MAX(text_size.
x, line_width);
6308 text_size.
y += line_height;
6311 if (
op == NK_STOP_ON_NEW_LINE)
6315 glyph_len =
nk_utf_decode(begin + text_len, &unicode, byte_len-text_len);
6319 if (unicode ==
'\r') {
6322 glyph_len =
nk_utf_decode(begin + text_len, &unicode, byte_len-text_len);
6326 *glyphs = *glyphs + 1;
6327 text_len += glyph_len;
6328 line_width += (float)glyph_width;
6329 glyph_len =
nk_utf_decode(begin + text_len, &unicode, byte_len-text_len);
6330 glyph_width =
font->width(
font->userdata,
font->height, begin+text_len, glyph_len);
6334 if (text_size.
x < line_width)
6335 text_size.
x = line_width;
6337 *out_offset =
nk_vec2(line_width, text_size.
y + line_height);
6338 if (line_width > 0 || text_size.
y == 0.0f)
6339 text_size.
y += line_height;
6341 *remaining = begin+text_len;
6356 nk_utf_validate(
nk_rune *u,
int i)
6360 if (!
NK_BETWEEN(*u, nk_utfmin[i], nk_utfmax[i]) ||
6363 for (i = 1; *u > nk_utfmax[i]; ++i);
6368 nk_utf_decode_byte(
char c,
int *i)
6372 for(*i = 0; *i < (int)
NK_LEN(nk_utfmask); ++(*i)) {
6373 if (((
nk_byte)
c & nk_utfmask[*i]) == nk_utfbyte[*i])
6374 return (
nk_byte)(
c & ~nk_utfmask[*i]);
6388 if (!
c || !u)
return 0;
6389 if (!clen)
return 0;
6392 udecoded = nk_utf_decode_byte(
c[0], &
len);
6396 for (i = 1,
j = 1; i < clen &&
j <
len; ++i, ++
j) {
6397 udecoded = (udecoded << 6) | nk_utf_decode_byte(
c[i], &
type);
6404 nk_utf_validate(u,
len);
6409 nk_utf_encode_byte(
nk_rune u,
int i)
6411 return (
char)((nk_utfbyte[i]) | ((
nk_byte)u & ~nk_utfmask[i]));
6418 len = nk_utf_validate(&u, 0);
6422 for (i =
len - 1; i != 0; --i) {
6423 c[i] = nk_utf_encode_byte(u, 0);
6426 c[0] = nk_utf_encode_byte(u,
len);
6441 if (!
str || !
len)
return 0;
6446 while (glyph_len && src_len <
len) {
6448 src_len = src_len + glyph_len;
6449 glyph_len =
nk_utf_decode(text + src_len, &unicode, text_len - src_len);
6468 if (!
buffer || !unicode || !
len)
return 0;
6485 src_len = src_len + glyph_len;
6486 glyph_len =
nk_utf_decode(text + src_len, unicode, text_len - src_len);
6488 if (i !=
index)
return 0;
6497 #ifdef NK_INCLUDE_DEFAULT_ALLOCATOR 6507 alloc.userdata.ptr = 0;
6508 alloc.alloc = nk_malloc;
6509 alloc.free = nk_mfree;
6520 NK_ASSERT(initial_size);
6521 if (!
b || !
a || !initial_size)
return;
6523 nk_zero(
b,
sizeof(*
b));
6525 b->memory.ptr =
a->alloc(
a->userdata,0, initial_size);
6526 b->memory.size = initial_size;
6527 b->size = initial_size;
6528 b->grow_factor = 2.0f;
6538 if (!
b || !
m || !
size)
return;
6540 nk_zero(
b,
sizeof(*
b));
6543 b->memory.size =
size;
6585 if (!
b || !
size || !
b->pool.alloc || !
b->pool.free)
6588 buffer_size =
b->memory.size;
6589 temp =
b->pool.alloc(
b->pool.userdata,
b->memory.ptr, capacity);
6591 if (!temp)
return 0;
6594 if (temp !=
b->memory.ptr) {
6595 NK_MEMCPY(temp,
b->memory.ptr, buffer_size);
6596 b->pool.free(
b->pool.userdata,
b->memory.ptr);
6599 if (
b->size == buffer_size) {
6607 back_size = buffer_size -
b->size;
6610 NK_MEMCPY(
dst,
src, back_size);
6611 b->size = capacity - back_size;
6627 if (!
b || !
size)
return 0;
6632 unaligned =
nk_ptr_add(
void,
b->memory.ptr,
b->allocated);
6634 memory = nk_buffer_align(unaligned,
align, &alignment,
type);
6638 full = ((
b->allocated +
size + alignment) >
b->size);
6639 else full = ((
b->size -
NK_MIN(
b->size,(
size + alignment))) <=
b->allocated);
6645 NK_ASSERT(
b->pool.alloc &&
b->pool.free);
6650 capacity = (
nk_size)((
float)
b->memory.size *
b->grow_factor);
6652 b->memory.ptr = nk_buffer_realloc(
b, capacity, &
b->memory.size);
6653 if (!
b->memory.ptr)
return 0;
6657 unaligned =
nk_ptr_add(
void,
b->memory.ptr,
b->allocated);
6659 memory = nk_buffer_align(unaligned,
align, &alignment,
type);
6662 b->allocated +=
size + alignment;
6663 else b->size -= (
size + alignment);
6664 b->needed += alignment;
6706 else buffer->allocated = 0;
6717 b->size =
b->memory.size;
6726 if (!
b || !
b->memory.ptr)
return;
6728 if (!
b->pool.free)
return;
6729 NK_ASSERT(
b->pool.free);
6730 b->pool.free(
b->pool.userdata,
b->memory.ptr);
6738 if (!
s || !
b)
return;
6739 s->allocated =
b->allocated;
6740 s->size =
b->memory.size;
6741 s->needed =
b->needed;
6742 s->memory =
b->memory.ptr;
6743 s->calls =
b->calls;
6751 return buffer->memory.ptr;
6759 return buffer->memory.ptr;
6767 return buffer->memory.size;
6777 #ifdef NK_INCLUDE_DEFAULT_ALLOCATOR 6782 alloc.userdata.ptr = 0;
6783 alloc.alloc = nk_malloc;
6784 alloc.free = nk_mfree;
6810 if (!
s || !
str || !
len)
return 0;
6830 if (!
str || !text || !
len)
return 0;
6831 for (i = 0; i <
len; ++i)
6845 if (!
str || !text)
return 0;
6847 glyph_len = byte_len =
nk_utf_decode(text+byte_len, &unicode, 4);
6848 while (unicode !=
'\0' && glyph_len) {
6850 byte_len += glyph_len;
6865 if (!
str || !text || !
len)
return 0;
6866 for (i = 0; i <
len; ++i) {
6868 if (!byte_len)
break;
6881 if (!
str || !runes)
return 0;
6882 while (runes[i] !=
'\0') {
6901 NK_ASSERT(
len >= 0);
6902 if (!
s || !
str || !
len || (
nk_size)pos >
s->buffer.allocated)
return 0;
6903 if ((
s->buffer.allocated + (
nk_size)
len >=
s->buffer.memory.size) &&
6906 copylen = (int)
s->buffer.allocated - pos;
6915 NK_ASSERT(((
int)pos + (
int)
len + ((
int)copylen - 1)) >= 0);
6916 NK_ASSERT(((
int)pos + ((
int)copylen - 1)) >= 0);
6919 for (i = 0; i < copylen; ++i) *
dst-- = *
src--;
6922 s->len =
nk_utf_len((
char *)
s->buffer.memory.ptr, (
int)
s->buffer.allocated);
6937 if (!
str || !cstr || !
len)
return 0;
6942 if (!begin)
return 0;
6967 if (!
str || !text || !
len)
return 0;
6968 for (i = 0; i <
len; ++i)
6982 if (!
str || !text)
return 0;
6984 glyph_len = byte_len =
nk_utf_decode(text+byte_len, &unicode, 4);
6985 while (unicode !=
'\0' && glyph_len) {
6987 byte_len += glyph_len;
7002 if (!
str || !runes || !
len)
return 0;
7003 for (i = 0; i <
len; ++i) {
7005 if (!byte_len)
break;
7018 if (!
str || !runes)
return 0;
7019 while (runes[i] !=
'\0') {
7031 NK_ASSERT(
len >= 0);
7033 NK_ASSERT(((
int)
s->buffer.allocated - (
int)
len) >= 0);
7035 s->len =
nk_utf_len((
char *)
s->buffer.memory.ptr, (
int)
s->buffer.allocated);
7047 NK_ASSERT(
len >= 0);
7048 if (!
str ||
len < 0)
return;
7056 end = (
const char*)
str->buffer.memory.ptr +
str->buffer.allocated;
7064 if (!
s || !
len || (
nk_size)pos >
s->buffer.allocated ||
7065 (
nk_size)(pos +
len) >
s->buffer.allocated)
return;
7072 NK_ASSERT(((
int)
s->buffer.allocated - (
int)
len) >= 0);
7075 s->len =
nk_utf_len((
char *)
s->buffer.memory.ptr, (
int)
s->buffer.allocated);
7088 NK_ASSERT(
s->len >= pos +
len);
7089 if (
s->len < pos +
len)
7093 temp = (
char *)
s->buffer.memory.ptr;
7096 s->buffer.memory.ptr = begin;
7098 s->buffer.memory.ptr = temp;
7107 if (!
s || pos > (
int)
s->buffer.allocated)
return 0;
7108 return nk_ptr_add(
char,
s->buffer.memory.ptr, pos);
7124 if (!
str || !unicode || !
len)
return 0;
7131 text = (
char*)
str->buffer.memory.ptr;
7132 text_len = (
int)
str->buffer.allocated;
7141 src_len = src_len + glyph_len;
7142 glyph_len =
nk_utf_decode(text + src_len, unicode, text_len - src_len);
7144 if (i != pos)
return 0;
7145 return text + src_len;
7152 if (!
s || pos > (
int)
s->buffer.allocated)
return 0;
7153 return nk_ptr_add(
char,
s->buffer.memory.ptr, pos);
7169 if (!
str || !unicode || !
len)
return 0;
7176 text = (
char*)
str->buffer.memory.ptr;
7177 text_len = (
int)
str->buffer.allocated;
7186 src_len = src_len + glyph_len;
7187 glyph_len =
nk_utf_decode(text + src_len, unicode, text_len - src_len);
7189 if (i != pos)
return 0;
7190 return text + src_len;
7206 if (!
s || !
s->len || !
s->buffer.allocated)
return 0;
7207 return (
char*)
s->buffer.memory.ptr;
7214 if (!
s || !
s->len || !
s->buffer.allocated)
return 0;
7215 return (
const char*)
s->buffer.memory.ptr;
7222 if (!
s || !
s->len || !
s->buffer.allocated)
return 0;
7230 if (!
s || !
s->len || !
s->buffer.allocated)
return 0;
7231 return (
int)
s->buffer.allocated;
7263 if (!cmdbuf || !
buffer)
return;
7279 buffer->clip = nk_null_rect;
7280 #ifdef NK_INCLUDE_COMMAND_USERDATA 7281 buffer->userdata.ptr = 0;
7306 #ifdef NK_ZERO_COMMAND_MEMORY 7307 NK_MEMSET(
cmd, 0,
size + alignment);
7311 cmd->next =
b->base->allocated + alignment;
7312 #ifdef NK_INCLUDE_COMMAND_USERDATA 7313 cmd->userdata =
b->userdata;
7334 cmd->x = (short)
r.x;
7335 cmd->y = (
short)
r.y;
7342 float x1,
float y1,
float line_thickness,
struct nk_color c)
7351 cmd->begin.x = (short)x0;
7352 cmd->begin.y = (short)y0;
7353 cmd->end.x = (short)x1;
7354 cmd->end.y = (short)
y1;
7360 float ctrl0x,
float ctrl0y,
float ctrl1x,
float ctrl1y,
7371 cmd->begin.x = (short)ax;
7372 cmd->begin.y = (short)ay;
7373 cmd->ctrl[0].x = (short)ctrl0x;
7374 cmd->ctrl[0].y = (short)ctrl0y;
7375 cmd->ctrl[1].x = (short)ctrl1x;
7376 cmd->ctrl[1].y = (short)ctrl1y;
7377 cmd->end.x = (short)bx;
7378 cmd->end.y = (short)
by;
7389 if (
b->use_clipping) {
7390 const struct nk_rect *clip = &
b->clip;
7392 clip->
x, clip->
y, clip->
w, clip->
h))
return;
7399 cmd->x = (short)rect.
x;
7400 cmd->y = (
short)rect.
y;
7412 if (!
b ||
c.a == 0 || rect.
w == 0 || rect.
h == 0)
return;
7413 if (
b->use_clipping) {
7414 const struct nk_rect *clip = &
b->clip;
7416 clip->
x, clip->
y, clip->
w, clip->
h))
return;
7423 cmd->x = (short)rect.
x;
7424 cmd->y = (
short)rect.
y;
7437 if (!
b || rect.
w == 0 || rect.
h == 0)
return;
7438 if (
b->use_clipping) {
7439 const struct nk_rect *clip = &
b->clip;
7441 clip->
x, clip->
y, clip->
w, clip->
h))
return;
7447 cmd->x = (short)rect.
x;
7448 cmd->y = (
short)rect.
y;
7459 float line_thickness,
struct nk_color c)
7463 if (
b->use_clipping) {
7464 const struct nk_rect *clip = &
b->clip;
7473 cmd->x = (short)
r.x;
7474 cmd->y = (
short)
r.y;
7485 if (!
b ||
c.a == 0 ||
r.w == 0 ||
r.h == 0)
return;
7486 if (
b->use_clipping) {
7487 const struct nk_rect *clip = &
b->clip;
7495 cmd->x = (short)
r.x;
7496 cmd->y = (
short)
r.y;
7504 float a_min,
float a_max,
float line_thickness,
struct nk_color c)
7512 cmd->cx = (short)
cx;
7513 cmd->cy = (short)
cy;
7514 cmd->r = (
unsigned short)radius;
7522 float a_min,
float a_max,
struct nk_color c)
7526 if (!
b ||
c.a == 0)
return;
7530 cmd->cx = (short)
cx;
7531 cmd->cy = (short)
cy;
7532 cmd->r = (
unsigned short)radius;
7540 float y1,
float x2,
float y2,
float line_thickness,
struct nk_color c)
7545 if (
b->use_clipping) {
7546 const struct nk_rect *clip = &
b->clip;
7547 if (!
NK_INBOX(x0, y0, clip->
x, clip->
y, clip->
w, clip->
h) &&
7557 cmd->a.x = (short)x0;
7558 cmd->a.y = (short)y0;
7559 cmd->b.x = (short)x1;
7560 cmd->b.y = (short)
y1;
7561 cmd->c.x = (short)
x2;
7562 cmd->c.y = (short)
y2;
7572 if (!
b ||
c.a == 0)
return;
7574 if (
b->use_clipping) {
7575 const struct nk_rect *clip = &
b->clip;
7576 if (!
NK_INBOX(x0, y0, clip->
x, clip->
y, clip->
w, clip->
h) &&
7585 cmd->a.x = (short)x0;
7586 cmd->a.y = (short)y0;
7587 cmd->b.x = (short)x1;
7588 cmd->b.y = (short)
y1;
7589 cmd->c.x = (short)
x2;
7590 cmd->c.y = (short)
y2;
7612 cmd->points[i].y = (short)
points[i*2+1];
7625 if (!
b ||
col.a == 0)
return;
7633 cmd->points[i].x = (short)
points[i*2+0];
7634 cmd->points[i].y = (short)
points[i*2+1];
7656 cmd->points[i].y = (short)
points[i*2+1];
7667 if (
b->use_clipping) {
7676 cmd->x = (short)
r.x;
7677 cmd->y = (
short)
r.y;
7691 if (
b->use_clipping) {
7700 cmd->x = (short)
r.x;
7701 cmd->y = (
short)
r.y;
7704 cmd->callback_data = usr;
7713 float text_width = 0;
7718 if (!
b || !
string || !
length || (bg.
a == 0 && fg.
a == 0))
return;
7719 if (
b->use_clipping) {
7727 if (text_width >
r.w){
7729 float txt_width = (float)text_width;
7737 cmd->x = (short)
r.x;
7738 cmd->y = (
short)
r.y;
7739 cmd->w = (
unsigned short)
r.w;
7740 cmd->h = (
unsigned short)
r.h;
7741 cmd->background = bg;
7742 cmd->foreground = fg;
7755 #ifdef NK_INCLUDE_VERTEX_BUFFER_OUTPUT 7757 nk_draw_list_init(
struct nk_draw_list *list)
7762 nk_zero(list,
sizeof(*list));
7763 for (i = 0; i <
NK_LEN(list->circle_vtx); ++i) {
7764 const float a = ((float)i / (
float)
NK_LEN(list->circle_vtx)) * 2 *
NK_PI;
7765 list->circle_vtx[i].x = (float)NK_COS(
a);
7766 list->circle_vtx[i].y = (float)NK_SIN(
a);
7778 NK_ASSERT(vertices);
7783 canvas->buffer = cmds;
7784 canvas->config = *
config;
7786 canvas->vertices = vertices;
7787 canvas->line_AA = line_aa;
7788 canvas->shape_AA = shape_aa;
7789 canvas->clip_rect = nk_null_rect;
7792 NK_API const struct nk_draw_command*
7793 nk__draw_list_begin(
const struct nk_draw_list *canvas,
const struct nk_buffer *
buffer)
7797 const struct nk_draw_command *
cmd;
7809 NK_API const struct nk_draw_command*
7810 nk__draw_list_end(
const struct nk_draw_list *canvas,
const struct nk_buffer *
buffer)
7815 const struct nk_draw_command *
end;
7826 end -= (canvas->cmd_count-1);
7830 NK_API const struct nk_draw_command*
7831 nk__draw_list_next(
const struct nk_draw_command *
cmd,
7834 const struct nk_draw_command *
end;
7840 end = nk__draw_list_end(canvas,
buffer);
7841 if (
cmd <=
end)
return 0;
7846 nk_draw_list_clear(
struct nk_draw_list *list)
7857 list->element_count = 0;
7858 list->vertex_count = 0;
7859 list->cmd_offset = 0;
7860 list->cmd_count = 0;
7861 list->path_count = 0;
7864 list->clip_rect = nk_null_rect;
7868 nk_draw_list_alloc_path(
struct nk_draw_list *list,
int count)
7878 if (!list->path_offset) {
7882 list->path_count += (
unsigned int)
count;
7887 nk_draw_list_path_last(struct nk_draw_list *list)
7891 NK_ASSERT(list->path_count);
7894 point += (list->path_count-1);
7899 nk_draw_list_push_command(
struct nk_draw_list *list,
struct nk_rect clip,
7904 struct nk_draw_command *
cmd;
7907 cmd = (
struct nk_draw_command*)
7911 if (!list->cmd_count) {
7918 cmd->elem_count = 0;
7919 cmd->clip_rect = clip;
7921 #ifdef NK_INCLUDE_COMMAND_USERDATA 7922 cmd->userdata = list->userdata;
7926 list->clip_rect = clip;
7931 nk_draw_list_command_last(
struct nk_draw_list *list)
7935 struct nk_draw_command *
cmd;
7936 NK_ASSERT(list->cmd_count);
7941 return (
cmd - (list->cmd_count-1));
7945 nk_draw_list_add_clip(
struct nk_draw_list *list,
struct nk_rect rect)
7949 if (!list->cmd_count) {
7950 nk_draw_list_push_command(list, rect, list->config.null.texture);
7952 struct nk_draw_command *prev = nk_draw_list_command_last(list);
7953 if (prev->elem_count == 0)
7954 prev->clip_rect = rect;
7955 nk_draw_list_push_command(list, rect, prev->texture);
7964 if (!list->cmd_count) {
7965 nk_draw_list_push_command(list, nk_null_rect,
texture);
7967 struct nk_draw_command *prev = nk_draw_list_command_last(list);
7968 if (prev->elem_count == 0)
7970 else if (prev->texture.id !=
texture.id)
7971 nk_draw_list_push_command(list, prev->clip_rect,
texture);
7975 #ifdef NK_INCLUDE_COMMAND_USERDATA 7977 nk_draw_list_push_userdata(
struct nk_draw_list *list,
nk_handle userdata)
7979 list->userdata = userdata;
7984 nk_draw_list_alloc_vertices(
struct nk_draw_list *list,
nk_size count)
7988 if (!list)
return 0;
7990 list->config.vertex_size*
count, list->config.vertex_alignment);
7992 list->vertex_count += (
unsigned int)
count;
7997 nk_draw_list_alloc_elements(
struct nk_draw_list *list,
nk_size count)
8000 struct nk_draw_command *
cmd;
8004 if (!list)
return 0;
8006 ids = (nk_draw_index*)
8009 cmd = nk_draw_list_command_last(list);
8010 list->element_count += (
unsigned int)
count;
8011 cmd->elem_count += (
unsigned int)
count;
8016 nk_draw_vertex_layout_element_is_end_of_layout(
8017 const struct nk_draw_vertex_layout_element *element)
8019 return (element->attribute == NK_VERTEX_ATTRIBUTE_COUNT ||
8020 element->format == NK_FORMAT_COUNT);
8024 nk_draw_vertex_color(
void *attribute,
const float *
values,
8025 enum nk_draw_vertex_layout_format
format)
8028 NK_ASSERT(
format >= NK_FORMAT_COLOR_BEGIN);
8029 NK_ASSERT(
format <= NK_FORMAT_COLOR_END);
8033 default: NK_ASSERT(0 &&
"Invalid vertex layout color format");
break;
8034 case NK_FORMAT_R8G8B8A8:
8035 case NK_FORMAT_R8G8B8: {
8037 NK_MEMCPY(attribute, &
col.r,
sizeof(
col));
8039 case NK_FORMAT_B8G8R8A8: {
8042 NK_MEMCPY(attribute, &bgra,
sizeof(bgra));
8044 case NK_FORMAT_R16G15B16: {
8049 NK_MEMCPY(attribute,
col,
sizeof(
col));
8051 case NK_FORMAT_R16G15B16A16: {
8057 NK_MEMCPY(attribute,
col,
sizeof(
col));
8059 case NK_FORMAT_R32G32B32: {
8064 NK_MEMCPY(attribute,
col,
sizeof(
col));
8066 case NK_FORMAT_R32G32B32A32: {
8072 NK_MEMCPY(attribute,
col,
sizeof(
col));
8074 case NK_FORMAT_R32G32B32A32_FLOAT:
8075 NK_MEMCPY(attribute,
values,
sizeof(
float)*4);
8077 case NK_FORMAT_R32G32B32A32_DOUBLE: {
8083 NK_MEMCPY(attribute,
col,
sizeof(
col));
8085 case NK_FORMAT_RGB32:
8086 case NK_FORMAT_RGBA32: {
8095 nk_draw_vertex_element(
void *
dst,
const float *
values,
int value_count,
8096 enum nk_draw_vertex_layout_format
format)
8099 void *attribute =
dst;
8101 NK_ASSERT(
format < NK_FORMAT_COLOR_BEGIN);
8102 if (
format >= NK_FORMAT_COLOR_BEGIN &&
format <= NK_FORMAT_COLOR_END)
return;
8103 for (value_index = 0; value_index < value_count; ++value_index) {
8105 default: NK_ASSERT(0 &&
"invalid vertex layout format");
break;
8106 case NK_FORMAT_SCHAR: {
8109 attribute = (
void*)((
char*)attribute +
sizeof(char));
8111 case NK_FORMAT_SSHORT: {
8114 attribute = (
void*)((
char*)attribute +
sizeof(
value));
8116 case NK_FORMAT_SINT: {
8119 attribute = (
void*)((
char*)attribute +
sizeof(
nk_int));
8121 case NK_FORMAT_UCHAR: {
8122 unsigned char value = (
unsigned char)
NK_CLAMP(NK_UCHAR_MIN,
values[value_index], NK_UCHAR_MAX);
8124 attribute = (
void*)((
char*)attribute +
sizeof(
unsigned char));
8126 case NK_FORMAT_USHORT: {
8129 attribute = (
void*)((
char*)attribute +
sizeof(
value));
8131 case NK_FORMAT_UINT: {
8134 attribute = (
void*)((
char*)attribute +
sizeof(
nk_uint));
8136 case NK_FORMAT_FLOAT:
8137 NK_MEMCPY(attribute, &
values[value_index],
sizeof(
values[value_index]));
8138 attribute = (
void*)((
char*)attribute +
sizeof(float));
8140 case NK_FORMAT_DOUBLE: {
8143 attribute = (
void*)((
char*)attribute +
sizeof(double));
8154 const struct nk_draw_vertex_layout_element *elem_iter =
config->vertex_layout;
8155 while (!nk_draw_vertex_layout_element_is_end_of_layout(elem_iter)) {
8156 void *
address = (
void*)((
char*)
dst + elem_iter->offset);
8157 switch (elem_iter->attribute) {
8158 case NK_VERTEX_ATTRIBUTE_COUNT:
8159 default: NK_ASSERT(0 &&
"wrong element attribute");
8160 case NK_VERTEX_POSITION: nk_draw_vertex_element(
address, &pos.
x, 2, elem_iter->format);
break;
8161 case NK_VERTEX_TEXCOORD: nk_draw_vertex_element(
address, &uv.
x, 2, elem_iter->format);
break;
8162 case NK_VERTEX_COLOR: nk_draw_vertex_color(
address, &
color.r, elem_iter->format);
break;
8170 nk_draw_list_stroke_poly_line(
struct nk_draw_list *list,
const struct nk_vec2 *
points,
8171 const unsigned int points_count,
struct nk_color color,
enum nk_draw_list_stroke closed,
8179 if (!list || points_count < 2)
return;
8182 count = points_count;
8183 if (!closed)
count = points_count-1;
8184 thick_line = thickness > 1.0f;
8186 #ifdef NK_INCLUDE_COMMAND_USERDATA 8187 nk_draw_list_push_userdata(list, list->userdata);
8197 const float AA_SIZE = 1.0f;
8207 const nk_size vtx_count = (thick_line) ? (points_count * 4): (points_count *3);
8209 void *vtx = nk_draw_list_alloc_vertices(list, vtx_count);
8210 nk_draw_index *
ids = nk_draw_list_alloc_elements(list, idx_count);
8213 struct nk_vec2 *normals, *temp;
8214 if (!vtx || !
ids)
return;
8219 size = pnt_size * ((thick_line) ? 5 : 3) * points_count;
8222 if (!normals)
return;
8223 temp = normals + points_count;
8226 vtx = (
void*)((
nk_byte*)list->vertices->memory.ptr + vertex_offset);
8230 const nk_size i2 = ((
i1 + 1) == points_count) ? 0 : (
i1 + 1);
8241 normals[
i1].
x = diff.
y;
8242 normals[
i1].
y = -diff.
x;
8246 normals[points_count-1] = normals[points_count-2];
8269 dmr2 = dm.x * dm.x + dm.y* dm.y;
8270 if (dmr2 > 0.000001
f) {
8271 float scale = 1.0f/dmr2;
8280 ids[0] = (nk_draw_index)(idx2 + 0);
ids[1] = (nk_draw_index)(idx1+0);
8281 ids[2] = (nk_draw_index)(idx1 + 2);
ids[3] = (nk_draw_index)(idx1+2);
8282 ids[4] = (nk_draw_index)(idx2 + 2);
ids[5] = (nk_draw_index)(idx2+0);
8283 ids[6] = (nk_draw_index)(idx2 + 1);
ids[7] = (nk_draw_index)(idx1+1);
8284 ids[8] = (nk_draw_index)(idx1 + 0);
ids[9] = (nk_draw_index)(idx1+0);
8285 ids[10]= (nk_draw_index)(idx2 + 0);
ids[11]= (nk_draw_index)(idx2+1);
8291 for (i = 0; i < points_count; ++i) {
8292 const struct nk_vec2 uv = list->config.null.uv;
8293 vtx = nk_draw_vertex(vtx, &list->config,
points[i], uv,
col);
8294 vtx = nk_draw_vertex(vtx, &list->config, temp[i*2+0], uv, col_trans);
8295 vtx = nk_draw_vertex(vtx, &list->config, temp[i*2+1], uv, col_trans);
8299 const float half_inner_thickness = (thickness - AA_SIZE) * 0.5
f;
8309 d1 =
nk_vec2_muls(normals[points_count-1], half_inner_thickness + AA_SIZE);
8310 d2 =
nk_vec2_muls(normals[points_count-1], half_inner_thickness);
8327 float dmr2 = dm.
x * dm.
x + dm.
y* dm.
y;
8328 if (dmr2 > 0.000001
f) {
8329 float scale = 1.0f/dmr2;
8334 dm_out =
nk_vec2_muls(dm, ((half_inner_thickness) + AA_SIZE));
8342 ids[0] = (nk_draw_index)(idx2 + 1);
ids[1] = (nk_draw_index)(idx1+1);
8343 ids[2] = (nk_draw_index)(idx1 + 2);
ids[3] = (nk_draw_index)(idx1+2);
8344 ids[4] = (nk_draw_index)(idx2 + 2);
ids[5] = (nk_draw_index)(idx2+1);
8345 ids[6] = (nk_draw_index)(idx2 + 1);
ids[7] = (nk_draw_index)(idx1+1);
8346 ids[8] = (nk_draw_index)(idx1 + 0);
ids[9] = (nk_draw_index)(idx1+0);
8347 ids[10]= (nk_draw_index)(idx2 + 0);
ids[11] = (nk_draw_index)(idx2+1);
8348 ids[12]= (nk_draw_index)(idx2 + 2);
ids[13] = (nk_draw_index)(idx1+2);
8349 ids[14]= (nk_draw_index)(idx1 + 3);
ids[15] = (nk_draw_index)(idx1+3);
8350 ids[16]= (nk_draw_index)(idx2 + 3);
ids[17] = (nk_draw_index)(idx2+2);
8356 for (i = 0; i < points_count; ++i) {
8357 const struct nk_vec2 uv = list->config.null.uv;
8358 vtx = nk_draw_vertex(vtx, &list->config, temp[i*4+0], uv, col_trans);
8359 vtx = nk_draw_vertex(vtx, &list->config, temp[i*4+1], uv,
col);
8360 vtx = nk_draw_vertex(vtx, &list->config, temp[i*4+2], uv,
col);
8361 vtx = nk_draw_vertex(vtx, &list->config, temp[i*4+3], uv, col_trans);
8372 void *vtx = nk_draw_list_alloc_vertices(list, vtx_count);
8373 nk_draw_index *
ids = nk_draw_list_alloc_elements(list, idx_count);
8374 if (!vtx || !
ids)
return;
8378 const struct nk_vec2 uv = list->config.null.uv;
8393 dx = diff.
x * (thickness * 0.5f);
8394 dy = diff.
y * (thickness * 0.5f);
8396 vtx = nk_draw_vertex(vtx, &list->config,
nk_vec2(
p1.x + dy,
p1.y - dx), uv,
col);
8397 vtx = nk_draw_vertex(vtx, &list->config,
nk_vec2(
p2.x + dy,
p2.y - dx), uv,
col);
8398 vtx = nk_draw_vertex(vtx, &list->config,
nk_vec2(
p2.x - dy,
p2.y + dx), uv,
col);
8399 vtx = nk_draw_vertex(vtx, &list->config,
nk_vec2(
p1.x - dy,
p1.y + dx), uv,
col);
8401 ids[0] = (nk_draw_index)(
idx+0);
ids[1] = (nk_draw_index)(
idx+1);
8402 ids[2] = (nk_draw_index)(
idx+2);
ids[3] = (nk_draw_index)(
idx+0);
8403 ids[4] = (nk_draw_index)(
idx+2);
ids[5] = (nk_draw_index)(
idx+3);
8412 nk_draw_list_fill_poly_convex(
struct nk_draw_list *list,
8413 const struct nk_vec2 *
points,
const unsigned int points_count,
8422 if (!list || points_count < 3)
return;
8424 #ifdef NK_INCLUDE_COMMAND_USERDATA 8425 nk_draw_list_push_userdata(list, list->userdata);
8438 const float AA_SIZE = 1.0f;
8442 const nk_size idx_count = (points_count-2)*3 + points_count*6;
8443 const nk_size vtx_count = (points_count*2);
8445 void *vtx = nk_draw_list_alloc_vertices(list, vtx_count);
8446 nk_draw_index *
ids = nk_draw_list_alloc_elements(list, idx_count);
8450 unsigned int vtx_inner_idx = (
unsigned int)(
index + 0);
8451 unsigned int vtx_outer_idx = (
unsigned int)(
index + 1);
8452 if (!vtx || !
ids)
return;
8457 size = pnt_size * points_count;
8460 if (!normals)
return;
8461 vtx = (
void*)((
nk_byte*)list->vertices->memory.ptr + vertex_offset);
8464 for (i = 2; i < points_count; i++) {
8465 ids[0] = (nk_draw_index)(vtx_inner_idx);
8466 ids[1] = (nk_draw_index)(vtx_inner_idx + ((i-1) << 1));
8467 ids[2] = (nk_draw_index)(vtx_inner_idx + (i << 1));
8472 for (i0 = points_count-1,
i1 = 0;
i1 < points_count; i0 =
i1++) {
8484 normals[i0].
x = diff.
y;
8485 normals[i0].
y = -diff.
x;
8489 for (i0 = points_count-1,
i1 = 0;
i1 < points_count; i0 =
i1++) {
8490 const struct nk_vec2 uv = list->config.null.uv;
8491 struct nk_vec2 n0 = normals[i0];
8494 float dmr2 = dm.
x*dm.
x + dm.
y*dm.
y;
8495 if (dmr2 > 0.000001
f) {
8496 float scale = 1.0f / dmr2;
8507 ids[0] = (nk_draw_index)(vtx_inner_idx+(
i1<<1));
8508 ids[1] = (nk_draw_index)(vtx_inner_idx+(i0<<1));
8509 ids[2] = (nk_draw_index)(vtx_outer_idx+(i0<<1));
8510 ids[3] = (nk_draw_index)(vtx_outer_idx+(i0<<1));
8511 ids[4] = (nk_draw_index)(vtx_outer_idx+(
i1<<1));
8512 ids[5] = (nk_draw_index)(vtx_inner_idx+(
i1<<1));
8520 const nk_size idx_count = (points_count-2)*3;
8521 const nk_size vtx_count = points_count;
8522 void *vtx = nk_draw_list_alloc_vertices(list, vtx_count);
8523 nk_draw_index *
ids = nk_draw_list_alloc_elements(list, idx_count);
8525 if (!vtx || !
ids)
return;
8526 for (i = 0; i < vtx_count; ++i)
8527 vtx = nk_draw_vertex(vtx, &list->config,
points[i], list->config.null.uv,
col);
8528 for (i = 2; i < points_count; ++i) {
8530 ids[1] = (nk_draw_index)(
index+ i - 1);
8538 nk_draw_list_path_clear(
struct nk_draw_list *list)
8543 list->path_count = 0;
8544 list->path_offset = 0;
8548 nk_draw_list_path_line_to(
struct nk_draw_list *list,
struct nk_vec2 pos)
8551 struct nk_draw_command *
cmd = 0;
8554 if (!list->cmd_count)
8555 nk_draw_list_add_clip(list, nk_null_rect);
8557 cmd = nk_draw_list_command_last(list);
8558 if (
cmd &&
cmd->texture.ptr != list->config.null.texture.ptr)
8559 nk_draw_list_push_image(list, list->config.null.texture);
8561 points = nk_draw_list_alloc_path(list, 1);
8567 nk_draw_list_path_arc_to_fast(
struct nk_draw_list *list,
struct nk_vec2 center,
8568 float radius,
int a_min,
int a_max)
8573 if (a_min <= a_max) {
8574 for (
a = a_min;
a <= a_max;
a++) {
8576 const float x = center.
x +
c.x * radius;
8577 const float y = center.
y +
c.y * radius;
8578 nk_draw_list_path_line_to(list,
nk_vec2(
x,
y));
8584 nk_draw_list_path_arc_to(
struct nk_draw_list *list,
struct nk_vec2 center,
8585 float radius,
float a_min,
float a_max,
unsigned int segments)
8590 if (radius == 0.0
f)
return;
8610 const float d_angle = (a_max - a_min) / (
float)segments;
8611 const float sin_d = (float)NK_SIN(d_angle);
8612 const float cos_d = (float)NK_COS(d_angle);
8614 float cx = (float)NK_COS(a_min) * radius;
8615 float cy = (float)NK_SIN(a_min) * radius;
8616 for(i = 0; i <= segments; ++i) {
8617 const float x = center.
x + cx;
8618 const float y = center.
y + cy;
8619 nk_draw_list_path_line_to(list,
nk_vec2(
x,
y));
8621 const float new_cx = cx * cos_d - cy * sin_d;
8622 const float new_cy = cy * cos_d + cx * sin_d;
8629 nk_draw_list_path_rect_to(
struct nk_draw_list *list,
struct nk_vec2 a,
8640 nk_draw_list_path_line_to(list,
a);
8641 nk_draw_list_path_line_to(list,
nk_vec2(
b.x,
a.y));
8642 nk_draw_list_path_line_to(list,
b);
8643 nk_draw_list_path_line_to(list,
nk_vec2(
a.x,
b.y));
8645 nk_draw_list_path_arc_to_fast(list,
nk_vec2(
a.x +
r,
a.y +
r),
r, 6, 9);
8646 nk_draw_list_path_arc_to_fast(list,
nk_vec2(
b.x -
r,
a.y +
r),
r, 9, 12);
8647 nk_draw_list_path_arc_to_fast(list,
nk_vec2(
b.x -
r,
b.y -
r),
r, 0, 3);
8648 nk_draw_list_path_arc_to_fast(list,
nk_vec2(
a.x +
r,
b.y -
r),
r, 3, 6);
8653 nk_draw_list_path_curve_to(
struct nk_draw_list *list,
struct nk_vec2 p2,
8657 unsigned int i_step;
8661 NK_ASSERT(list->path_count);
8662 if (!list || !list->path_count)
return;
8663 num_segments =
NK_MAX(num_segments, 1);
8665 p1 = nk_draw_list_path_last(list);
8666 t_step = 1.0f/(float)num_segments;
8667 for (i_step = 1; i_step <= num_segments; ++i_step) {
8668 float t = t_step * (float)i_step;
8673 float w4 =
t *
t *
t;
8674 float x =
w1 *
p1.x +
w2 *
p2.x + w3 *
p3.x + w4 * p4.
x;
8675 float y =
w1 *
p1.y +
w2 *
p2.y + w3 *
p3.y + w4 * p4.
y;
8676 nk_draw_list_path_line_to(list,
nk_vec2(
x,
y));
8681 nk_draw_list_path_fill(
struct nk_draw_list *list,
struct nk_color color)
8687 nk_draw_list_fill_poly_convex(list,
points, list->path_count,
color, list->config.shape_AA);
8688 nk_draw_list_path_clear(list);
8692 nk_draw_list_path_stroke(
struct nk_draw_list *list,
struct nk_color color,
8693 enum nk_draw_list_stroke closed,
float thickness)
8699 nk_draw_list_stroke_poly_line(list,
points, list->path_count,
color,
8700 closed, thickness, list->config.line_AA);
8701 nk_draw_list_path_clear(list);
8705 nk_draw_list_stroke_line(
struct nk_draw_list *list,
struct nk_vec2 a,
8709 if (!list || !
col.a)
return;
8711 nk_draw_list_path_line_to(list,
a);
8712 nk_draw_list_path_line_to(list,
b);
8717 nk_draw_list_path_stroke(list,
col, NK_STROKE_OPEN, thickness);
8721 nk_draw_list_fill_rect(
struct nk_draw_list *list,
struct nk_rect rect,
8725 if (!list || !
col.a)
return;
8728 nk_draw_list_path_rect_to(list,
nk_vec2(rect.
x, rect.
y),
8729 nk_vec2(rect.
x + rect.
w, rect.
y + rect.
h), rounding);
8731 nk_draw_list_path_rect_to(list,
nk_vec2(rect.
x-0.5f, rect.
y-0.5f),
8732 nk_vec2(rect.
x + rect.
w, rect.
y + rect.
h), rounding);
8733 } nk_draw_list_path_fill(list,
col);
8737 nk_draw_list_stroke_rect(
struct nk_draw_list *list,
struct nk_rect rect,
8738 struct nk_color col,
float rounding,
float thickness)
8741 if (!list || !
col.a)
return;
8743 nk_draw_list_path_rect_to(list,
nk_vec2(rect.
x, rect.
y),
8744 nk_vec2(rect.
x + rect.
w, rect.
y + rect.
h), rounding);
8746 nk_draw_list_path_rect_to(list,
nk_vec2(rect.
x-0.5f, rect.
y-0.5f),
8747 nk_vec2(rect.
x + rect.
w, rect.
y + rect.
h), rounding);
8748 } nk_draw_list_path_stroke(list,
col, NK_STROKE_CLOSED, thickness);
8752 nk_draw_list_fill_rect_multi_color(
struct nk_draw_list *list,
struct nk_rect rect,
8760 nk_draw_index
index;
8770 nk_draw_list_push_image(list, list->config.null.texture);
8771 index = (nk_draw_index)list->vertex_count;
8772 vtx = nk_draw_list_alloc_vertices(list, 4);
8773 idx = nk_draw_list_alloc_elements(list, 6);
8774 if (!vtx || !
idx)
return;
8780 vtx = nk_draw_vertex(vtx, &list->config,
nk_vec2(rect.
x, rect.
y), list->config.null.uv, col_left);
8781 vtx = nk_draw_vertex(vtx, &list->config,
nk_vec2(rect.
x + rect.
w, rect.
y), list->config.null.uv, col_top);
8782 vtx = nk_draw_vertex(vtx, &list->config,
nk_vec2(rect.
x + rect.
w, rect.
y + rect.
h), list->config.null.uv, col_right);
8783 vtx = nk_draw_vertex(vtx, &list->config,
nk_vec2(rect.
x, rect.
y + rect.
h), list->config.null.uv, col_bottom);
8787 nk_draw_list_fill_triangle(
struct nk_draw_list *list,
struct nk_vec2 a,
8791 if (!list || !
col.a)
return;
8792 nk_draw_list_path_line_to(list,
a);
8793 nk_draw_list_path_line_to(list,
b);
8794 nk_draw_list_path_line_to(list,
c);
8795 nk_draw_list_path_fill(list,
col);
8799 nk_draw_list_stroke_triangle(
struct nk_draw_list *list,
struct nk_vec2 a,
8803 if (!list || !
col.a)
return;
8804 nk_draw_list_path_line_to(list,
a);
8805 nk_draw_list_path_line_to(list,
b);
8806 nk_draw_list_path_line_to(list,
c);
8807 nk_draw_list_path_stroke(list,
col, NK_STROKE_CLOSED, thickness);
8811 nk_draw_list_fill_circle(
struct nk_draw_list *list,
struct nk_vec2 center,
8812 float radius,
struct nk_color col,
unsigned int segs)
8816 if (!list || !
col.a)
return;
8817 a_max =
NK_PI * 2.0f * ((float)segs - 1.0
f) / (float)segs;
8818 nk_draw_list_path_arc_to(list, center, radius, 0.0
f, a_max, segs);
8819 nk_draw_list_path_fill(list,
col);
8823 nk_draw_list_stroke_circle(
struct nk_draw_list *list,
struct nk_vec2 center,
8824 float radius,
struct nk_color col,
unsigned int segs,
float thickness)
8828 if (!list || !
col.a)
return;
8829 a_max =
NK_PI * 2.0f * ((float)segs - 1.0
f) / (float)segs;
8830 nk_draw_list_path_arc_to(list, center, radius, 0.0
f, a_max, segs);
8831 nk_draw_list_path_stroke(list,
col, NK_STROKE_CLOSED, thickness);
8835 nk_draw_list_stroke_curve(
struct nk_draw_list *list,
struct nk_vec2 p0,
8837 struct nk_color col,
unsigned int segments,
float thickness)
8840 if (!list || !
col.a)
return;
8841 nk_draw_list_path_line_to(list, p0);
8842 nk_draw_list_path_curve_to(list, cp0, cp1,
p1, segments);
8843 nk_draw_list_path_stroke(list,
col, NK_STROKE_OPEN, thickness);
8847 nk_draw_list_push_rect_uv(
struct nk_draw_list *list,
struct nk_vec2 a,
8859 nk_draw_index
index;
8869 index = (nk_draw_index)list->vertex_count;
8870 vtx = nk_draw_list_alloc_vertices(list, 4);
8871 idx = nk_draw_list_alloc_elements(list, 6);
8872 if (!vtx || !
idx)
return;
8878 vtx = nk_draw_vertex(vtx, &list->config,
a, uva,
col);
8879 vtx = nk_draw_vertex(vtx, &list->config,
b, uvb,
col);
8880 vtx = nk_draw_vertex(vtx, &list->config,
c, uvc,
col);
8881 vtx = nk_draw_vertex(vtx, &list->config, d, uvd,
col);
8885 nk_draw_list_add_image(
struct nk_draw_list *list,
struct nk_image texture,
8891 nk_draw_list_push_image(list,
texture.handle);
8899 nk_draw_list_push_rect_uv(list,
nk_vec2(rect.
x, rect.
y),
8901 }
else nk_draw_list_push_rect_uv(list,
nk_vec2(rect.
x, rect.
y),
8907 nk_draw_list_add_text(
struct nk_draw_list *list,
const struct nk_user_font *
font,
8908 struct nk_rect rect,
const char *text,
int len,
float font_height,
8916 int next_glyph_len = 0;
8917 struct nk_user_font_glyph
g;
8920 if (!list || !
len || !text)
return;
8922 list->clip_rect.x, list->clip_rect.y, list->clip_rect.w, list->clip_rect.h))
return;
8924 nk_draw_list_push_image(list,
font->texture);
8927 if (!glyph_len)
return;
8930 fg.
a = (
nk_byte)((
float)fg.
a * list->config.global_alpha);
8931 while (text_len <
len && glyph_len) {
8932 float gx, gy, gh, gw;
8933 float char_width = 0;
8938 font->query(
font->userdata, font_height, &
g, unicode,
8942 gx =
x +
g.offset.x;
8943 gy = rect.
y +
g.offset.y;
8944 gw =
g.width; gh =
g.height;
8945 char_width =
g.xadvance;
8946 nk_draw_list_push_rect_uv(list,
nk_vec2(gx,gy),
nk_vec2(gx + gw, gy+ gh),
8947 g.uv[0],
g.uv[1], fg);
8950 text_len += glyph_len;
8952 glyph_len = next_glyph_len;
8966 NK_ASSERT(vertices);
8969 NK_ASSERT(
config->vertex_layout);
8970 NK_ASSERT(
config->vertex_size);
8978 #ifdef NK_INCLUDE_COMMAND_USERDATA 8979 ctx->draw_list.userdata =
cmd->userdata;
8981 switch (
cmd->type) {
8985 nk_draw_list_add_clip(&
ctx->draw_list,
nk_rect(
s->x,
s->y,
s->w,
s->h));
8989 nk_draw_list_stroke_line(&
ctx->draw_list,
nk_vec2(
l->begin.x,
l->begin.y),
8990 nk_vec2(
l->end.x,
l->end.y),
l->color,
l->line_thickness);
8994 nk_draw_list_stroke_curve(&
ctx->draw_list,
nk_vec2(
q->begin.x,
q->begin.y),
8996 q->ctrl[1].y),
nk_vec2(
q->end.x,
q->end.y),
q->color,
8997 config->curve_segment_count,
q->line_thickness);
9001 nk_draw_list_stroke_rect(&
ctx->draw_list,
nk_rect(
r->x,
r->y,
r->w,
r->h),
9002 r->color, (
float)
r->rounding,
r->line_thickness);
9006 nk_draw_list_fill_rect(&
ctx->draw_list,
nk_rect(
r->x,
r->y,
r->w,
r->h),
9007 r->color, (
float)
r->rounding);
9011 nk_draw_list_fill_rect_multi_color(&
ctx->draw_list,
nk_rect(
r->x,
r->y,
r->w,
r->h),
9012 r->left,
r->top,
r->right,
r->bottom);
9016 nk_draw_list_stroke_circle(&
ctx->draw_list,
nk_vec2((
float)
c->x + (
float)
c->w/2,
9017 (
float)
c->y + (
float)
c->h/2), (
float)
c->w/2,
c->color,
9018 config->circle_segment_count,
c->line_thickness);
9022 nk_draw_list_fill_circle(&
ctx->draw_list,
nk_vec2((
float)
c->x + (
float)
c->w/2,
9023 (
float)
c->y + (
float)
c->h/2), (
float)
c->w/2,
c->color,
9024 config->circle_segment_count);
9028 nk_draw_list_path_line_to(&
ctx->draw_list,
nk_vec2(
c->cx,
c->cy));
9029 nk_draw_list_path_arc_to(&
ctx->draw_list,
nk_vec2(
c->cx,
c->cy),
c->r,
9030 c->a[0],
c->a[1],
config->arc_segment_count);
9031 nk_draw_list_path_stroke(&
ctx->draw_list,
c->color, NK_STROKE_CLOSED,
c->line_thickness);
9035 nk_draw_list_path_line_to(&
ctx->draw_list,
nk_vec2(
c->cx,
c->cy));
9036 nk_draw_list_path_arc_to(&
ctx->draw_list,
nk_vec2(
c->cx,
c->cy),
c->r,
9037 c->a[0],
c->a[1],
config->arc_segment_count);
9038 nk_draw_list_path_fill(&
ctx->draw_list,
c->color);
9042 nk_draw_list_stroke_triangle(&
ctx->draw_list,
nk_vec2(
t->a.x,
t->a.y),
9048 nk_draw_list_fill_triangle(&
ctx->draw_list,
nk_vec2(
t->a.x,
t->a.y),
9054 for (i = 0; i <
p->point_count; ++i) {
9055 struct nk_vec2 pnt =
nk_vec2((
float)
p->points[i].x, (
float)
p->points[i].y);
9056 nk_draw_list_path_line_to(&
ctx->draw_list, pnt);
9058 nk_draw_list_path_stroke(&
ctx->draw_list,
p->color, NK_STROKE_CLOSED,
p->line_thickness);
9063 for (i = 0; i <
p->point_count; ++i) {
9064 struct nk_vec2 pnt =
nk_vec2((
float)
p->points[i].x, (
float)
p->points[i].y);
9065 nk_draw_list_path_line_to(&
ctx->draw_list, pnt);
9067 nk_draw_list_path_fill(&
ctx->draw_list,
p->color);
9072 for (i = 0; i <
p->point_count; ++i) {
9073 struct nk_vec2 pnt =
nk_vec2((
float)
p->points[i].x, (
float)
p->points[i].y);
9074 nk_draw_list_path_line_to(&
ctx->draw_list, pnt);
9076 nk_draw_list_path_stroke(&
ctx->draw_list,
p->color, NK_STROKE_OPEN,
p->line_thickness);
9080 nk_draw_list_add_text(&
ctx->draw_list,
t->font,
nk_rect(
t->x,
t->y,
t->w,
t->h),
9081 t->string,
t->length,
t->height,
t->foreground);
9089 c->callback(&
ctx->draw_list,
c->x,
c->y,
c->w,
c->h,
c->callback_data);
9099 NK_API const struct nk_draw_command*
9102 {
return nk__draw_list_begin(&
ctx->draw_list,
buffer);}
9104 NK_API const struct nk_draw_command*
9106 {
return nk__draw_list_end(&
ctx->draw_list,
buffer);}
9108 NK_API const struct nk_draw_command*
9109 nk__draw_next(
const struct nk_draw_command *
cmd,
9111 {
return nk__draw_list_next(
cmd,
buffer, &
ctx->draw_list);}
9122 #ifdef NK_INCLUDE_FONT_BAKING 9130 #define NK_RP__MAXVAL 0xffff 9131 typedef unsigned short nk_rp_coord;
9146 struct nk_rp_node *
next;
9149 struct nk_rp_context {
9156 struct nk_rp_node *active_head;
9157 struct nk_rp_node *free_head;
9158 struct nk_rp_node extra[2];
9162 struct nk_rp__findresult {
9164 struct nk_rp_node **prev_link;
9167 enum NK_RP_HEURISTIC {
9168 NK_RP_HEURISTIC_Skyline_default=0,
9169 NK_RP_HEURISTIC_Skyline_BL_sortHeight = NK_RP_HEURISTIC_Skyline_default,
9170 NK_RP_HEURISTIC_Skyline_BF_sortHeight
9172 enum NK_RP_INIT_STATE{NK_RP__INIT_skyline = 1};
9175 nk_rp_setup_allow_out_of_mem(
struct nk_rp_context *context,
int allow_out_of_mem)
9177 if (allow_out_of_mem)
9190 context->align = (context->width + context->num_nodes-1) / context->num_nodes;
9195 nk_rp_init_target(
struct nk_rp_context *context,
int width,
int height,
9196 struct nk_rp_node *nodes,
int num_nodes)
9199 #ifndef STBRP_LARGE_RECTS 9203 for (i=0; i < num_nodes-1; ++i)
9204 nodes[i].
next = &nodes[i+1];
9206 context->init_mode = NK_RP__INIT_skyline;
9207 context->heuristic = NK_RP_HEURISTIC_Skyline_default;
9208 context->free_head = &nodes[0];
9209 context->active_head = &context->extra[0];
9210 context->width =
width;
9211 context->height =
height;
9212 context->num_nodes = num_nodes;
9213 nk_rp_setup_allow_out_of_mem(context, 0);
9216 context->extra[0].x = 0;
9217 context->extra[0].y = 0;
9218 context->extra[0].next = &context->extra[1];
9219 context->extra[1].x = (nk_rp_coord)
width;
9220 context->extra[1].y = 65535;
9221 context->extra[1].next = 0;
9226 nk_rp__skyline_find_min_y(
struct nk_rp_context *
c,
struct nk_rp_node *
first,
9227 int x0,
int width,
int *pwaste)
9229 struct nk_rp_node *node =
first;
9230 int x1 = x0 +
width;
9231 int min_y, visited_width, waste_area;
9232 NK_ASSERT(
first->x <= x0);
9235 NK_ASSERT(node->next->x > x0);
9237 NK_ASSERT(node->x <= x0);
9242 while (node->x < x1)
9244 if (node->y > min_y) {
9248 waste_area += visited_width * (node->y - min_y);
9252 visited_width += node->next->x - x0;
9254 visited_width += node->next->x - node->x;
9257 int under_width = node->next->x - node->x;
9258 if (under_width + visited_width >
width)
9259 under_width =
width - visited_width;
9260 waste_area += under_width * (min_y - node->y);
9261 visited_width += under_width;
9265 *pwaste = waste_area;
9270 nk_rp__skyline_find_best_pos(struct nk_rp_context *
c,
int width,
int height)
9272 int best_waste = (1<<30), best_x, best_y = (1 << 30);
9273 struct nk_rp__findresult fr;
9274 struct nk_rp_node **prev, *node, *
tail, **best = 0;
9279 NK_ASSERT(
width %
c->align == 0);
9281 node =
c->active_head;
9282 prev = &
c->active_head;
9285 y = nk_rp__skyline_find_min_y(
c, node, node->x,
width, &waste);
9287 if (
c->heuristic == NK_RP_HEURISTIC_Skyline_BL_sortHeight) {
9297 if (
y < best_y || (
y == best_y && waste < best_waste)) {
9307 best_x = (best == 0) ? 0 : (*best)->x;
9325 if (
c->heuristic == NK_RP_HEURISTIC_Skyline_BF_sortHeight)
9327 tail =
c->active_head;
9328 node =
c->active_head;
9329 prev = &
c->active_head;
9337 NK_ASSERT(xpos >= 0);
9339 while (node->next->x <= xpos) {
9343 NK_ASSERT(node->next->x > xpos && node->x <= xpos);
9344 y = nk_rp__skyline_find_min_y(
c, node, xpos,
width, &waste);
9347 if (
y < best_y || waste < best_waste || (waste==best_waste && xpos < best_x)) {
9349 NK_ASSERT(
y <= best_y);
9359 fr.prev_link = best;
9366 nk_rp__skyline_pack_rectangle(struct nk_rp_context *context,
int width,
int height)
9369 struct nk_rp__findresult
res = nk_rp__skyline_find_best_pos(context,
width,
height);
9370 struct nk_rp_node *node, *
cur;
9376 if (
res.prev_link == 0 ||
res.y +
height > context->height || context->free_head == 0) {
9382 node = context->free_head;
9383 node->x = (nk_rp_coord)
res.x;
9384 node->y = (nk_rp_coord) (
res.y +
height);
9386 context->free_head = node->next;
9394 struct nk_rp_node *
next =
cur->next;
9398 *
res.prev_link = node;
9404 struct nk_rp_node *
next =
cur->next;
9406 cur->next = context->free_head;
9407 context->free_head =
cur;
9419 nk_rect_height_compare(
const void *
a,
const void *
b)
9421 const struct nk_rp_rect *
p = (
const struct nk_rp_rect *)
a;
9422 const struct nk_rp_rect *
q = (
const struct nk_rp_rect *)
b;
9427 return (
p->w >
q->w) ? -1 : (
p->w <
q->w);
9431 nk_rect_original_order(
const void *
a,
const void *
b)
9433 const struct nk_rp_rect *
p = (
const struct nk_rp_rect *)
a;
9434 const struct nk_rp_rect *
q = (
const struct nk_rp_rect *)
b;
9435 return (
p->was_packed <
q->was_packed) ? -1 : (
p->was_packed >
q->was_packed);
9439 nk_rp_qsort(
struct nk_rp_rect *array,
unsigned int len,
int(*cmp)(
const void*,
const void*))
9442 #define NK_MAX_SORT_STACK 64 9443 unsigned right,
left = 0, stack[NK_MAX_SORT_STACK], pos = 0;
9444 unsigned seed =
len/2 * 69069+1;
9447 struct nk_rp_rect pivot, tmp;
9448 if (pos == NK_MAX_SORT_STACK)
len = stack[pos = 0];
9450 seed = seed * 69069 + 1;
9453 while (cmp(&array[++
right], &pivot) < 0);
9454 while (cmp(&pivot, &array[--
len]) < 0);
9461 if (pos == 0)
break;
9465 #undef NK_MAX_SORT_STACK 9469 nk_rp_pack_rects(
struct nk_rp_context *context,
struct nk_rp_rect *rects,
int num_rects)
9473 for (i=0; i < num_rects; ++i) {
9474 rects[i].was_packed = i;
9478 nk_rp_qsort(rects, (
unsigned)num_rects, nk_rect_height_compare);
9480 for (i=0; i < num_rects; ++i) {
9481 struct nk_rp__findresult fr = nk_rp__skyline_pack_rectangle(context, rects[i].
w, rects[i].
h);
9483 rects[i].x = (nk_rp_coord) fr.x;
9484 rects[i].y = (nk_rp_coord) fr.y;
9486 rects[i].x = rects[i].y = NK_RP__MAXVAL;
9491 nk_rp_qsort(rects, (
unsigned)num_rects, nk_rect_original_order);
9494 for (i=0; i < num_rects; ++i)
9495 rects[i].was_packed = !(rects[i].
x == NK_RP__MAXVAL && rects[i].
y == NK_RP__MAXVAL);
9506 #define NK_TT_MAX_OVERSAMPLE 8 9507 #define NK_TT__OVER_MASK (NK_TT_MAX_OVERSAMPLE-1) 9509 struct nk_tt_bakedchar {
9510 unsigned short x0,y0,x1,
y1;
9512 float xoff,yoff,xadvance;
9515 struct nk_tt_aligned_quad{
9520 struct nk_tt_packedchar {
9521 unsigned short x0,y0,x1,
y1;
9523 float xoff,yoff,xadvance;
9527 struct nk_tt_pack_range {
9529 int first_unicode_codepoint_in_range;
9531 int *array_of_unicode_codepoints;
9534 struct nk_tt_packedchar *chardata_for_range;
9535 unsigned char h_oversample, v_oversample;
9539 struct nk_tt_pack_context {
9543 int stride_in_bytes;
9545 unsigned int h_oversample, v_oversample;
9550 struct nk_tt_fontinfo {
9551 const unsigned char*
data;
9554 int loca,
head,glyf,hhea,hmtx,kern;
9556 int indexToLocFormat;
9565 struct nk_tt_vertex {
9567 unsigned char type,padding;
9570 struct nk_tt__bitmap{
9575 struct nk_tt__hheap_chunk {
9576 struct nk_tt__hheap_chunk *
next;
9578 struct nk_tt__hheap {
9580 struct nk_tt__hheap_chunk *
head;
9582 int num_remaining_in_head_chunk;
9585 struct nk_tt__edge {
9590 struct nk_tt__active_edge {
9591 struct nk_tt__active_edge *
next;
9597 struct nk_tt__point {
float x,
y;};
9599 #define NK_TT_MACSTYLE_DONTCARE 0 9600 #define NK_TT_MACSTYLE_BOLD 1 9601 #define NK_TT_MACSTYLE_ITALIC 2 9602 #define NK_TT_MACSTYLE_UNDERSCORE 4 9603 #define NK_TT_MACSTYLE_NONE 8 9607 NK_TT_PLATFORM_ID_UNICODE =0,
9608 NK_TT_PLATFORM_ID_MAC =1,
9609 NK_TT_PLATFORM_ID_ISO =2,
9610 NK_TT_PLATFORM_ID_MICROSOFT =3
9614 NK_TT_UNICODE_EID_UNICODE_1_0 =0,
9615 NK_TT_UNICODE_EID_UNICODE_1_1 =1,
9616 NK_TT_UNICODE_EID_ISO_10646 =2,
9617 NK_TT_UNICODE_EID_UNICODE_2_0_BMP=3,
9618 NK_TT_UNICODE_EID_UNICODE_2_0_FULL=4
9622 NK_TT_MS_EID_SYMBOL =0,
9623 NK_TT_MS_EID_UNICODE_BMP =1,
9624 NK_TT_MS_EID_SHIFTJIS =2,
9625 NK_TT_MS_EID_UNICODE_FULL =10
9629 NK_TT_MAC_EID_ROMAN =0, NK_TT_MAC_EID_ARABIC =4,
9630 NK_TT_MAC_EID_JAPANESE =1, NK_TT_MAC_EID_HEBREW =5,
9631 NK_TT_MAC_EID_CHINESE_TRAD =2, NK_TT_MAC_EID_GREEK =6,
9632 NK_TT_MAC_EID_KOREAN =3, NK_TT_MAC_EID_RUSSIAN =7
9637 NK_TT_MS_LANG_ENGLISH =0x0409, NK_TT_MS_LANG_ITALIAN =0x0410,
9638 NK_TT_MS_LANG_CHINESE =0x0804, NK_TT_MS_LANG_JAPANESE =0x0411,
9639 NK_TT_MS_LANG_DUTCH =0x0413, NK_TT_MS_LANG_KOREAN =0x0412,
9640 NK_TT_MS_LANG_FRENCH =0x040c, NK_TT_MS_LANG_RUSSIAN =0x0419,
9641 NK_TT_MS_LANG_GERMAN =0x0407, NK_TT_MS_LANG_SPANISH =0x0409,
9642 NK_TT_MS_LANG_HEBREW =0x040d, NK_TT_MS_LANG_SWEDISH =0x041D
9646 NK_TT_MAC_LANG_ENGLISH =0 , NK_TT_MAC_LANG_JAPANESE =11,
9647 NK_TT_MAC_LANG_ARABIC =12, NK_TT_MAC_LANG_KOREAN =23,
9648 NK_TT_MAC_LANG_DUTCH =4 , NK_TT_MAC_LANG_RUSSIAN =32,
9649 NK_TT_MAC_LANG_FRENCH =1 , NK_TT_MAC_LANG_SPANISH =6 ,
9650 NK_TT_MAC_LANG_GERMAN =2 , NK_TT_MAC_LANG_SWEDISH =5 ,
9651 NK_TT_MAC_LANG_HEBREW =10, NK_TT_MAC_LANG_CHINESE_SIMPLIFIED =33,
9652 NK_TT_MAC_LANG_ITALIAN =3 , NK_TT_MAC_LANG_CHINESE_TRAD =19
9655 #define nk_ttBYTE(p) (* (const nk_byte *) (p)) 9656 #define nk_ttCHAR(p) (* (const char *) (p)) 9658 #if defined(NK_BIGENDIAN) && !defined(NK_ALLOW_UNALIGNED_TRUETYPE) 9659 #define nk_ttUSHORT(p) (* (nk_ushort *) (p)) 9660 #define nk_ttSHORT(p) (* (nk_short *) (p)) 9661 #define nk_ttULONG(p) (* (nk_uint *) (p)) 9662 #define nk_ttLONG(p) (* (nk_int *) (p)) 9669 #define nk_tt_tag4(p,c0,c1,c2,c3)\ 9670 ((p)[0] == (c0) && (p)[1] == (c1) && (p)[2] == (c2) && (p)[3] == (c3)) 9671 #define nk_tt_tag(p,str) nk_tt_tag4(p,str[0],str[1],str[2],str[3]) 9674 int glyph_index,
struct nk_tt_vertex **pvertices);
9680 nk_int num_tables = nk_ttUSHORT(
data+fontstart+4);
9681 nk_uint tabledir = fontstart + 12;
9683 for (i = 0; i < num_tables; ++i) {
9685 if (nk_tt_tag(
data+loc+0,
tag))
9686 return nk_ttULONG(
data+loc+8);
9692 nk_tt_InitFont(
struct nk_tt_fontinfo *
info,
const unsigned char *data2,
int fontstart)
9699 info->fontstart = fontstart;
9701 cmap = nk_tt__find_table(
data, (
nk_uint)fontstart,
"cmap");
9702 info->loca = (int)nk_tt__find_table(
data, (
nk_uint)fontstart,
"loca");
9703 info->head = (int)nk_tt__find_table(
data, (
nk_uint)fontstart,
"head");
9704 info->glyf = (int)nk_tt__find_table(
data, (
nk_uint)fontstart,
"glyf");
9705 info->hhea = (int)nk_tt__find_table(
data, (
nk_uint)fontstart,
"hhea");
9706 info->hmtx = (int)nk_tt__find_table(
data, (
nk_uint)fontstart,
"hmtx");
9707 info->kern = (int)nk_tt__find_table(
data, (
nk_uint)fontstart,
"kern");
9711 t = nk_tt__find_table(
data, (
nk_uint)fontstart,
"maxp");
9712 if (
t)
info->numGlyphs = nk_ttUSHORT(
data+
t+4);
9713 else info->numGlyphs = 0xffff;
9718 numTables = nk_ttUSHORT(
data + cmap + 2);
9719 info->index_map = 0;
9720 for (i=0; i < numTables; ++i)
9724 switch(nk_ttUSHORT(
data+encoding_record)) {
9725 case NK_TT_PLATFORM_ID_MICROSOFT:
9726 switch (nk_ttUSHORT(
data+encoding_record+2)) {
9727 case NK_TT_MS_EID_UNICODE_BMP:
9728 case NK_TT_MS_EID_UNICODE_FULL:
9730 info->index_map = (int)(cmap + nk_ttULONG(
data+encoding_record+4));
9734 case NK_TT_PLATFORM_ID_UNICODE:
9737 info->index_map = (int)(cmap + nk_ttULONG(
data+encoding_record+4));
9742 if (
info->index_map == 0)
9744 info->indexToLocFormat = nk_ttUSHORT(
data+
info->head + 50);
9749 nk_tt_FindGlyphIndex(
const struct nk_tt_fontinfo *
info,
int unicode_codepoint)
9756 nk_int bytes = nk_ttUSHORT(
data + index_map + 2);
9757 if (unicode_codepoint < bytes-6)
9758 return nk_ttBYTE(
data + index_map + 6 + unicode_codepoint);
9760 }
else if (
format == 6) {
9764 return nk_ttUSHORT(
data + index_map + 10 + (unicode_codepoint - (
int)
first)*2);
9766 }
else if (
format == 2) {
9769 }
else if (
format == 4) {
9776 nk_uint endCount = index_map + 14;
9779 if (unicode_codepoint > 0xffff)
9784 if (unicode_codepoint >= nk_ttUSHORT(
data + search + rangeShift*2))
9785 search += (
nk_uint)(rangeShift*2);
9789 while (entrySelector) {
9792 end = nk_ttUSHORT(
data + search + searchRange*2);
9793 if (unicode_codepoint >
end)
9794 search += (
nk_uint)(searchRange*2);
9803 NK_ASSERT(unicode_codepoint <= nk_ttUSHORT(
data + endCount + 2*item));
9804 start = nk_ttUSHORT(
data + index_map + 14 + segcount*2 + 2 + 2*item);
9805 if (unicode_codepoint <
start)
9808 offset = nk_ttUSHORT(
data + index_map + 14 + segcount*6 + 2 + 2*item);
9810 return (
nk_ushort) (unicode_codepoint + nk_ttSHORT(
data + index_map + 14 + segcount*4 + 2 + 2*item));
9812 return nk_ttUSHORT(
data +
offset + (unicode_codepoint-
start)*2 + index_map + 14 + segcount*6 + 2 + 2*item);
9817 low = 0; high = (
nk_int)ngroups;
9819 while (low < high) {
9820 nk_int mid = low + ((high-low) >> 1);
9821 nk_uint start_char = nk_ttULONG(
data+index_map+16+mid*12);
9822 nk_uint end_char = nk_ttULONG(
data+index_map+16+mid*12+4);
9823 if ((
nk_uint) unicode_codepoint < start_char)
9825 else if ((
nk_uint) unicode_codepoint > end_char)
9828 nk_uint start_glyph = nk_ttULONG(
data+index_map+16+mid*12+8);
9830 return (
int)start_glyph + (int)unicode_codepoint - (
int)start_char;
9832 return (
int)start_glyph;
9853 nk_tt__GetGlyfOffset(
const struct nk_tt_fontinfo *
info,
int glyph_index)
9856 if (glyph_index >=
info->numGlyphs)
return -1;
9857 if (
info->indexToLocFormat >= 2)
return -1;
9859 if (
info->indexToLocFormat == 0) {
9860 g1 =
info->glyf + nk_ttUSHORT(
info->
data +
info->loca + glyph_index * 2) * 2;
9861 g2 =
info->glyf + nk_ttUSHORT(
info->
data +
info->loca + glyph_index * 2 + 2) * 2;
9863 g1 =
info->glyf + (int)nk_ttULONG (
info->
data +
info->loca + glyph_index * 4);
9864 g2 =
info->glyf + (int)nk_ttULONG (
info->
data +
info->loca + glyph_index * 4 + 4);
9866 return g1==g2 ? -1 : g1;
9870 nk_tt_GetGlyphBox(
const struct nk_tt_fontinfo *
info,
int glyph_index,
9871 int *x0,
int *y0,
int *x1,
int *
y1)
9873 int g = nk_tt__GetGlyfOffset(
info, glyph_index);
9874 if (
g < 0)
return 0;
9876 if (x0) *x0 = nk_ttSHORT(
info->
data +
g + 2);
9877 if (y0) *y0 = nk_ttSHORT(
info->
data +
g + 4);
9878 if (x1) *x1 = nk_ttSHORT(
info->
data +
g + 6);
9884 stbtt__close_shape(
struct nk_tt_vertex *vertices,
int num_vertices,
int was_off,
9889 nk_tt_setvertex(&vertices[num_vertices++], NK_TT_vcurve, (cx+scx)>>1, (cy+scy)>>1, cx,cy);
9890 nk_tt_setvertex(&vertices[num_vertices++], NK_TT_vcurve, sx,sy,scx,scy);
9893 nk_tt_setvertex(&vertices[num_vertices++], NK_TT_vcurve,sx,sy,cx,cy);
9895 nk_tt_setvertex(&vertices[num_vertices++], NK_TT_vline,sx,sy,0,0);
9897 return num_vertices;
9901 nk_tt_GetGlyphShape(
const struct nk_tt_fontinfo *
info,
struct nk_allocator *alloc,
9902 int glyph_index,
struct nk_tt_vertex **pvertices)
9905 const nk_byte *endPtsOfContours;
9907 struct nk_tt_vertex *vertices=0;
9909 int g = nk_tt__GetGlyfOffset(
info, glyph_index);
9912 if (
g < 0)
return 0;
9913 numberOfContours = nk_ttSHORT(
data +
g);
9914 if (numberOfContours > 0) {
9916 nk_int ins, i,
j=0,
m,
n, next_move, was_off=0, off, start_off=0;
9919 endPtsOfContours = (
data +
g + 10);
9920 ins = nk_ttUSHORT(
data +
g + 10 + numberOfContours * 2);
9921 points =
data +
g + 10 + numberOfContours * 2 + 2 + ins;
9923 n = 1+nk_ttUSHORT(endPtsOfContours + numberOfContours*2-2);
9924 m =
n + 2*numberOfContours;
9925 vertices = (
struct nk_tt_vertex *)alloc->
alloc(alloc->
userdata, 0, (
nk_size)
m *
sizeof(vertices[0]));
9938 for (i=0; i <
n; ++i) {
9939 if (flagcount == 0) {
9944 vertices[off+i].type =
flags;
9949 for (i=0; i <
n; ++i) {
9950 flags = vertices[off+i].type;
9953 x += (
flags & 16) ? dx : -dx;
9955 if (!(
flags & 16)) {
9965 for (i=0; i <
n; ++i) {
9966 flags = vertices[off+i].type;
9969 y += (
flags & 32) ? dy : -dy;
9971 if (!(
flags & 32)) {
9981 sx = sy = cx = cy = scx = scy = 0;
9982 for (i=0; i <
n; ++i)
9984 flags = vertices[off+i].type;
9988 if (next_move == i) {
9990 num_vertices = stbtt__close_shape(vertices, num_vertices, was_off, start_off, sx,sy,scx,scy,cx,cy);
9993 start_off = !(
flags & 1);
9999 if (!(vertices[off+i+1].
type & 1)) {
10001 sx = (
x + (
nk_int) vertices[off+i+1].
x) >> 1;
10002 sy = (
y + (
nk_int) vertices[off+i+1].
y) >> 1;
10005 sx = (
nk_int) vertices[off+i+1].
x;
10006 sy = (
nk_int) vertices[off+i+1].
y;
10013 nk_tt_setvertex(&vertices[num_vertices++], NK_TT_vmove,sx,sy,0,0);
10015 next_move = 1 + nk_ttUSHORT(endPtsOfContours+
j*2);
10021 nk_tt_setvertex(&vertices[num_vertices++], NK_TT_vcurve, (cx+
x)>>1, (cy+
y)>>1, cx, cy);
10027 nk_tt_setvertex(&vertices[num_vertices++], NK_TT_vcurve,
x,
y, cx, cy);
10028 else nk_tt_setvertex(&vertices[num_vertices++], NK_TT_vline,
x,
y,0,0);
10033 num_vertices = stbtt__close_shape(vertices, num_vertices, was_off, start_off, sx,sy,scx,scy,cx,cy);
10034 }
else if (numberOfContours == -1) {
10044 int comp_num_verts = 0, i;
10045 struct nk_tt_vertex *comp_verts = 0, *tmp = 0;
10046 float mtx[6] = {1,0,0,1,0,0},
m,
n;
10049 gidx = (
nk_ushort)nk_ttSHORT(comp); comp+=2;
10053 mtx[4] = nk_ttSHORT(comp); comp+=2;
10054 mtx[5] = nk_ttSHORT(comp); comp+=2;
10056 mtx[4] = nk_ttCHAR(comp); comp+=1;
10057 mtx[5] = nk_ttCHAR(comp); comp+=1;
10063 if (
flags & (1<<3)) {
10064 mtx[0] = mtx[3] = nk_ttSHORT(comp)/16384.0f; comp+=2;
10065 mtx[1] = mtx[2] = 0;
10066 }
else if (
flags & (1<<6)) {
10067 mtx[0] = nk_ttSHORT(comp)/16384.0f; comp+=2;
10068 mtx[1] = mtx[2] = 0;
10069 mtx[3] = nk_ttSHORT(comp)/16384.0f; comp+=2;
10070 }
else if (
flags & (1<<7)) {
10071 mtx[0] = nk_ttSHORT(comp)/16384.0f; comp+=2;
10072 mtx[1] = nk_ttSHORT(comp)/16384.0f; comp+=2;
10073 mtx[2] = nk_ttSHORT(comp)/16384.0f; comp+=2;
10074 mtx[3] = nk_ttSHORT(comp)/16384.0f; comp+=2;
10078 m = (float) NK_SQRT(mtx[0]*mtx[0] + mtx[1]*mtx[1]);
10079 n = (float) NK_SQRT(mtx[2]*mtx[2] + mtx[3]*mtx[3]);
10082 comp_num_verts = nk_tt_GetGlyphShape(
info, alloc, gidx, &comp_verts);
10083 if (comp_num_verts > 0)
10086 for (i = 0; i < comp_num_verts; ++i) {
10087 struct nk_tt_vertex*
v = &comp_verts[i];
10090 v->x = (short)(
m * (mtx[0]*
x + mtx[2]*
y + mtx[4]));
10091 v->y = (short)(
n * (mtx[1]*
x + mtx[3]*
y + mtx[5]));
10093 v->cx = (short)(
m * (mtx[0]*
x + mtx[2]*
y + mtx[4]));
10094 v->cy = (short)(
n * (mtx[1]*
x + mtx[3]*
y + mtx[5]));
10097 tmp = (
struct nk_tt_vertex*)alloc->
alloc(alloc->
userdata, 0,
10098 (
nk_size)(num_vertices+comp_num_verts)*
sizeof(
struct nk_tt_vertex));
10101 if (comp_verts) alloc->
free(alloc->
userdata, comp_verts);
10104 if (num_vertices > 0) NK_MEMCPY(tmp, vertices, (
nk_size)num_vertices*
sizeof(
struct nk_tt_vertex));
10105 NK_MEMCPY(tmp+num_vertices, comp_verts, (
nk_size)comp_num_verts*
sizeof(
struct nk_tt_vertex));
10109 num_vertices += comp_num_verts;
10112 more =
flags & (1<<5);
10114 }
else if (numberOfContours < 0) {
10120 *pvertices = vertices;
10121 return num_vertices;
10125 nk_tt_GetGlyphHMetrics(
const struct nk_tt_fontinfo *
info,
int glyph_index,
10126 int *advanceWidth,
int *leftSideBearing)
10129 if (glyph_index < numOfLongHorMetrics) {
10131 *advanceWidth = nk_ttSHORT(
info->
data +
info->hmtx + 4*glyph_index);
10132 if (leftSideBearing)
10133 *leftSideBearing = nk_ttSHORT(
info->
data +
info->hmtx + 4*glyph_index + 2);
10136 *advanceWidth = nk_ttSHORT(
info->
data +
info->hmtx + 4*(numOfLongHorMetrics-1));
10137 if (leftSideBearing)
10138 *leftSideBearing = nk_ttSHORT(
info->
data +
info->hmtx + 4*numOfLongHorMetrics + 2*(glyph_index - numOfLongHorMetrics));
10143 nk_tt_GetFontVMetrics(
const struct nk_tt_fontinfo *
info,
10144 int *ascent,
int *descent,
int *lineGap)
10146 if (ascent ) *ascent = nk_ttSHORT(
info->
data+
info->hhea + 4);
10147 if (descent) *descent = nk_ttSHORT(
info->
data+
info->hhea + 6);
10148 if (lineGap) *lineGap = nk_ttSHORT(
info->
data+
info->hhea + 8);
10152 nk_tt_ScaleForPixelHeight(
const struct nk_tt_fontinfo *
info,
float height)
10155 return (
float)
height / (float)fheight;
10159 nk_tt_ScaleForMappingEmToPixels(
const struct nk_tt_fontinfo *
info,
float pixels)
10161 int unitsPerEm = nk_ttUSHORT(
info->
data +
info->head + 18);
10162 return pixels / (float)unitsPerEm;
10169 nk_tt_GetGlyphBitmapBoxSubpixel(
const struct nk_tt_fontinfo *
font,
10170 int glyph,
float scale_x,
float scale_y,
float shift_x,
float shift_y,
10171 int *ix0,
int *iy0,
int *ix1,
int *iy1)
10174 if (!nk_tt_GetGlyphBox(
font, glyph, &x0,&y0,&x1,&
y1)) {
10182 if (ix0) *ix0 = nk_ifloorf((
float)x0 * scale_x + shift_x);
10183 if (iy0) *iy0 = nk_ifloorf((
float)-
y1 * scale_y + shift_y);
10184 if (ix1) *ix1 = nk_iceilf ((
float)x1 * scale_x + shift_x);
10185 if (iy1) *iy1 = nk_iceilf ((
float)-y0 * scale_y + shift_y);
10190 nk_tt_GetGlyphBitmapBox(
const struct nk_tt_fontinfo *
font,
int glyph,
10191 float scale_x,
float scale_y,
int *ix0,
int *iy0,
int *ix1,
int *iy1)
10193 nk_tt_GetGlyphBitmapBoxSubpixel(
font, glyph, scale_x, scale_y,0.0
f,0.0
f, ix0, iy0, ix1, iy1);
10200 nk_tt__hheap_alloc(
struct nk_tt__hheap *hh,
nk_size size)
10202 if (hh->first_free) {
10203 void *
p = hh->first_free;
10204 hh->first_free = * (
void **)
p;
10207 if (hh->num_remaining_in_head_chunk == 0) {
10209 struct nk_tt__hheap_chunk *
c = (
struct nk_tt__hheap_chunk *)
10210 hh->alloc.alloc(hh->alloc.userdata, 0,
10212 if (
c == 0)
return 0;
10213 c->next = hh->head;
10215 hh->num_remaining_in_head_chunk =
count;
10217 --hh->num_remaining_in_head_chunk;
10218 return (
char *) (hh->head) +
size * (
nk_size)hh->num_remaining_in_head_chunk;
10223 nk_tt__hheap_free(
struct nk_tt__hheap *hh,
void *
p)
10225 *(
void **)
p = hh->first_free;
10226 hh->first_free =
p;
10230 nk_tt__hheap_cleanup(
struct nk_tt__hheap *hh)
10232 struct nk_tt__hheap_chunk *
c = hh->head;
10234 struct nk_tt__hheap_chunk *
n =
c->next;
10235 hh->alloc.free(hh->alloc.userdata,
c);
10241 nk_tt__new_active(
struct nk_tt__hheap *hh,
struct nk_tt__edge *e,
10242 int off_x,
float start_point)
10244 struct nk_tt__active_edge *
z = (
struct nk_tt__active_edge *)
10245 nk_tt__hheap_alloc(hh,
sizeof(*
z));
10246 float dxdy = (e->x1 - e->x0) / (e->y1 - e->y0);
10250 z->fdy = (dxdy != 0) ? (1/dxdy): 0;
10251 z->fx = e->x0 + dxdy * (start_point - e->y0);
10252 z->fx -= (float)off_x;
10253 z->direction = e->invert ? 1.0f : -1.0f;
10261 nk_tt__handle_clipped_edge(
float *scanline,
int x,
struct nk_tt__active_edge *e,
10262 float x0,
float y0,
float x1,
float y1)
10264 if (y0 ==
y1)
return;
10265 NK_ASSERT(y0 <
y1);
10266 NK_ASSERT(e->sy <= e->ey);
10267 if (y0 > e->ey)
return;
10270 x0 += (x1-x0) * (e->sy - y0) / (
y1-y0);
10274 x1 += (x1-x0) * (e->ey -
y1) / (
y1-y0);
10278 if (x0 ==
x) NK_ASSERT(x1 <=
x+1);
10279 else if (x0 ==
x+1) NK_ASSERT(x1 >=
x);
10280 else if (x0 <=
x) NK_ASSERT(x1 <=
x);
10281 else if (x0 >=
x+1) NK_ASSERT(x1 >=
x+1);
10282 else NK_ASSERT(x1 >=
x && x1 <=
x+1);
10284 if (x0 <=
x && x1 <=
x)
10285 scanline[
x] += e->direction * (
y1-y0);
10286 else if (x0 >=
x+1 && x1 >=
x+1);
10288 NK_ASSERT(x0 >=
x && x0 <= x+1 && x1 >=
x && x1 <=
x+1);
10290 scanline[
x] += (float)e->direction * (
float)(
y1-y0) * (1.0
f-((x0-(
float)
x)+(x1-(float)
x))/2.0
f);
10295 nk_tt__fill_active_edges_new(
float *scanline,
float *scanline_fill,
int len,
10296 struct nk_tt__active_edge *e,
float y_top)
10298 float y_bottom = y_top+1;
10303 NK_ASSERT(e->ey >= y_top);
10308 nk_tt__handle_clipped_edge(scanline,(
int) x0,e, x0,y_top, x0,y_bottom);
10309 nk_tt__handle_clipped_edge(scanline_fill-1,(
int) x0+1,e, x0,y_top, x0,y_bottom);
10311 nk_tt__handle_clipped_edge(scanline_fill-1,0,e, x0,y_top, x0,y_bottom);
10317 float xb = x0 + dx;
10318 float x_top, x_bottom;
10321 NK_ASSERT(e->sy <= y_bottom && e->ey >= y_top);
10326 if (e->sy > y_top) {
10327 x_top = x0 + dx * (e->sy - y_top);
10334 if (e->ey < y_bottom) {
10335 x_bottom = x0 + dx * (e->ey - y_top);
10342 if (x_top >= 0 && x_bottom >= 0 && x_top <
len && x_bottom <
len)
10345 if ((
int) x_top == (int) x_bottom) {
10348 int x = (int) x_top;
10350 NK_ASSERT(
x >= 0 &&
x <
len);
10351 scanline[
x] += e->direction * (1.0f-(((float)x_top - (
float)
x) + ((
float)x_bottom-(float)
x))/2.0
f) * (float)
height;
10352 scanline_fill[
x] += e->direction * (float)
height;
10355 float y_crossing, step,
sign, area;
10357 if (x_top > x_bottom)
10361 y0 = y_bottom - (y0 - y_top);
10362 y1 = y_bottom - (
y1 - y_top);
10363 t = y0; y0 =
y1;
y1 =
t;
10364 t = x_bottom; x_bottom = x_top; x_top =
t;
10367 t = x0; x0 = xb; xb =
t;
10371 x2 = (int) x_bottom;
10373 y_crossing = ((float)x1+1 - (
float)x0) * (
float)dy + (float)y_top;
10375 sign = e->direction;
10377 area =
sign * (y_crossing-y0);
10379 scanline[x1] += area * (1.0f-((float)((
float)x_top - (float)x1)+(float)(x1+1-x1))/2.0
f);
10382 for (
x = x1+1;
x <
x2; ++
x) {
10383 scanline[
x] += area + step/2;
10386 y_crossing += (float)dy * (
float)(
x2 - (x1+1));
10388 scanline[
x2] += area +
sign * (1.0f-((float)(
x2-
x2)+((float)x_bottom-(
float)
x2))/2.0f) * (
y1-y_crossing);
10389 scanline_fill[
x2] +=
sign * (
y1-y0);
10416 float x1 = (float) (
x);
10417 float x2 = (float) (
x+1);
10419 float y3 = y_bottom;
10422 yb = ((float)
x - x0) / dx + y_top;
10423 y2 = ((float)
x+1 - x0) / dx + y_top;
10425 if (x0 < x1 && x3 >
x2) {
10426 nk_tt__handle_clipped_edge(scanline,
x,e, x0,ya, x1,yb);
10427 nk_tt__handle_clipped_edge(scanline,
x,e, x1,yb,
x2,
y2);
10428 nk_tt__handle_clipped_edge(scanline,
x,e,
x2,
y2, x3,y3);
10429 }
else if (x3 < x1 && x0 >
x2) {
10430 nk_tt__handle_clipped_edge(scanline,
x,e, x0,ya,
x2,
y2);
10431 nk_tt__handle_clipped_edge(scanline,
x,e,
x2,
y2, x1,yb);
10432 nk_tt__handle_clipped_edge(scanline,
x,e, x1,yb, x3,y3);
10433 }
else if (x0 < x1 && x3 > x1) {
10434 nk_tt__handle_clipped_edge(scanline,
x,e, x0,ya, x1,yb);
10435 nk_tt__handle_clipped_edge(scanline,
x,e, x1,yb, x3,y3);
10436 }
else if (x3 < x1 && x0 > x1) {
10437 nk_tt__handle_clipped_edge(scanline,
x,e, x0,ya, x1,yb);
10438 nk_tt__handle_clipped_edge(scanline,
x,e, x1,yb, x3,y3);
10439 }
else if (x0 < x2 && x3 >
x2) {
10440 nk_tt__handle_clipped_edge(scanline,
x,e, x0,ya,
x2,
y2);
10441 nk_tt__handle_clipped_edge(scanline,
x,e,
x2,
y2, x3,y3);
10442 }
else if (x3 < x2 && x0 >
x2) {
10443 nk_tt__handle_clipped_edge(scanline,
x,e, x0,ya,
x2,
y2);
10444 nk_tt__handle_clipped_edge(scanline,
x,e,
x2,
y2, x3,y3);
10446 nk_tt__handle_clipped_edge(scanline,
x,e, x0,ya, x3,y3);
10457 nk_tt__rasterize_sorted_edges(
struct nk_tt__bitmap *
result,
struct nk_tt__edge *e,
10458 int n,
int vsubsample,
int off_x,
int off_y,
struct nk_allocator *alloc)
10460 struct nk_tt__hheap hh;
10461 struct nk_tt__active_edge *active = 0;
10463 float scanline_data[129], *scanline, *scanline2;
10471 else scanline = scanline_data;
10473 scanline2 = scanline +
result->w;
10475 e[
n].y0 = (float) (off_y +
result->h) + 1;
10480 float scan_y_top = (float)
y + 0.0
f;
10481 float scan_y_bottom = (float)
y + 1.0
f;
10482 struct nk_tt__active_edge **step = &active;
10484 NK_MEMSET(scanline , 0, (
nk_size)
result->w*
sizeof(scanline[0]));
10485 NK_MEMSET(scanline2, 0, (
nk_size)(
result->w+1)*
sizeof(scanline[0]));
10490 struct nk_tt__active_edge *
z = *step;
10491 if (
z->ey <= scan_y_top) {
10493 NK_ASSERT(
z->direction);
10495 nk_tt__hheap_free(&hh,
z);
10497 step = &((*step)->next);
10502 while (e->y0 <= scan_y_bottom) {
10503 if (e->y0 != e->y1) {
10504 struct nk_tt__active_edge *
z = nk_tt__new_active(&hh, e, off_x, scan_y_top);
10506 NK_ASSERT(
z->ey >= scan_y_top);
10517 nk_tt__fill_active_edges_new(scanline, scanline2+1,
result->w, active, scan_y_top);
10521 for (i=0; i <
result->w; ++i) {
10524 sum += scanline2[i];
10525 k = scanline[i] + sum;
10526 k = (float)
NK_ABS(k) * 255.0f + 0.5f;
10528 if (
m > 255)
m = 255;
10535 struct nk_tt__active_edge *
z = *step;
10537 step = &((*step)->next);
10542 nk_tt__hheap_cleanup(&hh);
10543 if (scanline != scanline_data)
10547 #define NK_TT__COMPARE(a,b) ((a)->y0 < (b)->y0) 10549 nk_tt__sort_edges_ins_sort(
struct nk_tt__edge *
p,
int n)
10552 for (i=1; i <
n; ++i) {
10553 struct nk_tt__edge
t =
p[i], *
a = &
t;
10556 struct nk_tt__edge *
b = &
p[
j-1];
10557 int c = NK_TT__COMPARE(
a,
b);
10568 nk_tt__sort_edges_quicksort(
struct nk_tt__edge *
p,
int n)
10572 struct nk_tt__edge
t;
10573 int c01,c12,
c,
m,i,
j;
10577 c01 = NK_TT__COMPARE(&
p[0],&
p[
m]);
10578 c12 = NK_TT__COMPARE(&
p[
m],&
p[
n-1]);
10584 c = NK_TT__COMPARE(&
p[0],&
p[
n-1]);
10587 z = (
c == c12) ? 0 :
n-1;
10606 if (!NK_TT__COMPARE(&
p[i], &
p[0]))
break;
10609 if (!NK_TT__COMPARE(&
p[0], &
p[
j]))
break;
10625 nk_tt__sort_edges_quicksort(
p,
j);
10629 nk_tt__sort_edges_quicksort(
p+i,
n-i);
10636 nk_tt__sort_edges(
struct nk_tt__edge *
p,
int n)
10638 nk_tt__sort_edges_quicksort(
p,
n);
10639 nk_tt__sort_edges_ins_sort(
p,
n);
10643 nk_tt__rasterize(
struct nk_tt__bitmap *
result,
struct nk_tt__point *pts,
10644 int *wcount,
int windings,
float scale_x,
float scale_y,
10645 float shift_x,
float shift_y,
int off_x,
int off_y,
int invert,
10648 float y_scale_inv =
invert ? -scale_y : scale_y;
10649 struct nk_tt__edge *e;
10651 int vsubsample = 1;
10656 for (i=0; i < windings; ++i)
10659 e = (
struct nk_tt__edge*)
10661 if (e == 0)
return;
10665 for (i=0; i < windings; ++i)
10667 struct nk_tt__point *
p = pts +
m;
10670 for (k=0; k < wcount[i];
j=k++) {
10673 if (
p[
j].
y ==
p[k].
y)
10682 e[
n].x0 =
p[
a].x * scale_x + shift_x;
10683 e[
n].y0 = (
p[
a].y * y_scale_inv + shift_y) * (
float)vsubsample;
10684 e[
n].x1 =
p[
b].x * scale_x + shift_x;
10685 e[
n].y1 = (
p[
b].y * y_scale_inv + shift_y) * (
float)vsubsample;
10692 nk_tt__sort_edges(e,
n);
10694 nk_tt__rasterize_sorted_edges(
result, e,
n, vsubsample, off_x, off_y, alloc);
10699 nk_tt__add_point(
struct nk_tt__point *
points,
int n,
float x,
float y)
10707 nk_tt__tesselate_curve(
struct nk_tt__point *
points,
int *num_points,
10708 float x0,
float y0,
float x1,
float y1,
float x2,
float y2,
10709 float objspace_flatness_squared,
int n)
10714 float mx = (x0 + 2*x1 +
x2)/4;
10715 float my = (y0 + 2*
y1 +
y2)/4;
10717 float dx = (x0+
x2)/2 - mx;
10718 float dy = (y0+
y2)/2 - my;
10723 if (dx*dx+dy*dy > objspace_flatness_squared) {
10724 nk_tt__tesselate_curve(
points, num_points, x0,y0,
10725 (x0+x1)/2.0
f,(y0+
y1)/2.0
f, mx,my, objspace_flatness_squared,
n+1);
10726 nk_tt__tesselate_curve(
points, num_points, mx,my,
10727 (x1+
x2)/2.0
f,(
y1+
y2)/2.0
f,
x2,
y2, objspace_flatness_squared,
n+1);
10729 nk_tt__add_point(
points, *num_points,
x2,
y2);
10730 *num_points = *num_points+1;
10737 nk_tt_FlattenCurves(
struct nk_tt_vertex *vertices,
int num_verts,
10738 float objspace_flatness,
int **contour_lengths,
int *num_contours,
10741 struct nk_tt__point *
points=0;
10743 float objspace_flatness_squared = objspace_flatness * objspace_flatness;
10750 for (i=0; i < num_verts; ++i)
10751 if (vertices[i].
type == NK_TT_vmove) ++
n;
10754 if (
n == 0)
return 0;
10756 *contour_lengths = (
int *)
10758 if (*contour_lengths == 0) {
10764 for (pass=0; pass < 2; ++pass)
10768 points = (
struct nk_tt__point *)
10775 for (i=0; i < num_verts; ++i)
10777 switch (vertices[i].
type) {
10781 (*contour_lengths)[
n] = num_points -
start;
10783 start = num_points;
10785 x = vertices[i].x,
y = vertices[i].y;
10786 nk_tt__add_point(
points, num_points++,
x,
y);
10789 x = vertices[i].x,
y = vertices[i].y;
10790 nk_tt__add_point(
points, num_points++,
x,
y);
10793 nk_tt__tesselate_curve(
points, &num_points,
x,
y,
10794 vertices[i].cx, vertices[i].cy,
10795 vertices[i].
x, vertices[i].
y,
10796 objspace_flatness_squared, 0);
10797 x = vertices[i].x,
y = vertices[i].y;
10802 (*contour_lengths)[
n] = num_points -
start;
10809 *contour_lengths = 0;
10815 nk_tt_Rasterize(
struct nk_tt__bitmap *
result,
float flatness_in_pixels,
10816 struct nk_tt_vertex *vertices,
int num_verts,
10817 float scale_x,
float scale_y,
float shift_x,
float shift_y,
10820 float scale = scale_x > scale_y ? scale_y : scale_x;
10821 int winding_count, *winding_lengths;
10822 struct nk_tt__point *windings = nk_tt_FlattenCurves(vertices, num_verts,
10823 flatness_in_pixels /
scale, &winding_lengths, &winding_count, alloc);
10827 nk_tt__rasterize(
result, windings, winding_lengths, winding_count,
10828 scale_x, scale_y, shift_x, shift_y, x_off, y_off,
invert, alloc);
10835 nk_tt_MakeGlyphBitmapSubpixel(
const struct nk_tt_fontinfo *
info,
unsigned char *
output,
10836 int out_w,
int out_h,
int out_stride,
float scale_x,
float scale_y,
10837 float shift_x,
float shift_y,
int glyph,
struct nk_allocator *alloc)
10840 struct nk_tt_vertex *vertices;
10841 int num_verts = nk_tt_GetGlyphShape(
info, alloc, glyph, &vertices);
10842 struct nk_tt__bitmap gbm;
10844 nk_tt_GetGlyphBitmapBoxSubpixel(
info, glyph, scale_x, scale_y, shift_x,
10845 shift_y, &ix0,&iy0,0,0);
10849 gbm.stride = out_stride;
10851 if (gbm.w && gbm.h)
10852 nk_tt_Rasterize(&gbm, 0.35
f, vertices, num_verts, scale_x, scale_y,
10853 shift_x, shift_y, ix0,iy0, 1, alloc);
10861 nk_tt_PackBegin(
struct nk_tt_pack_context *spc,
unsigned char *
pixels,
10862 int pw,
int ph,
int stride_in_bytes,
int padding,
struct nk_allocator *alloc)
10864 int num_nodes = pw - padding;
10865 struct nk_rp_context *context = (
struct nk_rp_context *)
10867 struct nk_rp_node *nodes = (
struct nk_rp_node*)
10870 if (context == 0 || nodes == 0) {
10871 if (context != 0) alloc->
free(alloc->
userdata, context);
10879 spc->pack_info = context;
10880 spc->nodes = nodes;
10881 spc->padding = padding;
10882 spc->stride_in_bytes = (stride_in_bytes != 0) ? stride_in_bytes : pw;
10883 spc->h_oversample = 1;
10884 spc->v_oversample = 1;
10886 nk_rp_init_target(context, pw-padding, ph-padding, nodes, num_nodes);
10893 nk_tt_PackEnd(
struct nk_tt_pack_context *spc,
struct nk_allocator *alloc)
10900 nk_tt_PackSetOversampling(
struct nk_tt_pack_context *spc,
10901 unsigned int h_oversample,
unsigned int v_oversample)
10903 NK_ASSERT(h_oversample <= NK_TT_MAX_OVERSAMPLE);
10904 NK_ASSERT(v_oversample <= NK_TT_MAX_OVERSAMPLE);
10905 if (h_oversample <= NK_TT_MAX_OVERSAMPLE)
10906 spc->h_oversample = h_oversample;
10907 if (v_oversample <= NK_TT_MAX_OVERSAMPLE)
10908 spc->v_oversample = v_oversample;
10912 nk_tt__h_prefilter(
unsigned char *
pixels,
int w,
int h,
int stride_in_bytes,
10915 unsigned char buffer[NK_TT_MAX_OVERSAMPLE];
10916 int safe_w =
w - kernel_width;
10919 for (
j=0;
j <
h; ++
j)
10922 unsigned int total;
10928 switch (kernel_width) {
10930 for (i=0; i <= safe_w; ++i) {
10931 total += (
unsigned int)(
pixels[i] -
buffer[i & NK_TT__OVER_MASK]);
10932 buffer[(i+kernel_width) & NK_TT__OVER_MASK] =
pixels[i];
10933 pixels[i] = (
unsigned char) (total / 2);
10937 for (i=0; i <= safe_w; ++i) {
10938 total += (
unsigned int)(
pixels[i] -
buffer[i & NK_TT__OVER_MASK]);
10939 buffer[(i+kernel_width) & NK_TT__OVER_MASK] =
pixels[i];
10940 pixels[i] = (
unsigned char) (total / 3);
10944 for (i=0; i <= safe_w; ++i) {
10945 total += (
unsigned int)
pixels[i] -
buffer[i & NK_TT__OVER_MASK];
10946 buffer[(i+kernel_width) & NK_TT__OVER_MASK] =
pixels[i];
10947 pixels[i] = (
unsigned char) (total / 4);
10951 for (i=0; i <= safe_w; ++i) {
10952 total += (
unsigned int)(
pixels[i] -
buffer[i & NK_TT__OVER_MASK]);
10953 buffer[(i+kernel_width) & NK_TT__OVER_MASK] =
pixels[i];
10954 pixels[i] = (
unsigned char) (total / 5);
10958 for (i=0; i <= safe_w; ++i) {
10959 total += (
unsigned int)(
pixels[i] -
buffer[i & NK_TT__OVER_MASK]);
10960 buffer[(i+kernel_width) & NK_TT__OVER_MASK] =
pixels[i];
10961 pixels[i] = (
unsigned char) (total / (
unsigned int)kernel_width);
10966 for (; i <
w; ++i) {
10967 NK_ASSERT(
pixels[i] == 0);
10968 total -= (
unsigned int)(
buffer[i & NK_TT__OVER_MASK]);
10969 pixels[i] = (
unsigned char) (total / (
unsigned int)kernel_width);
10971 pixels += stride_in_bytes;
10976 nk_tt__v_prefilter(
unsigned char *
pixels,
int w,
int h,
int stride_in_bytes,
10979 unsigned char buffer[NK_TT_MAX_OVERSAMPLE];
10980 int safe_h =
h - kernel_width;
10983 for (
j=0;
j <
w; ++
j)
10986 unsigned int total;
10992 switch (kernel_width) {
10994 for (i=0; i <= safe_h; ++i) {
10995 total += (
unsigned int)(
pixels[i*stride_in_bytes] -
buffer[i & NK_TT__OVER_MASK]);
10996 buffer[(i+kernel_width) & NK_TT__OVER_MASK] =
pixels[i*stride_in_bytes];
10997 pixels[i*stride_in_bytes] = (
unsigned char) (total / 2);
11001 for (i=0; i <= safe_h; ++i) {
11002 total += (
unsigned int)(
pixels[i*stride_in_bytes] -
buffer[i & NK_TT__OVER_MASK]);
11003 buffer[(i+kernel_width) & NK_TT__OVER_MASK] =
pixels[i*stride_in_bytes];
11004 pixels[i*stride_in_bytes] = (
unsigned char) (total / 3);
11008 for (i=0; i <= safe_h; ++i) {
11009 total += (
unsigned int)(
pixels[i*stride_in_bytes] -
buffer[i & NK_TT__OVER_MASK]);
11010 buffer[(i+kernel_width) & NK_TT__OVER_MASK] =
pixels[i*stride_in_bytes];
11011 pixels[i*stride_in_bytes] = (
unsigned char) (total / 4);
11015 for (i=0; i <= safe_h; ++i) {
11016 total += (
unsigned int)(
pixels[i*stride_in_bytes] -
buffer[i & NK_TT__OVER_MASK]);
11017 buffer[(i+kernel_width) & NK_TT__OVER_MASK] =
pixels[i*stride_in_bytes];
11018 pixels[i*stride_in_bytes] = (
unsigned char) (total / 5);
11022 for (i=0; i <= safe_h; ++i) {
11023 total += (
unsigned int)(
pixels[i*stride_in_bytes] -
buffer[i & NK_TT__OVER_MASK]);
11024 buffer[(i+kernel_width) & NK_TT__OVER_MASK] =
pixels[i*stride_in_bytes];
11025 pixels[i*stride_in_bytes] = (
unsigned char) (total / (
unsigned int)kernel_width);
11030 for (; i <
h; ++i) {
11031 NK_ASSERT(
pixels[i*stride_in_bytes] == 0);
11032 total -= (
unsigned int)(
buffer[i & NK_TT__OVER_MASK]);
11033 pixels[i*stride_in_bytes] = (
unsigned char) (total / (
unsigned int)kernel_width);
11040 nk_tt__oversample_shift(
int oversample)
11049 return (
float)-(oversample - 1) / (2.0
f * (
float)oversample);
11054 nk_tt_PackFontRangesGatherRects(
struct nk_tt_pack_context *spc,
11055 struct nk_tt_fontinfo *
info,
struct nk_tt_pack_range *ranges,
11056 int num_ranges,
struct nk_rp_rect *rects)
11061 for (i=0; i < num_ranges; ++i) {
11062 float fh = ranges[i].font_size;
11063 float scale = (fh > 0) ? nk_tt_ScaleForPixelHeight(
info, fh):
11064 nk_tt_ScaleForMappingEmToPixels(
info, -fh);
11065 ranges[i].h_oversample = (
unsigned char) spc->h_oversample;
11066 ranges[i].v_oversample = (
unsigned char) spc->v_oversample;
11067 for (
j=0;
j < ranges[i].num_chars; ++
j) {
11069 int codepoint = ranges[i].first_unicode_codepoint_in_range ?
11070 ranges[i].first_unicode_codepoint_in_range +
j :
11071 ranges[i].array_of_unicode_codepoints[
j];
11074 nk_tt_GetGlyphBitmapBoxSubpixel(
info,glyph,
scale * (
float)spc->h_oversample,
11075 scale * (
float)spc->v_oversample, 0,0, &x0,&y0,&x1,&
y1);
11076 rects[k].w = (nk_rp_coord) (x1-x0 + spc->padding + (
int)spc->h_oversample-1);
11077 rects[k].h = (nk_rp_coord) (
y1-y0 + spc->padding + (
int)spc->v_oversample-1);
11085 nk_tt_PackFontRangesRenderIntoRects(
struct nk_tt_pack_context *spc,
11086 struct nk_tt_fontinfo *
info,
struct nk_tt_pack_range *ranges,
11087 int num_ranges,
struct nk_rp_rect *rects,
struct nk_allocator *alloc)
11089 int i,
j,k, return_value = 1;
11091 int old_h_over = (int)spc->h_oversample;
11092 int old_v_over = (
int)spc->v_oversample;
11096 for (i=0; i < num_ranges; ++i)
11098 float fh = ranges[i].font_size;
11099 float recip_h,recip_v,sub_x,sub_y;
11100 float scale = fh > 0 ? nk_tt_ScaleForPixelHeight(
info, fh):
11101 nk_tt_ScaleForMappingEmToPixels(
info, -fh);
11103 spc->h_oversample = ranges[i].h_oversample;
11104 spc->v_oversample = ranges[i].v_oversample;
11106 recip_h = 1.0f / (float)spc->h_oversample;
11107 recip_v = 1.0f / (
float)spc->v_oversample;
11109 sub_x = nk_tt__oversample_shift((
int)spc->h_oversample);
11110 sub_y = nk_tt__oversample_shift((
int)spc->v_oversample);
11112 for (
j=0;
j < ranges[i].num_chars; ++
j)
11114 struct nk_rp_rect *
r = &rects[k];
11117 struct nk_tt_packedchar *bc = &ranges[i].chardata_for_range[
j];
11118 int advance, lsb, x0,y0,x1,
y1;
11119 int codepoint = ranges[i].first_unicode_codepoint_in_range ?
11120 ranges[i].first_unicode_codepoint_in_range +
j :
11121 ranges[i].array_of_unicode_codepoints[
j];
11123 nk_rp_coord pad = (nk_rp_coord) spc->padding;
11126 r->x = (nk_rp_coord)((int)
r->x + (
int)pad);
11127 r->y = (nk_rp_coord)((
int)
r->y + (int)pad);
11128 r->w = (nk_rp_coord)((
int)
r->w - (int)pad);
11129 r->h = (nk_rp_coord)((
int)
r->h - (int)pad);
11131 nk_tt_GetGlyphHMetrics(
info, glyph, &advance, &lsb);
11132 nk_tt_GetGlyphBitmapBox(
info, glyph,
scale * (
float)spc->h_oversample,
11133 (
scale * (
float)spc->v_oversample), &x0,&y0,&x1,&
y1);
11134 nk_tt_MakeGlyphBitmapSubpixel(
info, spc->pixels +
r->x +
r->y*spc->stride_in_bytes,
11135 (
int)(
r->w - spc->h_oversample+1), (
int)(
r->h - spc->v_oversample+1),
11136 spc->stride_in_bytes,
scale * (
float)spc->h_oversample,
11137 scale * (
float)spc->v_oversample, 0,0, glyph, alloc);
11139 if (spc->h_oversample > 1)
11140 nk_tt__h_prefilter(spc->pixels +
r->x +
r->y*spc->stride_in_bytes,
11141 r->w,
r->h, spc->stride_in_bytes, (
int)spc->h_oversample);
11143 if (spc->v_oversample > 1)
11144 nk_tt__v_prefilter(spc->pixels +
r->x +
r->y*spc->stride_in_bytes,
11145 r->w,
r->h, spc->stride_in_bytes, (
int)spc->v_oversample);
11151 bc->xadvance =
scale * (float)advance;
11152 bc->xoff = (float) x0 * recip_h + sub_x;
11153 bc->yoff = (float) y0 * recip_v + sub_y;
11154 bc->xoff2 = ((float)x0 +
r->w) * recip_h + sub_x;
11155 bc->yoff2 = ((float)y0 +
r->h) * recip_v + sub_y;
11163 spc->h_oversample = (
unsigned int)old_h_over;
11164 spc->v_oversample = (
unsigned int)old_v_over;
11165 return return_value;
11169 nk_tt_GetPackedQuad(
struct nk_tt_packedchar *chardata,
int pw,
int ph,
11170 int char_index,
float *xpos,
float *ypos,
struct nk_tt_aligned_quad *
q,
11171 int align_to_integer)
11173 float ipw = 1.0f / (float)pw, iph = 1.0
f / (
float)ph;
11174 struct nk_tt_packedchar *
b = (
struct nk_tt_packedchar*)(chardata + char_index);
11175 if (align_to_integer) {
11176 int tx = nk_ifloorf((*xpos +
b->xoff) + 0.5f);
11177 int ty = nk_ifloorf((*ypos +
b->yoff) + 0.5f);
11179 float x = (float)tx;
11180 float y = (float)
ty;
11184 q->x1 =
x +
b->xoff2 -
b->xoff;
11185 q->y1 =
y +
b->yoff2 -
b->yoff;
11187 q->x0 = *xpos +
b->xoff;
11188 q->y0 = *ypos +
b->yoff;
11189 q->x1 = *xpos +
b->xoff2;
11190 q->y1 = *ypos +
b->yoff2;
11192 q->s0 =
b->x0 * ipw;
11193 q->t0 =
b->y0 * iph;
11194 q->s1 =
b->x1 * ipw;
11195 q->t1 =
b->y1 * iph;
11196 *xpos +=
b->xadvance;
11204 struct nk_font_bake_data {
11205 struct nk_tt_fontinfo
info;
11206 struct nk_rp_rect *rects;
11207 struct nk_tt_pack_range *ranges;
11211 struct nk_font_baker {
11213 struct nk_tt_pack_context spc;
11214 struct nk_font_bake_data *
build;
11215 struct nk_tt_packedchar *packed_chars;
11216 struct nk_rp_rect *rects;
11217 struct nk_tt_pack_range *ranges;
11231 if (!
range)
return 0;
11232 while (*(iter++) != 0);
11233 return (iter ==
range) ? 0 : (int)((iter -
range)/2);
11240 int total_glyphs = 0;
11241 for (i = 0; i <
count; ++i) {
11246 diff = (int)((
t -
f) + 1);
11247 total_glyphs += diff;
11249 return total_glyphs;
11253 nk_font_default_glyph_ranges(
void)
11260 nk_font_chinese_glyph_ranges(
void)
11274 nk_font_cyrillic_glyph_ranges(
void)
11287 nk_font_korean_glyph_ranges(
void)
11299 nk_font_baker_memory(
nk_size *temp,
int *glyph_count,
11300 struct nk_font_config *config_list,
int count)
11302 int range_count = 0;
11303 int total_range_count = 0;
11304 struct nk_font_config *iter;
11306 NK_ASSERT(config_list);
11307 NK_ASSERT(glyph_count);
11308 if (!config_list) {
11315 if (!config_list->range)
11316 config_list->range = nk_font_default_glyph_ranges();
11317 for (iter = config_list; iter; iter = iter->next) {
11318 range_count = nk_range_count(iter->range);
11319 total_range_count += range_count;
11320 *glyph_count += nk_range_glyph_count(iter->range, range_count);
11323 *temp = (
nk_size)*glyph_count *
sizeof(
struct nk_rp_rect);
11324 *temp += (
nk_size)total_range_count *
sizeof(
struct nk_tt_pack_range);
11325 *temp += (
nk_size)*glyph_count *
sizeof(
struct nk_tt_packedchar);
11326 *temp += (
nk_size)
count *
sizeof(
struct nk_font_bake_data);
11327 *temp +=
sizeof(
struct nk_font_baker);
11328 *temp += nk_rect_align + nk_range_align + nk_char_align;
11329 *temp += nk_build_align + nk_baker_align;
11333 nk_font_baker(
void *memory,
int glyph_count,
int count,
struct nk_allocator *alloc)
11335 struct nk_font_baker *baker;
11336 if (!memory)
return 0;
11338 baker = (
struct nk_font_baker*)
NK_ALIGN_PTR(memory, nk_baker_align);
11339 baker->build = (
struct nk_font_bake_data*)
NK_ALIGN_PTR((baker + 1), nk_build_align);
11340 baker->packed_chars = (
struct nk_tt_packedchar*)
NK_ALIGN_PTR((baker->build +
count), nk_char_align);
11341 baker->rects = (
struct nk_rp_rect*)
NK_ALIGN_PTR((baker->packed_chars + glyph_count), nk_rect_align);
11342 baker->ranges = (
struct nk_tt_pack_range*)
NK_ALIGN_PTR((baker->rects + glyph_count), nk_range_align);
11343 baker->alloc = *alloc;
11348 nk_font_bake_pack(
struct nk_font_baker *baker,
11350 const struct nk_font_config *config_list,
int count,
11354 const struct nk_font_config *config_iter;
11355 int total_glyph_count = 0;
11356 int total_range_count = 0;
11357 int range_count = 0;
11360 NK_ASSERT(image_memory);
11363 NK_ASSERT(config_list);
11368 for (config_iter = config_list; config_iter; config_iter = config_iter->next) {
11369 range_count = nk_range_count(config_iter->range);
11370 total_range_count += range_count;
11371 total_glyph_count += nk_range_glyph_count(config_iter->range, range_count);
11375 for (config_iter = config_list; config_iter; config_iter = config_iter->next) {
11376 const struct nk_font_config *cfg = config_iter;
11377 if (!nk_tt_InitFont(&baker->build[i++].info, (
const unsigned char*)cfg->ttf_blob, 0))
11382 *
width = (total_glyph_count > 1000) ? 1024 : 512;
11383 nk_tt_PackBegin(&baker->spc, 0, (
int)*
width, (
int)
max_height, 0, 1, alloc);
11392 struct nk_rp_rect custom_space;
11393 nk_zero(&custom_space,
sizeof(custom_space));
11394 custom_space.w = (nk_rp_coord)((custom->
w * 2) + 1);
11395 custom_space.h = (nk_rp_coord)(custom->
h + 1);
11397 nk_tt_PackSetOversampling(&baker->spc, 1, 1);
11398 nk_rp_pack_rects((
struct nk_rp_context*)baker->spc.pack_info, &custom_space, 1);
11401 custom->
x = (short)custom_space.x;
11402 custom->
y = (
short)custom_space.y;
11403 custom->
w = (short)custom_space.w;
11404 custom->
h = (
short)custom_space.h;
11408 for (input_i = 0, config_iter = config_list; input_i <
count && config_iter;
11409 input_i++, config_iter = config_iter->next)
11414 const struct nk_font_config *cfg = config_iter;
11415 struct nk_font_bake_data *tmp = &baker->build[input_i];
11418 glyph_count = 0; range_count = 0;
11425 tmp->ranges = baker->ranges + range_n;
11426 tmp->range_count = (
nk_rune)range_count;
11427 range_n += range_count;
11428 for (i = 0; i < range_count; ++i) {
11430 tmp->ranges[i].font_size = cfg->size;
11431 tmp->ranges[i].first_unicode_codepoint_in_range = (int)
in_range[0];
11433 tmp->ranges[i].chardata_for_range = baker->packed_chars + char_n;
11434 char_n += tmp->ranges[i].num_chars;
11438 tmp->rects = baker->rects + rect_n;
11439 rect_n += glyph_count;
11440 nk_tt_PackSetOversampling(&baker->spc, cfg->oversample_h, cfg->oversample_v);
11441 n = nk_tt_PackFontRangesGatherRects(&baker->spc, &tmp->info,
11442 tmp->ranges, (
int)tmp->range_count, tmp->rects);
11443 nk_rp_pack_rects((
struct nk_rp_context*)baker->spc.pack_info, tmp->rects, (
int)
n);
11446 for (i = 0; i <
n; ++i) {
11447 if (tmp->rects[i].was_packed)
11451 NK_ASSERT(rect_n == total_glyph_count);
11452 NK_ASSERT(char_n == total_glyph_count);
11453 NK_ASSERT(range_n == total_range_count);
11461 nk_font_bake(
struct nk_font_baker *baker,
void *image_memory,
int width,
int height,
11462 struct nk_font_glyph *glyphs,
int glyphs_count,
11463 const struct nk_font_config *config_list,
int font_count)
11467 const struct nk_font_config *config_iter;
11469 NK_ASSERT(image_memory);
11472 NK_ASSERT(config_list);
11474 NK_ASSERT(font_count);
11475 NK_ASSERT(glyphs_count);
11476 if (!image_memory || !
width || !
height || !config_list ||
11477 !font_count || !glyphs || !glyphs_count)
11482 baker->spc.pixels = (
unsigned char*)image_memory;
11483 baker->spc.height = (int)
height;
11484 for (input_i = 0, config_iter = config_list; input_i < font_count && config_iter;
11485 ++input_i, config_iter = config_iter->next)
11487 const struct nk_font_config *cfg = config_iter;
11488 struct nk_font_bake_data *tmp = &baker->build[input_i];
11489 nk_tt_PackSetOversampling(&baker->spc, cfg->oversample_h, cfg->oversample_v);
11490 nk_tt_PackFontRangesRenderIntoRects(&baker->spc, &tmp->info, tmp->ranges,
11491 (
int)tmp->range_count, tmp->rects, &baker->alloc);
11493 nk_tt_PackEnd(&baker->spc, &baker->alloc);
11496 for (input_i = 0, config_iter = config_list; input_i < font_count && config_iter;
11497 ++input_i, config_iter = config_iter->next)
11502 const struct nk_font_config *cfg = config_iter;
11503 struct nk_font_bake_data *tmp = &baker->build[input_i];
11504 struct nk_baked_font *dst_font = cfg->font;
11506 float font_scale = nk_tt_ScaleForPixelHeight(&tmp->info, cfg->size);
11507 int unscaled_ascent, unscaled_descent, unscaled_line_gap;
11508 nk_tt_GetFontVMetrics(&tmp->info, &unscaled_ascent, &unscaled_descent,
11509 &unscaled_line_gap);
11512 if (!cfg->merge_mode) {
11513 dst_font->ranges = cfg->range;
11514 dst_font->height = cfg->size;
11515 dst_font->ascent = ((float)unscaled_ascent * font_scale);
11516 dst_font->descent = ((float)unscaled_descent * font_scale);
11517 dst_font->glyph_offset = glyph_n;
11521 for (i = 0; i < tmp->range_count; ++i)
11523 struct nk_tt_pack_range *
range = &tmp->ranges[i];
11524 for (char_idx = 0; char_idx <
range->num_chars; char_idx++)
11527 float dummy_x = 0, dummy_y = 0;
11528 struct nk_tt_aligned_quad
q;
11529 struct nk_font_glyph *glyph;
11532 const struct nk_tt_packedchar *pc = &
range->chardata_for_range[char_idx];
11533 if (!pc->x0 && !pc->x1 && !pc->y0 && !pc->y1)
continue;
11535 nk_tt_GetPackedQuad(
range->chardata_for_range, (
int)
width,
11536 (
int)
height, char_idx, &dummy_x, &dummy_y, &
q, 0);
11539 glyph = &glyphs[dst_font->glyph_offset + (
unsigned int)glyph_count];
11541 glyph->x0 =
q.x0; glyph->y0 =
q.y0;
11542 glyph->x1 =
q.x1; glyph->y1 =
q.y1;
11543 glyph->y0 += (dst_font->ascent + 0.5f);
11544 glyph->y1 += (dst_font->ascent + 0.5f);
11545 glyph->w = glyph->x1 - glyph->x0 + 0.5f;
11546 glyph->h = glyph->y1 - glyph->y0;
11548 if (cfg->coord_type == NK_COORD_PIXEL) {
11549 glyph->u0 =
q.s0 * (float)
width;
11550 glyph->v0 =
q.t0 * (float)
height;
11551 glyph->u1 =
q.s1 * (float)
width;
11552 glyph->v1 =
q.t1 * (float)
height;
11559 glyph->xadvance = (pc->xadvance + cfg->spacing.x);
11560 if (cfg->pixel_snap)
11561 glyph->xadvance = (float)(
int)(glyph->xadvance + 0.5f);
11565 dst_font->glyph_count = glyph_count;
11566 glyph_n += dst_font->glyph_count;
11571 nk_font_bake_custom_data(
void *img_memory,
int img_width,
int img_height,
11572 struct nk_recti img_dst,
const char *texture_data_mask,
int tex_width,
11573 int tex_height,
char white,
char black)
11580 NK_ASSERT(img_memory);
11581 NK_ASSERT(img_width);
11582 NK_ASSERT(img_height);
11583 NK_ASSERT(texture_data_mask);
11585 if (!img_memory || !img_width || !img_height || !texture_data_mask)
11589 for (
y = 0,
n = 0;
y < tex_height; ++
y) {
11590 for (
x = 0;
x < tex_width; ++
x, ++
n) {
11591 const int off0 = ((img_dst.
x +
x) + (img_dst.
y +
y) * img_width);
11592 const int off1 = off0 + 1 + tex_width;
11593 pixels[off0] = (texture_data_mask[
n] == white) ? 0xFF : 0x00;
11594 pixels[off1] = (texture_data_mask[
n] == black) ? 0xFF : 0x00;
11600 nk_font_bake_convert(
void *out_memory,
int img_width,
int img_height,
11601 const void *in_memory)
11607 NK_ASSERT(out_memory);
11608 NK_ASSERT(in_memory);
11609 NK_ASSERT(img_width);
11610 NK_ASSERT(img_height);
11611 if (!out_memory || !in_memory || !img_height || !img_width)
return;
11615 for (
n = (
int)(img_width * img_height);
n > 0;
n--)
11629 float text_width = 0;
11633 struct nk_font *
font = (
struct nk_font*)handle.
ptr;
11635 NK_ASSERT(
font->glyphs);
11641 if (!glyph_len)
return 0;
11642 while (text_len <= (
int)
len && glyph_len) {
11643 const struct nk_font_glyph *
g;
11647 g = nk_font_find_glyph(
font, unicode);
11648 text_width +=
g->xadvance *
scale;
11651 glyph_len =
nk_utf_decode(text + text_len, &unicode, (
int)
len - text_len);
11652 text_len += glyph_len;
11657 #ifdef NK_INCLUDE_VERTEX_BUFFER_OUTPUT 11663 const struct nk_font_glyph *
g;
11664 struct nk_font *
font;
11669 font = (
struct nk_font*)handle.
ptr;
11671 NK_ASSERT(
font->glyphs);
11672 if (!
font || !glyph)
11677 glyph->width = (
g->x1 -
g->x0) *
scale;
11678 glyph->height = (
g->y1 -
g->y0) *
scale;
11680 glyph->xadvance = (
g->xadvance *
scale);
11686 NK_API const struct nk_font_glyph*
11687 nk_font_find_glyph(
struct nk_font *
font,
nk_rune unicode)
11691 int total_glyphs = 0;
11692 const struct nk_font_glyph *glyph = 0;
11695 NK_ASSERT(
font->glyphs);
11696 NK_ASSERT(
font->info.ranges);
11697 if (!
font || !
font->glyphs)
return 0;
11699 glyph =
font->fallback;
11700 count = nk_range_count(
font->info.ranges);
11701 for (i = 0; i <
count; ++i) {
11704 int diff = (int)((
t -
f) + 1);
11705 if (unicode >=
f && unicode <=
t)
11706 return &
font->glyphs[((
nk_rune)total_glyphs + (unicode -
f))];
11707 total_glyphs += diff;
11713 nk_font_init(
struct nk_font *
font,
float pixel_height,
11714 nk_rune fallback_codepoint,
struct nk_font_glyph *glyphs,
11717 struct nk_baked_font baked;
11720 NK_ASSERT(baked_font);
11721 if (!
font || !glyphs || !baked_font)
11724 baked = *baked_font;
11725 font->fallback = 0;
11726 font->info = baked;
11727 font->scale = (float)pixel_height / (
float)
font->info.height;
11728 font->glyphs = &glyphs[baked_font->glyph_offset];
11730 font->fallback_codepoint = fallback_codepoint;
11731 font->fallback = nk_font_find_glyph(
font, fallback_codepoint);
11733 font->handle.height =
font->info.height *
font->scale;
11734 font->handle.width = nk_font_text_width;
11736 #ifdef NK_INCLUDE_VERTEX_BUFFER_OUTPUT 11737 font->handle.query = nk_font_query_font_glyph;
11738 font->handle.texture =
font->texture;
11751 #ifdef NK_INCLUDE_DEFAULT_FONT 11754 #pragma clang diagnostic push 11756 #pragma clang diagnostic ignored "-Woverlength-strings" 11757 #elif defined(__GNUC__) || defined(__GNUG__) 11758 #pragma GCC diagnostic push 11759 #pragma GCC diagnostic ignored "-Woverlength-strings" 11762 NK_GLOBAL const char nk_proggy_clean_ttf_compressed_data_base85[11980+1] =
11763 "7])#######hV0qs'/###[),##/l:$#Q6>##5[n42>c-TH`->>#/e>11NNV=Bv(*:.F?uu#(gRU.o0XGH`$vhLG1hxt9?W`#,5LsCp#-i>.r$<$6pD>Lb';9Crc6tgXmKVeU2cD4Eo3R/" 11764 "2*>]b(MC;$jPfY.;h^`IWM9<Lh2TlS+f-s$o6Q<BWH`YiU.xfLq$N;$0iR/GX:U(jcW2p/W*q?-qmnUCI;jHSAiFWM.R*kU@C=GH?a9wp8f$e.-4^Qg1)Q-GL(lf(r/7GrRgwV%MS=C#" 11765 "`8ND>Qo#t'X#(v#Y9w0#1D$CIf;W'#pWUPXOuxXuU(H9M(1<q-UE31#^-V'8IRUo7Qf./L>=Ke$$'5F%)]0^#0X@U.a<r:QLtFsLcL6##lOj)#.Y5<-R&KgLwqJfLgN&;Q?gI^#DY2uL" 11766 "i@^rMl9t=cWq6##weg>$FBjVQTSDgEKnIS7EM9>ZY9w0#L;>>#Mx&4Mvt//L[MkA#W@lK.N'[0#7RL_&#w+F%HtG9M#XL`N&.,GM4Pg;-<nLENhvx>-VsM.M0rJfLH2eTM`*oJMHRC`N" 11767 "kfimM2J,W-jXS:)r0wK#@Fge$U>`w'N7G#$#fB#$E^$#:9:hk+eOe--6x)F7*E%?76%^GMHePW-Z5l'&GiF#$956:rS?dA#fiK:)Yr+`�j@'DbG&#^$PG.Ll+DNa<XCMKEV*N)LN/N" 11768 "*b=%Q6pia-Xg8I$<MR&,VdJe$<(7G;Ckl'&hF;;$<_=X(b.RS%%)###MPBuuE1V:v&cXm#(&cV]`k9OhLMbn%s$G2,B$BfD3X*sp5#l,$R#]x_X1xKX%b5U*[r5iMfUo9U`N99hG)" 11769 "tm+/Us9pG)XPu`<0s-)WTt(gCRxIg(%6sfh=ktMKn3j)<6<b5Sk_/0(^]AaN#(p/L>&VZ>1i%h1S9u5o@YaaW$e+b<TWFn/Z:Oh(Cx2$lNEoN^e)#CFY@@I;BOQ*sRwZtZxRcU7uW6CX" 11770 "ow0i(?$Q[cjOd[P4d)]>ROPOpxTO7Stwi1::iB1q)C_=dV26J;2,]7op$]uQr@_V7$q^%lQwtuHY]=DX,n3L#0PHDO4f9>dC@O>HBuKPpP*E,N+b3L#lpR/MrTEH.IAQk.a>D[.e;mc." 11771 "x]Ip.PH^'/aqUO/$1WxLoW0[iLA<QT;5HKD+@qQ'NQ(3_PLhE48R.qAPSwQ0/WK?Z,[x?-J;jQTWA0X@KJ(_Y8N-:/M74:/-ZpKrUss?d#dZq]DAbkU*JqkL+nwX@@47`5>w=4h(9.`G" 11772 "CRUxHPeR`5Mjol(dUWxZa(>STrPkrJiWx`5U7F#.g*jrohGg`cg:lSTvEY/EV_7H4Q9[Z%cnv;JQYZ5q.l7Zeas:HOIZOB?G<Nald$qs]@]L<J7bR*>gv:[7MI2k).'2($5FNP&EQ(,)" 11773 "U]W]+fh18.vsai00);D3@4ku5P?DP8aJt+;qUM]=+b'8@;mViBKx0DE[-auGl8:PJ&Dj+M6OC]O^((##]`0i)drT;-7X`=-H3[igUnPG-NZlo.#k@h#=Ork$m>a>$-?Tm$UV(?#P6YY#" 11774 "'/###xe7q.73rI3*pP/$1>s9)W,JrM7SN]'/4C#v$U`0#V.[0>xQsH$fEmPMgY2u7Kh(G%siIfLSoS+MK2eTM$=5,M8p`A.;_R%#u[K#$x4AG8.kK/HSB==-'Ie/QTtG?-.*^N-4B/ZM" 11775 "_3YlQC7(p7q)&](`6_c)$/*JL(L-^(]$wIM`dPtOdGA,U3:w2M-0<q-]L_?^)1vw'.,MRsqVr.L;aN&#/EgJ)PBc[-f>+WomX2u7lqM2iEumMTcsF?-aT=Z-97UEnXglEn1K-bnEO`gu" 11776 "Ft(c%=;Am_Qs@jLooI&NX;]0#j4#F14;gl8-GQpgwhrq8'=l_f-b49'UOqkLu7-##oDY2L(te+Mch&gLYtJ,MEtJfLh'x'M=$CS-ZZ%P]8bZ>#S?YY#%Q&q'3^Fw&?D)UDNrocM3A76/" 11777 "/oL?#h7gl85[qW/NDOk%16ij;+:1a'iNIdb-ou8.P*w,v5#EI$TWS>Pot-R*H'-SEpA:g)f+O$%%`kA#G=8RMmG1&O`>to8bC]T&$,n.LoO>29sp3dt-52U%VM#q7'DHpg+#Z9%H[K<L" 11778 "%a2E-grWVM3@2=-k22tL]4$##6We'8UJCKE[d_=%wI;'6X-GsLX4j^SgJ$##R*w,vP3wK#iiW&#*h^D&R?jp7+/u&#(AP##XU8c$fSYW-J95_-Dp[g9wcO&#M-h1OcJlc-*vpw0xUX&#" 11779 "OQFKNX@QI'IoPp7nb,QU//MQ&ZDkKP)X<WSVL(68uVl&#c'[0#(s1X&xm$Y%B7*K:eDA323j998GXbA#pwMs-jgD$9QISB-A_(aN4xoFM^@C58D0+Q+q3n0#3U1InDjF682-SjMXJK)(" 11780 "h$hxua_K]ul92%'BOU&#BRRh-slg8KDlr:%L71Ka:.A;%YULjDPmL<LYs8i#XwJOYaKPKc1h:'9Ke,g)b),78=I39B;xiY$bgGw-&.Zi9InXDuYa%G*f2Bq7mn9^#p1vv%#(Wi-;/Z5h" 11781 "o;#2:;%d	v68C5g?ntX0X)pT`;%pB3q7mgGN)3%(P8nTd5L7GeA-GL@+%J3u2:(Yf>et`e;)f#Km8&+DC$I46>#Kr]]u-[=99tts1.qb#q72g1WJO81q+eN'03'eM>&1XxY-caEnO" 11782 "j%2n8)),?ILR5^.Ibn<-X-Mq7[a82Lq:F&#ce+S9wsCK*x`569E8ew'He]h:sI[2LM$[guka3ZRd6:t%IG:;$%YiJ:Nq=?eAw;/:nnDq0(CYcMpG)qLN4$##&J<j$UpK<Q4a1]MupW^-" 11783 "sj_$%[HK%'F####QRZJ::Y3EGl4'@%FkiAOg#p[##O`gukTfBHagL<LHw%q&OV0##F=6/:chIm0@eCP8X]:kFI%hl8hgO@RcBhS-@Qb$%+m=hPDLg*%K8ln(wcf3/'DW-$.lR?n[nCH-" 11784 "eXOONTJlh:.RYF%3'p6sq:UIMA945&^HFS87@$EP2iG<-lCO$%c`uKGD3rC$x0BL8aFn--`ke%#HMP'vh1/R&O_J9'um,.<tx[@%wsJk&bUT2`0uMv7gg#qp/ij.L56'hl;.s5CUrxjO" 11785 "M7-##.l+Au'A&O:-T72L]P`&=;ctp'XScX*rU.>-XTt,%OVU4)S1+R-#dg0/Nn?Ku1^0f$B*P:Rowwm-`0PKjYDDM'3]d39VZHEl4,.j']Pk-M.h^&:0FACm$maq-&sgw0t7/6(^xtk%" 11786 "LuH88Fj-ekm>GA#_>568x6(OFRl-IZp`&b,_P'$M<Jnq79VsJW/mWS*PUiq76;]/NM_>hLbxfc$mj`,O;&%W2m`Zh:/)Uetw:aJ%]K9h:TcF]u_-Sj9,VK3M.*'&0D[Ca]J9gp8,kAW]" 11787 "%(?A%R$f<->Zts'^kn=-^@c4%-pY6qI%J%1IGxfLU9CP8cbPlXv);C=b),<2mOvP8up,UVf3839acAWAW-W?#ao/^#%KYo8fRULNd2.>%m]UK:n%r$'sw]J;5pAoO_#2mO3n,'=H5(et" 11788 "Hg*`+RLgv>=4U8guD$I%D:W>-r5V*%j*W:Kvej.Lp$<M-SGZ':+Q_k+uvOSLiEo(<aD/K<CCc`'Lx>'?;++O'>()jLR-^u68PHm8ZFWe+ej8h:9r6L*0//c&iH&R8pRbA#Kjm%upV1g:" 11789 "a_#Ur7FuA#(tRh#.Y5K+@?3<-8m0$PEn;J:rh6?I6uG<-`wMU'ircp0LaE_OtlMb&1#6T.#FDKu#1Lw%u%+GM+X'e?YLfjM[VO0MbuFp7;>Q&#WIo)0@F%q7c#4XAXN-U&VB<HFF*qL(" 11790 "$/V,;(kXZejWO`<[5?\?ewY(*9=%wDc;,u<'9t3W-(H1th3+G]ucQ]kLs7df($/*JL]@*t7Bu_G3_7mp7<iaQjO@.kLg;x3B0lqp7Hf,^Ze7-##@/c58Mo(3;knp0%)A7?-W+eI'o8)b<" 11791 "nKnw'Ho8C=Y>pqB>0ie&jhZ[?iLR@@_AvA-iQC(=ksRZRVp7`.=+NpBC%rh&3]R:8XDmE5^V8O(x<<aG/1N$#FX$0V5Y6x'aErI3I$7x%E`v<-BY,)%-?Psf*l?%C3.mM(=/M0:JxG'?" 11792 "7WhH%o'a<-80g0NBxoO(GH<dM]n.+%q@jH?f.UsJ2Ggs&4<-e47&Kl+f//9@`b+?.TeN_&B8Ss?v;^Trk;f#YvJkl&w$]>-+k?'(<S:68tq*WoDfZu';mM?8X[ma8W%*`-=;D.(nc7/;" 11793 ")g:T1=^J$&BRV(-lTmNB6xqB[@0*o.erM*<SWF]u2=st-*(6v>^](H.aREZSi,#1:[IXaZFOm<-ui#qUq2$##Ri;u75OK#(RtaW-K-F`S+cF]uN`-KMQ%rP/Xri.LRcB##=YL3BgM/3M" 11794 "D?@f&1'BW-)Ju<L25gl8uhVm1hL$##*8###'A3/LkKW+(^rWX?5W_8g)a(m&K8P>#bmmWCMkk&#TR`C,5d>g)F;t,4:@_l8G/5h4vUd%&%950:VXD'QdWoY-F$BtUwmfe$YqL'8(PWX(" 11795 "P?^@Po3$##`MSs?DWBZ/S>+4%>fX,VWv/w'KD`LP5IbH;rTV>n3cEK8U#bX]l-/V+^lj3;vlMb&[5YQ8#pekX9JP3XUC72L,,?+Ni&co7ApnO*5NK,((W-i:$,kp'UDAO(G0Sq7MVjJs" 11796 "bIu)'Z,*[>br5fX^:FPAWr-m2KgL<LUN098kTF&#lvo58=/vjDo;.;)Ka*hLR#/k=rKbxuV`>Q_nN6'8uTGT5g)uLv:873UpTLgH+#FgpH'_o1780Ph8KmxQJ8#H72L4@768@Tm&Q" 11797 "h4CB/5OvmA&,Q&QbUoi$a_%3M01H)4x7I^&KQVgtFnV+;[Pc>[m4k//,]1?#`VY[Jr*3&&slRfLiVZJ:]?=K3Sw=[$=uRB?3xk48@aeg<Z'<$#4H)6,>e0jT6'N#(q%.O=?2S]u*(m<-" 11798 "V8J'(1)G][68hW$5'q[GC&5j`TE?m'esFGNRM)j,ffZ?-qx8;->g4t*:CIP/[Qap7/9'#(1sao7w-.qNUdkJ)tCF&#B^;xGvn2r9FEPFFFcL@.iFNkTve$m%#QvQS8U@)2Z+3K:AKM5i" 11799 "sZ88+dKQ)W6>J%CL<KE>`.d*(B`-n8D9oK<Up]c$X$(,)M8Zt7/[rdkqTgl-0cuGMv'?>-XV1q['-5k'cAZ69e;D_?$ZPP&s^+7])$*$#@QYi9,5P	r+$%CE=68>K8r0=dSC%%(@p7" 11800 ".m7jilQ02'0-VWAg<a/''3u.=4L$Y)6k/K:_[3=&jvL<L0C/2'v:^;-DIBW,B4E68:kZ;%?8(Q8BH=kO65BW?xSG&#@uU,DS*,?.+(o(#1vCS8#CHF>TlGW'b)Tq7VT9q^*^$$.:&N@@" 11801 "$&)WHtPm*5_rO0&e%K&#-30j(E4#'Zb.o/(Tpm$>K'f@[PvFl,hfINTNU6u'0pao7%XUp9]5.>%h`8_=VYbxuel.NTSsJfLacFu3B'lQSu/m6-Oqem8T+oE--$0a/k]uj9EwsG>%veR*" 11802 "hv^BFpQj:K'#SJ,sB-'#](j.Lg92rTw-*n%@/;39rrJF,l#qV%OrtBeC6/,;qB3ebNW[?,Hqj2L.1NP&GjUR=1D8QaS3Up&@*9wP?+lo7b?@%'k4`p0Z$22%K3+iCZj?XJN4Nm&+YF]u" 11803 "@-W$U%VEQ/,,>>#)D<h#`)h0:<Q6909ua+&VU%n2:cG3FJ-%@Bj-DgLr`Hw&HAKjKjseK</xKT*)B,N9X3]krc12t'pgTV(Lv-tL[xg_%=M_q7a^x?7Ubd>#%8cY#YZ?=,`Wdxu/ae&#" 11804 "w6)R89tI#6@s'(6Bf7a&?S=^ZI_kS&ai`&=tE72L_D,;^R)7[$s<Eh#c&)q.MXI%#v9ROa5FZO%sF7q7Nwb&#ptUJ:aqJe$Sl68%.D###EC><?-aF&#RNQv>o8lKN%5/$(vdfq7+ebA#" 11805 "u1p]ovUKW&Y%q]'>$1@-[xfn$7ZTp7mM,G,Ko7a&Gu%G[RMxJs[0MM%wci.LFDK)(<c`Q8N)jEIF*+?P2a8g%)$q]o2aH8C&<SibC/q,(e:v;-b#6[$NtDZ84Je2KNvB#$P5?tQ3nt(0" 11806 "d=j.LQf./Ll33+(;q3L-w=8dX$#WF&uIJ@-bfI>%:_i2B5CsR8&9Z&#=mPEnm0f`<&c)QL5uJ#%u%lJj+D-r;BoFDoS97h5g)E#o:&S4weDF,9^Hoe`h*L+_a*NrLW-1pG_&2UdB8" 11807 "6e%B/:=>)N4xeW.*wft-;$'58-ESqr<b?UI(_%@[P46>#U`'6AQ]m&6/`Z>#S?YY#Vc;r7U2&326d=w&H####?TZ`*4?&.MK?LP8Vxg>$[QXc%QJv92.(Db*B)gb*BM9dM*hJMAo*c&#" 11808 "b0v=Pjer]$gG&JXDf->'StvU7505l9$AFvgYRI^&<^b68?j#q9QX4SM'RO#&sL1IM.rJfLUAj221]d##DW=m83u5;'bYx,*Sl0hL(W;;$doB&O/TQ:(Z^xBdLjL<Lni;''X.`$#8+1GD" 11809 ":k$YUWsbn8ogh6rxZ2Z9]%nd+>V#*8U_72Lh+2Q8Cj0i:6hp&$C/:p(HK>T8Y[gHQ4`4)'$Ab(Nof%V'8hL&#<NEdtg(n'=S1A(Q1/I&4([%dM`,Iu'1:_hL>SfD07&6D<fp8dHM7/g+" 11810 "tlPN9J*rKaPct&?'uBCem^jn%9_K)<,C5K3s=5g&GmJb*[SYq7K;TRLGCsM-$$;S%:Y@r7AK0pprpL<Lrh,q7e/%KWK:50I^+m'vi`3?%Zp+<-d+$L-Sv:@.o19n$s0&39;kn;S%BSq*" 11811 "$3WoJSCLweV[aZ'MQIjO<7;X-X;&+dMLvu#^UsGEC9WEc[X(wI7#2.(F0jV*eZf<-Qv3J-c+J5AlrB#$p(H68LvEA'q3n0#m,[`*8Ft)FcYgEud]CWfm68,(aLA$@EFTgLXoBq/UPlp7" 11812 ":d[/;r_ix=:TF`S5H-b<LI&HY(K=h#)]Lk$K14lVfm:x$H<3^Ql<M`$OhapBnkup'D#L$Pb_`N*g]2e;X/Dtg,bsj&K#2[-:iYr'_wgH)NUIR8a1n#S?Yej'h8^58UbZd+^FKD*T@;6A" 11813 "7aQC[K8d-(v6GI$x:T<&'Gp5Uf>@M.*J:;$-rv29'M]8qMv-tLp,'886iaC=Hb*YJoKJ,(j%K=H`K.v9HggqBIiZu'QvBT.#=)0ukruV&.)3=(^1`o*Pj4<-<aN((^7('#Z0wK#5GX@7" 11814 "u][`*S^43933A4rl][`*O4CgLEl]v$1Q3AeF37dbXk,.)vj#x'd`;qgbQR%FW,2(?LO=s%Sc68%NP'##Aotl8x=BE#j1UD([3$M(]UI2LX3RpKN@;/#f'f/&_mt&F)XdF<9t4)Qa.*kT" 11815 "LwQ'(TTB9.xH'>#MJ+gLq9-##@HuZPN0]u:h7.T..G:;$/Usj(T7`Q8tT72LnYl<-qx8;-HV7Q-&Xdx%1a,hC=0u+HlsV>nuIQL-5<N?)NBS)QN*_I,?&)2'IM%L3I)X((e/dl2&8'<M" 11816 ":^#M*Q+[T.Xri.LYS3v%fF`68h;b-X[/En'CR.q7E)p'/kle2HM,u;^%OKC-N+Ll%F9CF<Nf'^#t2L,;27W:0O@6##U6W7:$rJfLWHj$#)woqBefIZ.PK<b*t7ed;p*_m;4ExK#h@&]>" 11817 "_>@kXQtMacfD.m-VAb8;IReM3$wf0''hra*so568'Ip&vRs849'MRYSp%:t:h5qSgwpEr$B>Q,;s(C#$)`svQuF$##-D,##,g68@2[T;.XSdN9Qe)rpt._K-#5wF)sP'##p#C0c%-Gb%" 11818 "hd+<-j'Ai*x&&HMkT]C'OSl##5RG[JXaHN;d'uA#x._U;.`PU@(Z3dt4r152@:v,'R.Sj'w#0<-;kPI)FfJ&#AYJ&#//)>-k=m=*XnK$>=)72L]0I%>.G690a:$##<,);?;72#?x9+d;" 11819 "^V'9;jY@;)br#q^YQpx:X#Te$Z^'=-=bGhLf:D6&bNwZ9-ZD#n^9HhLMr5G;']d&6'wYmTFmL<LD)F^%[tC'8;+9E#C$g%#5Y>q9wI>P(9mI[>kC-ekLC/R&CH+s'B;K-M6$EB%is00:" 11820 "+A4[7xks.LrNk0&E)wILYF@2L'0Nb$+pv<(2.768/FrY&h$^3i&@+G%JT'<-,v`3;_)I9M^AE]CN?Cl2AZg+%4iTpT3<n-&%H%b<FDj2M<hH=&Eh<2Len$b*aTX=-8QxN)k11IM1c^j%" 11821 "9s<L<NFSo)B?+<-(GxsF,^-Eh@$4dXhN$+#rxK8'je'D7k`e;)2pYwPA'_p9&@^18ml1^[@g4t*[JOa*[=Qp7(qJ_oOL^('7fB&Hq-:sf,sNj8xq^>$U4O]GKx'm9)b@p7YsvK3w^YR-" 11822 "CdQ*:Ir<($u&)#(&?L9Rg3H)4fiEp^iI9O8KnTj,]H?D*r7'M;PwZ9K0E^k&-cpI;.p/6_vwoFMV<->#%Xi.LxVnrU(4&8/P+:hLSKj$#U%]49t'I:rgMi'FL@a:0Y-uA[39',(vbma*" 11823 "hU%<-SRF`Tt:542R_VV$p@[p8DV[A,?1839FWdF<TddF<9Ah-6&9tWoDlh]&1SpGMq>Ti1O*H&#(AL8[_P%.M>v^-))qOT*F5Cq0`Ye%+$B6i:7@0IX<N+T+0MlMBPQ*Vj>SsD<U4JHY" 11824 "8kD2)2fU/M#$e.)T4,_=8hLim[&);?UkK'-x?'(:siIfL<$pFM`i<?%W(mGDHM%>iWP,##P`%/L<eXi:@Z9C.7o=@(pXdAO/NLQ8lPl+HPOQa8wD8=^GlPa8TKI1CjhsCTSLJM'/Wl>-" 11825 "S(qw%sf/@%#B6;/U7K]uZbi^Oc^2n<bhPmUkMw>%t<)'mEVE''n`WnJra$^TKvX5B>;_aSEK',(hwa0:i4G?.Bci.(X[?b*($,=-n<.Q%`(X=?+@Am*Js0&=3bh8K]mL<LoNs'6,'85`" 11826 "0?t/'_U59@]ddF<#LdF<eWdF<OuN/45rY<-L@&#+fm>69=Lb,OcZV/);TTm8VI;?%OtJ<(b4mq7M6:u?KRdF<gR@2L=FNU-<b[(9c/ML3m;Z[$oF3g)GAWqpARc=<ROu7cL5l;-[A]%/" 11827 "+fsd;l#SafT/f*W]0=O'$(Tb<[)*@e775R-:Yob%g*>l*:xP?Yb.5)%w_I?7uk5JC+FS(m#i'k.'a0i)9<7b'fs'59hq$*5Uhv##pi^8+hIEBF`nvo`;'l0.^S1<-wUK2/Coh58KKhLj" 11828 "M=SO*rfO`+qC`W-On.=AJ56>>i2@2LH6A:&5q`?9I3@@'04&p2/LVa*T-4<-i3;M9UvZd+N7>b*eIwg:CC)c<>nO&#<IGe;__.thjZl<%w(Wk2xmp4Q@I#I9,DF]u7-P=.-_:YJ]aS@V" 11829 "?6*C()dOp7:WL,b&3Rg/.cmM9&r^>$(>.Z-I&J(Q0Hd5Q%7Co-b`-c<N(6r@ip+AurK<m86QIth*#v;-OBqi+L7wDE-Ir8K['m+DDSLwK&/.?-V%U_%3:qKNu$_b*B-kp7NaD'QdWQPK" 11830 "Yq[@>P)hI;*_F]u`Rb[.j8_Q/<&>uu+VsH$sM9TA%?)(vmJ80),P7E>)tjD%2L=-t#fK[%`v=Q8<FfNkgg^oIbah*#8/Qt$F&:K*-(N/'+1vMB,u()-a.VUU*#[e%gAAO(S>WlA2);Sa" 11831 ">gXm8YB`1d@K#n]76-a$U,mF<fX]idqd)<3,]J7JmW4`6]uks=4-72L(jEk+:bJ0M^q-8Dm_Z?0olP1C9Sa&H[d&c$ooQUj]Exd*3ZM@-WGW2%s',B-_M%>%Ul:#/'xoFM9QX-$.QN'>" 11832 "[%$Z$uF6pA6Ki2O5:8w*vP1<-1`[G,)-m#>0`P&#eb#.3i)rtB61(o'$?X3B</R90;eZ]%Ncq;-Tl]#F>2Qft^ae_5tKL9MUe9b*sLEQ95C&`=G?@Mj=wh*'3E>=-<)Gt*Iw)'QG:`@I" 11833 "wOf7&]1i'S01B+Ev/Nac#9S;=;YQpg_6U`*kVY39xK,[/6Aj7:'1Bm-_1EYfa1+o&o4hp7KN_Q(OlIo@S%;jVdn0'1<Vc52=u`3^o-n1'g4v58Hj&6_t7$##?M)c<$bgQ_'SY((-xkA#" 11834 "Y(,p'H9rIVY-b,'%bCPF7.J<Up^,(dU1VY*5#WkTU>h19w,WQhLI)3S#f$2(eb,jr*b;3Vw]*7NH%$c4Vs,eD9>XW8?N]o+(*pgC%/72LV-u<Hp,3@e^9UB1J+ak9-TN/mhKPg+AJYd$" 11835 "MlvAF_jCK*.O-^(63adMT->W%iewS8W6m2rtCpo'RS1R84=@paTKt)>=%&1[)*vp'u+x,VrwN;&]kuO9JDbg=pO$J*.jVe;u'm0dr9l,<*wMK*Oe=g8lV_KEBFkO'oU]^=[-792#ok,)" 11836 "i]lR8qQ2oA8wcRCZ^7w/Njh;?.stX?Q1>S1q4Bn$)K1<-rGdO'$Wr.Lc.CG)$/*JL4tNR/,SVO3,aUw'DJN:)Ss;wGn9A32ijw%FL+Z0Fn.U9;reSq)bmI32U==5ALuG&#Vf1398/pVo" 11837 "1*c-(aY168o<`JsSbk-,1N;$>0:OUas(3:8Z972LSfF8eb=c-;>SPw7.6hn3m`9^Xkn(r.qS[0;T%&Qc=+STRxX'q1BNk3&*eu2;&8q$&x>Q#Q7^Tf+6<(d%ZVmj2bDi%.3L2n+4W'$P" 11838 "iDDG)g,r%+?,$@?uou5tSe2aN_AQU*<h`e-GI7)?OK2A.d7_c)?wQ5AS@DL3r#7fSkgl6-++D:'A,uq7SvlB$pcpH'q3n0#_%dY#xCpr-l<F0NR@-##FEV6NTF6##$l84N1w?AO>'IAO" 11839 "URQ##V^Fv-XFbGM7Fl(N<3DhLGF%q.1rC$#:T__&Pi68%0xi_&[qFJ(77j_&JWoF.V735&T,[R*:xFR*K5>>#`bW-?4Ne_&6Ne_&6Ne_&n`kr-#GJcM6X;uM6X;uM(.a..^2TkL%oR(#" 11840 ";u.T%fAr%4tJ8&><1=GHZ_+m9/#H1F^R#SC#*N=BA9(D?v[UiFY>>^8p,KKF.W]L29uLkLlu/+4T<XoIB&hx=T1PcDaB&;HH+-AFr?(m9HZV)FKS8JCw;SD=6[^/DZUL`EUDf]GGlG&>" 11841 "w$)F./^n3+rlo+DB;5sIYGNk+i1t-69Jg--0pao7Sm#K)pdHW&;LuDNH@H>#/X-TI(;P>#,Gc>#0Su>#4`1?#8lC?#<xU?#@.i?#D:%@#HF7@#LRI@#P_[@#Tkn@#Xw*A#]-=A#a9OA#" 11842 "d<F&#*;G##.GY##2Sl##6`($#:l:$#>xL$#B.`$#F:r$#JF.%#NR@%#R_R%#Vke%#Zww%#_-4^Rh%Sflr-k'MS.o?.5/sWel/wpEM0%3'/1)K^f1-d>G21&v(35>V`39V7A4=onx4" 11843 "A1OY5EI0;6Ibgr6M$HS7Q<)58C5w,;WoA*#[%T*#`1g*#d=#+#hI5+#lUG+#pbY+#tnl+#x$),#&1;,#*=M,#.I`,#2Ur,#6b.-#;w[H#iQtA#m^0B#qjBB#uvTB##-hB#'9$C#+E6C#" 11844 "/QHC#3^ZC#7jmC#;v)D#?,<D#C8ND#GDaD#KPsD#O]/E#g1A5#KA*1#gC17#MGd;#8(02#L-d3#rWM4#Hga1#,<w0#T.j<#O#'2#CYN1#qa^:#_4m3#o@/=#eG8=#t8J5#`+78#4uI-#" 11845 "m3B2#SB[8#Q0@8#i[*9#iOn8#1Nm;#^sN9#qh<9#:=x-#P;K2#$%X9#bC+.#Rg;<#mN=.#MTF.#RZO.#2?)4#Y#(/#[)1/#b;L/#dAU/#0Sv;#lY$0#n`-0#sf60#(F24#wrH0#%/e0#" 11846 "TmD<#%JSMFove:CTBEXI:<eh2g)B,3h2^G3i;#d3jD>)4kMYD4lVu`4m`:&5niUA5@(A5BA1]PBB:xlBCC=2CDLXMCEUtiCf&0g2'tN?PGT4CPGT4CPGT4CPGT4CPGT4CPGT4CPGT4CP" 11847 "GT4CPGT4CPGT4CPGT4CPGT4CPGT4CP-qekC`.9kEg^+F$kwViFJTB&5KTB&5KTB&5KTB&5KTB&5KTB&5KTB&5KTB&5KTB&5KTB&5KTB&5KTB&5KTB&5KTB&5KTB&5o,^<-28ZI'O?;xp" 11848 "O?;xpO?;xpO?;xpO?;xpO?;xpO?;xpO?;xpO?;xpO?;xpO?;xpO?;xpO?;xpO?;xp;7q-#lLYI:xvD=#";
11851 #define NK_CURSOR_DATA_W 90 11852 #define NK_CURSOR_DATA_H 27 11853 NK_GLOBAL const char nk_custom_cursor_data[NK_CURSOR_DATA_W * NK_CURSOR_DATA_H + 1] =
11855 "..- -XXXXXXX- X - X -XXXXXXX - XXXXXXX" 11856 "..- -X.....X- X.X - X.X -X.....X - X.....X" 11857 "--- -XXX.XXX- X...X - X...X -X....X - X....X" 11858 "X - X.X - X.....X - X.....X -X...X - X...X" 11859 "XX - X.X -X.......X- X.......X -X..X.X - X.X..X" 11860 "X.X - X.X -XXXX.XXXX- XXXX.XXXX -X.X X.X - X.X X.X" 11861 "X..X - X.X - X.X - X.X -XX X.X - X.X XX" 11862 "X...X - X.X - X.X - XX X.X XX - X.X - X.X " 11863 "X....X - X.X - X.X - X.X X.X X.X - X.X - X.X " 11864 "X.....X - X.X - X.X - X..X X.X X..X - X.X - X.X " 11865 "X......X - X.X - X.X - X...XXXXXX.XXXXXX...X - X.X XX-XX X.X " 11866 "X.......X - X.X - X.X -X.....................X- X.X X.X-X.X X.X " 11867 "X........X - X.X - X.X - X...XXXXXX.XXXXXX...X - X.X..X-X..X.X " 11868 "X.........X -XXX.XXX- X.X - X..X X.X X..X - X...X-X...X " 11869 "X..........X-X.....X- X.X - X.X X.X X.X - X....X-X....X " 11870 "X......XXXXX-XXXXXXX- X.X - XX X.X XX - X.....X-X.....X " 11871 "X...X..X --------- X.X - X.X - XXXXXXX-XXXXXXX " 11872 "X..X X..X - -XXXX.XXXX- XXXX.XXXX ------------------------------------" 11873 "X.X X..X - -X.......X- X.......X - XX XX - " 11874 "XX X..X - - X.....X - X.....X - X.X X.X - " 11875 " X..X - X...X - X...X - X..X X..X - " 11876 " XX - X.X - X.X - X...XXXXXXXXXXXXX...X - " 11877 "------------ - X - X -X.....................X- " 11878 " ----------------------------------- X...XXXXXXXXXXXXX...X - " 11885 #pragma clang diagnostic pop 11886 #elif defined(__GNUC__) || defined(__GNUG__) 11887 #pragma GCC diagnostic pop 11891 nk_decompress_length(
unsigned char *
input)
11903 nk__match(
unsigned char *
data,
unsigned int length)
11906 NK_ASSERT (nk__dout +
length <= nk__barrier);
11907 if (nk__dout +
length > nk__barrier) { nk__dout +=
length;
return; }
11908 if (
data < nk__barrier4) { nk__dout = nk__barrier+1;
return; }
11913 nk__lit(
unsigned char *
data,
unsigned int length)
11915 NK_ASSERT (nk__dout +
length <= nk__barrier);
11916 if (nk__dout +
length > nk__barrier) { nk__dout +=
length;
return; }
11917 if (
data < nk__barrier2) { nk__dout = nk__barrier+1;
return; }
11922 #define nk__in2(x) ((i[x] << 8) + i[(x)+1]) 11923 #define nk__in3(x) ((i[x] << 16) + nk__in2((x)+1)) 11924 #define nk__in4(x) ((i[x] << 24) + nk__in3((x)+1)) 11927 nk_decompress_token(
unsigned char *i)
11930 if (*i >= 0x80) nk__match(nk__dout-i[1]-1, (
unsigned int)i[0] - 0x80 + 1), i += 2;
11931 else if (*i >= 0x40) nk__match(nk__dout-(nk__in2(0) - 0x4000 + 1), (
unsigned int)i[2]+1), i += 3;
11932 else nk__lit(i+1, (
unsigned int)i[0] - 0x20 + 1), i += 1 + (i[0] - 0x20 + 1);
11934 if (*i >= 0x18) nk__match(nk__dout-(
unsigned int)(nk__in3(0) - 0x180000 + 1), (
unsigned int)i[3]+1), i += 4;
11935 else if (*i >= 0x10) nk__match(nk__dout-(
unsigned int)(nk__in3(0) - 0x100000 + 1), (
unsigned int)nk__in2(3)+1), i += 5;
11936 else if (*i >= 0x08) nk__lit(i+2, (
unsigned int)nk__in2(0) - 0x0800 + 1), i += 2 + (nk__in2(0) - 0x0800 + 1);
11937 else if (*i == 0x07) nk__lit(i+3, (
unsigned int)nk__in2(1) + 1), i += 3 + (nk__in2(1) + 1);
11938 else if (*i == 0x06) nk__match(nk__dout-(
unsigned int)(nk__in3(1)+1), i[4]+1u), i += 5;
11939 else if (*i == 0x04) nk__match(nk__dout-(
unsigned int)(nk__in3(1)+1), (
unsigned int)nk__in2(4)+1u), i += 6;
11945 nk_adler32(
unsigned int adler32,
unsigned char *
buffer,
unsigned int buflen)
11947 const unsigned long ADLER_MOD = 65521;
11949 unsigned long blocklen, i;
11951 blocklen = buflen % 5552;
11953 for (i=0; i + 7 < blocklen; i += 8) {
11954 s1 +=
buffer[0]; s2 += s1;
11955 s1 +=
buffer[1]; s2 += s1;
11956 s1 +=
buffer[2]; s2 += s1;
11957 s1 +=
buffer[3]; s2 += s1;
11958 s1 +=
buffer[4]; s2 += s1;
11959 s1 +=
buffer[5]; s2 += s1;
11960 s1 +=
buffer[6]; s2 += s1;
11961 s1 +=
buffer[7]; s2 += s1;
11964 for (; i < blocklen; ++i) {
11965 s1 += *
buffer++; s2 += s1;
11968 s1 %= ADLER_MOD; s2 %= ADLER_MOD;
11969 buflen -= (
unsigned int)blocklen;
11972 return (
unsigned int)(s2 << 16) + (
unsigned int)s1;
11976 nk_decompress(
unsigned char *
output,
unsigned char *i,
unsigned int length)
11979 if (nk__in4(0) != 0x57bC0000)
return 0;
11980 if (nk__in4(4) != 0)
return 0;
11981 olen = nk_decompress_length(i);
11983 nk__barrier3 = i+
length;
11984 nk__barrier =
output + olen;
11990 unsigned char *old_i = i;
11991 i = nk_decompress_token(i);
11993 if (*i == 0x05 && i[1] == 0xfa) {
11994 NK_ASSERT(nk__dout ==
output + olen);
11995 if (nk__dout !=
output + olen)
return 0;
11996 if (nk_adler32(1,
output, olen) != (
unsigned int) nk__in4(2))
12004 NK_ASSERT(nk__dout <=
output + olen);
12005 if (nk__dout >
output + olen)
12011 nk_decode_85_byte(
char c)
12012 {
return (
unsigned int)((
c >=
'\\') ?
c-36 :
c-35); }
12015 nk_decode_85(
unsigned char*
dst,
const unsigned char*
src)
12020 nk_decode_85_byte((
char)
src[0]) +
12021 85 * (nk_decode_85_byte((
char)
src[1]) +
12022 85 * (nk_decode_85_byte((
char)
src[2]) +
12023 85 * (nk_decode_85_byte((
char)
src[3]) +
12024 85 * nk_decode_85_byte((
char)
src[4]))));
12027 dst[0] = (
unsigned char)((tmp >> 0) & 0xFF);
12028 dst[1] = (
unsigned char)((tmp >> 8) & 0xFF);
12029 dst[2] = (
unsigned char)((tmp >> 16) & 0xFF);
12030 dst[3] = (
unsigned char)((tmp >> 24) & 0xFF);
12042 NK_API struct nk_font_config
12043 nk_font_config(float pixel_height)
12045 struct nk_font_config cfg;
12049 cfg.ttf_data_owned_by_atlas = 0;
12050 cfg.size = pixel_height;
12051 cfg.oversample_h = 3;
12052 cfg.oversample_v = 1;
12053 cfg.pixel_snap = 0;
12054 cfg.coord_type = NK_COORD_UV;
12056 cfg.range = nk_font_default_glyph_ranges();
12057 cfg.merge_mode = 0;
12058 cfg.fallback_glyph =
'?';
12063 #ifdef NK_INCLUDE_DEFAULT_ALLOCATOR 12065 nk_font_atlas_init_default(
struct nk_font_atlas *
atlas)
12068 if (!
atlas)
return;
12070 atlas->temporary.userdata.ptr = 0;
12071 atlas->temporary.alloc = nk_malloc;
12072 atlas->temporary.free = nk_mfree;
12073 atlas->permanent.userdata.ptr = 0;
12074 atlas->permanent.alloc = nk_malloc;
12075 atlas->permanent.free = nk_mfree;
12084 if (!
atlas || !alloc)
return;
12086 atlas->permanent = *alloc;
12087 atlas->temporary = *alloc;
12091 nk_font_atlas_init_custom(
struct nk_font_atlas *
atlas,
12095 NK_ASSERT(permanent);
12096 NK_ASSERT(temporary);
12097 if (!
atlas || !permanent || !temporary)
return;
12099 atlas->permanent = *permanent;
12100 atlas->temporary = *temporary;
12104 nk_font_atlas_begin(
struct nk_font_atlas *
atlas)
12107 NK_ASSERT(
atlas->temporary.alloc &&
atlas->temporary.free);
12108 NK_ASSERT(
atlas->permanent.alloc &&
atlas->permanent.free);
12110 !
atlas->temporary.alloc || !
atlas->temporary.free)
return;
12111 if (
atlas->glyphs) {
12115 if (
atlas->pixel) {
12122 nk_font_atlas_add(
struct nk_font_atlas *
atlas,
const struct nk_font_config *
config)
12124 struct nk_font *
font = 0;
12125 struct nk_font_config *cfg;
12128 NK_ASSERT(
atlas->permanent.alloc);
12129 NK_ASSERT(
atlas->permanent.free);
12130 NK_ASSERT(
atlas->temporary.alloc);
12131 NK_ASSERT(
atlas->temporary.free);
12134 NK_ASSERT(
config->ttf_blob);
12135 NK_ASSERT(
config->ttf_size);
12136 NK_ASSERT(
config->size > 0.0f);
12139 !
atlas->permanent.alloc || !
atlas->permanent.free ||
12140 !
atlas->temporary.alloc || !
atlas->temporary.free)
12144 cfg = (
struct nk_font_config*)
12145 atlas->permanent.alloc(
atlas->permanent.userdata,0,
sizeof(
struct nk_font_config));
12147 if (!
atlas->config) {
12148 atlas->config = cfg;
12151 cfg->next =
atlas->config;
12152 atlas->config = cfg;
12156 if (!
config->merge_mode) {
12157 font = (
struct nk_font*)
12158 atlas->permanent.alloc(
atlas->permanent.userdata,0,
sizeof(
struct nk_font));
12160 if (!
font)
return 0;
12161 font->config = cfg;
12163 NK_ASSERT(
atlas->font_num);
12165 font->config = cfg;
12169 if (!
config->merge_mode) {
12170 if (!
atlas->fonts) {
12177 cfg->font = &
font->info;
12181 if (!
config->ttf_data_owned_by_atlas) {
12182 cfg->ttf_blob =
atlas->permanent.alloc(
atlas->permanent.userdata,0, cfg->ttf_size);
12183 NK_ASSERT(cfg->ttf_blob);
12184 if (!cfg->ttf_blob) {
12188 NK_MEMCPY(cfg->ttf_blob,
config->ttf_blob, cfg->ttf_size);
12189 cfg->ttf_data_owned_by_atlas = 1;
12196 nk_font_atlas_add_from_memory(
struct nk_font_atlas *
atlas,
void *memory,
12199 struct nk_font_config cfg;
12204 NK_ASSERT(
atlas->temporary.alloc);
12205 NK_ASSERT(
atlas->temporary.free);
12206 NK_ASSERT(
atlas->permanent.alloc);
12207 NK_ASSERT(
atlas->permanent.free);
12209 !
atlas->permanent.alloc || !
atlas->permanent.free)
12213 cfg.ttf_blob = memory;
12214 cfg.ttf_size =
size;
12216 cfg.ttf_data_owned_by_atlas = 0;
12217 return nk_font_atlas_add(
atlas, &cfg);
12220 #ifdef NK_INCLUDE_STANDARD_IO 12222 nk_font_atlas_add_from_file(
struct nk_font_atlas *
atlas,
const char *file_path,
12227 struct nk_font_config cfg;
12230 NK_ASSERT(
atlas->temporary.alloc);
12231 NK_ASSERT(
atlas->temporary.free);
12232 NK_ASSERT(
atlas->permanent.alloc);
12233 NK_ASSERT(
atlas->permanent.free);
12235 if (!
atlas || !file_path)
return 0;
12236 memory = nk_file_load(file_path, &
size, &
atlas->permanent);
12237 if (!memory)
return 0;
12240 cfg.ttf_blob = memory;
12241 cfg.ttf_size =
size;
12243 cfg.ttf_data_owned_by_atlas = 1;
12244 return nk_font_atlas_add(
atlas, &cfg);
12249 nk_font_atlas_add_compressed(
struct nk_font_atlas *
atlas,
12250 void *compressed_data,
nk_size compressed_size,
float height,
12251 const struct nk_font_config *
config)
12253 unsigned int decompressed_size;
12254 void *decompressed_data;
12255 struct nk_font_config cfg;
12258 NK_ASSERT(
atlas->temporary.alloc);
12259 NK_ASSERT(
atlas->temporary.free);
12260 NK_ASSERT(
atlas->permanent.alloc);
12261 NK_ASSERT(
atlas->permanent.free);
12263 NK_ASSERT(compressed_data);
12264 NK_ASSERT(compressed_size);
12265 if (!
atlas || !compressed_data || !
atlas->temporary.alloc || !
atlas->temporary.free ||
12266 !
atlas->permanent.alloc || !
atlas->permanent.free)
12269 decompressed_size = nk_decompress_length((
unsigned char*)compressed_data);
12270 decompressed_data =
atlas->permanent.alloc(
atlas->permanent.userdata,0,decompressed_size);
12271 NK_ASSERT(decompressed_data);
12272 if (!decompressed_data)
return 0;
12273 nk_decompress((
unsigned char*)decompressed_data, (
unsigned char*)compressed_data,
12274 (
unsigned int)compressed_size);
12277 cfg.ttf_blob = decompressed_data;
12278 cfg.ttf_size = decompressed_size;
12280 cfg.ttf_data_owned_by_atlas = 1;
12281 return nk_font_atlas_add(
atlas, &cfg);
12285 nk_font_atlas_add_compressed_base85(
struct nk_font_atlas *
atlas,
12286 const char *data_base85,
float height,
const struct nk_font_config *
config)
12288 int compressed_size;
12289 void *compressed_data;
12290 struct nk_font *
font;
12293 NK_ASSERT(
atlas->temporary.alloc);
12294 NK_ASSERT(
atlas->temporary.free);
12295 NK_ASSERT(
atlas->permanent.alloc);
12296 NK_ASSERT(
atlas->permanent.free);
12298 NK_ASSERT(data_base85);
12299 if (!
atlas || !data_base85 || !
atlas->temporary.alloc || !
atlas->temporary.free ||
12300 !
atlas->permanent.alloc || !
atlas->permanent.free)
12303 compressed_size = (((int)
nk_strlen(data_base85) + 4) / 5) * 4;
12304 compressed_data =
atlas->temporary.alloc(
atlas->temporary.userdata,0, (
nk_size)compressed_size);
12305 NK_ASSERT(compressed_data);
12306 if (!compressed_data)
return 0;
12307 nk_decode_85((
unsigned char*)compressed_data, (
const unsigned char*)data_base85);
12308 font = nk_font_atlas_add_compressed(
atlas, compressed_data,
12310 atlas->temporary.free(
atlas->temporary.userdata, compressed_data);
12314 #ifdef NK_INCLUDE_DEFAULT_FONT 12316 nk_font_atlas_add_default(
struct nk_font_atlas *
atlas,
12317 float pixel_height,
const struct nk_font_config *
config)
12320 NK_ASSERT(
atlas->temporary.alloc);
12321 NK_ASSERT(
atlas->temporary.free);
12322 NK_ASSERT(
atlas->permanent.alloc);
12323 NK_ASSERT(
atlas->permanent.free);
12324 return nk_font_atlas_add_compressed_base85(
atlas,
12325 nk_proggy_clean_ttf_compressed_data_base85, pixel_height,
config);
12331 enum nk_font_atlas_format fmt)
12336 struct nk_font *font_iter;
12337 struct nk_font_baker *baker;
12340 NK_ASSERT(
atlas->temporary.alloc);
12341 NK_ASSERT(
atlas->temporary.free);
12342 NK_ASSERT(
atlas->permanent.alloc);
12343 NK_ASSERT(
atlas->permanent.free);
12348 !
atlas->temporary.alloc || !
atlas->temporary.free ||
12349 !
atlas->permanent.alloc || !
atlas->permanent.free)
12352 #ifdef NK_INCLUDE_DEFAULT_FONT 12354 if (!
atlas->font_num)
12355 atlas->default_font = nk_font_atlas_add_default(
atlas, 13.0
f, 0);
12357 NK_ASSERT(
atlas->font_num);
12358 if (!
atlas->font_num)
return 0;
12361 nk_font_baker_memory(&tmp_size, &
atlas->glyph_count,
atlas->config,
atlas->font_num);
12362 tmp =
atlas->temporary.alloc(
atlas->temporary.userdata,0, tmp_size);
12364 if (!tmp)
goto failed;
12367 baker = nk_font_baker(tmp,
atlas->glyph_count,
atlas->font_num, &
atlas->temporary);
12368 atlas->glyphs = (
struct nk_font_glyph*)
atlas->permanent.alloc(
12369 atlas->permanent.userdata,0,
sizeof(
struct nk_font_glyph)*(
nk_size)
atlas->glyph_count);
12370 NK_ASSERT(
atlas->glyphs);
12371 if (!
atlas->glyphs)
12375 atlas->custom.w = (NK_CURSOR_DATA_W*2)+1;
12376 atlas->custom.h = NK_CURSOR_DATA_H + 1;
12382 atlas->pixel =
atlas->temporary.alloc(
atlas->temporary.userdata,0, img_size);
12383 NK_ASSERT(
atlas->pixel);
12391 nk_custom_cursor_data, NK_CURSOR_DATA_W, NK_CURSOR_DATA_H,
'.',
'X');
12393 if (fmt == NK_FONT_ATLAS_RGBA32) {
12395 void *img_rgba =
atlas->temporary.alloc(
atlas->temporary.userdata,0,
12397 NK_ASSERT(img_rgba);
12398 if (!img_rgba)
goto failed;
12401 atlas->pixel = img_rgba;
12407 for (font_iter =
atlas->fonts; font_iter; font_iter = font_iter->next) {
12408 struct nk_font *
font = font_iter;
12409 struct nk_font_config *
config =
font->config;
12417 {{ 0, 3}, {12,19}, { 0, 0}},
12418 {{13, 0}, { 7,16}, { 4, 8}},
12419 {{31, 0}, {23,23}, {11,11}},
12420 {{21, 0}, { 9, 23}, { 5,11}},
12421 {{55,18}, {23, 9}, {11, 5}},
12422 {{73, 0}, {17,17}, { 9, 9}},
12423 {{55, 0}, {17,17}, { 9, 9}}
12427 cursor->
img.
w = (
unsigned short)*
width;
12429 cursor->
img.
region[0] = (
unsigned short)(
atlas->custom.x + nk_cursor_data[i][0].x);
12430 cursor->
img.
region[1] = (
unsigned short)(
atlas->custom.y + nk_cursor_data[i][0].y);
12431 cursor->
img.
region[2] = (
unsigned short)nk_cursor_data[i][1].
x;
12432 cursor->
img.
region[3] = (
unsigned short)nk_cursor_data[i][1].
y;
12433 cursor->size = nk_cursor_data[i][1];
12434 cursor->
offset = nk_cursor_data[i][2];
12437 atlas->temporary.free(
atlas->temporary.userdata, tmp);
12438 return atlas->pixel;
12442 if (tmp)
atlas->temporary.free(
atlas->temporary.userdata, tmp);
12443 if (
atlas->glyphs) {
12447 if (
atlas->pixel) {
12459 struct nk_font *font_iter;
12468 null->uv.x = (
atlas->custom.x + 0.5f)/(
float)
atlas->tex_width;
12469 null->uv.y = (
atlas->custom.y + 0.5f)/(
float)
atlas->tex_height;
12471 for (font_iter =
atlas->fonts; font_iter; font_iter = font_iter->next) {
12472 font_iter->texture =
texture;
12473 #ifdef NK_INCLUDE_VERTEX_BUFFER_OUTPUT 12474 font_iter->handle.texture =
texture;
12482 atlas->tex_width = 0;
12483 atlas->tex_height = 0;
12484 atlas->custom.x = 0;
12485 atlas->custom.y = 0;
12486 atlas->custom.w = 0;
12487 atlas->custom.h = 0;
12491 nk_font_atlas_cleanup(
struct nk_font_atlas *
atlas)
12494 NK_ASSERT(
atlas->temporary.alloc);
12495 NK_ASSERT(
atlas->temporary.free);
12496 NK_ASSERT(
atlas->permanent.alloc);
12497 NK_ASSERT(
atlas->permanent.free);
12499 if (!
atlas || !
atlas->permanent.alloc || !
atlas->permanent.free)
return;
12500 if (
atlas->config) {
12501 struct nk_font_config *iter, *
next;
12502 for (iter =
atlas->config; iter; iter =
next) {
12504 atlas->permanent.free(
atlas->permanent.userdata, iter->ttf_blob);
12505 atlas->permanent.free(
atlas->permanent.userdata, iter);
12512 nk_font_atlas_clear(
struct nk_font_atlas *
atlas)
12515 NK_ASSERT(
atlas->temporary.alloc);
12516 NK_ASSERT(
atlas->temporary.free);
12517 NK_ASSERT(
atlas->permanent.alloc);
12518 NK_ASSERT(
atlas->permanent.free);
12519 if (!
atlas || !
atlas->permanent.alloc || !
atlas->permanent.free)
return;
12521 nk_font_atlas_cleanup(
atlas);
12522 if (
atlas->fonts) {
12523 struct nk_font *iter, *
next;
12524 for (iter =
atlas->fonts; iter; iter =
next) {
12526 atlas->permanent.free(
atlas->permanent.userdata, iter);
12549 in->mouse.buttons[i].clicked = 0;
12551 in->keyboard.text_len = 0;
12553 in->mouse.prev.
x =
in->mouse.pos.x;
12554 in->mouse.prev.y =
in->mouse.pos.y;
12555 in->mouse.delta.x = 0;
12556 in->mouse.delta.y = 0;
12558 in->keyboard.keys[i].clicked = 0;
12568 if (
in->mouse.grab)
12569 in->mouse.grab = 0;
12570 if (
in->mouse.ungrab) {
12571 in->mouse.grabbed = 0;
12572 in->mouse.ungrab = 0;
12573 in->mouse.grab = 0;
12584 in->mouse.pos.x = (float)
x;
12585 in->mouse.pos.y = (float)
y;
12586 in->mouse.delta.x =
in->mouse.pos.x -
in->mouse.prev.x;
12587 in->mouse.delta.y =
in->mouse.pos.y -
in->mouse.prev.y;
12597 if (
in->keyboard.keys[key].down !=
down)
12598 in->keyboard.keys[key].clicked++;
12599 in->keyboard.keys[key].down =
down;
12610 if (
in->mouse.buttons[
id].down ==
down)
return;
12612 btn = &
in->mouse.buttons[
id];
12624 ctx->input.mouse.scroll_delta.x +=
val.x;
12625 ctx->input.mouse.scroll_delta.y +=
val.y;
12643 in->keyboard.text_len +=
len;
12764 if (
b->down &&
b->clicked)
12816 struct nk_text_find {
12823 struct nk_text_edit_row {
12826 float baseline_y_delta;
12837 #define NK_TEXT_HAS_SELECTION(s) ((s)->select_start != (s)->select_end) 12840 nk_textedit_get_width(
const struct nk_text_edit *edit,
int line_start,
int char_id,
12850 nk_textedit_layout_row(
struct nk_text_edit_row *
r,
struct nk_text_edit *edit,
12856 const char *remaining;
12861 text, (
int)(
end - text), row_height, &remaining, 0, &glyphs, NK_STOP_ON_NEW_LINE);
12865 r->baseline_y_delta =
size.y;
12868 r->num_chars = glyphs;
12872 nk_textedit_locate_coord(
struct nk_text_edit *edit,
float x,
float y,
12875 struct nk_text_edit_row
r;
12877 float base_y = 0, prev_x;
12881 r.ymin =
r.ymax = 0;
12886 nk_textedit_layout_row(&
r, edit, i, row_height,
font);
12887 if (
r.num_chars <= 0)
12890 if (i==0 &&
y < base_y +
r.ymin)
12893 if (
y < base_y +
r.ymax)
12897 base_y +=
r.baseline_y_delta;
12913 for (i=0; i <
r.num_chars; ++i) {
12914 float w = nk_textedit_get_width(edit, k, i,
font);
12915 if (
x < prev_x+
w) {
12916 if (
x < prev_x+
w/2)
12928 return i+
r.num_chars-1;
12929 else return i+
r.num_chars;
12941 state->has_preferred_x = 0;
12950 int p = nk_textedit_locate_coord(
state,
x,
y,
font, row_height);
12951 if (
state->select_start ==
state->select_end)
12957 nk_textedit_find_charpos(
struct nk_text_find *find,
struct nk_text_edit *
state,
12962 struct nk_text_edit_row
r;
12963 int prev_start = 0;
12964 int z =
state->string.len;
12971 nk_textedit_layout_row(&
r,
state, 0, row_height,
font);
12973 find->first_char = 0;
12979 nk_textedit_layout_row(&
r,
state, i, row_height,
font);
12982 find->first_char = i;
12983 find->length =
r.num_chars;
12987 find->height =
r.ymax -
r.ymin;
12988 find->prev_first = prev_start;
12996 nk_textedit_layout_row(&
r,
state, i, row_height,
font);
12997 if (
n < i +
r.num_chars)
break;
13000 find->y +=
r.baseline_y_delta;
13003 find->first_char =
first = i;
13004 find->length =
r.num_chars;
13005 find->height =
r.ymax -
r.ymin;
13006 find->prev_first = prev_start;
13010 for (i=0;
first+i <
n; ++i)
13018 int n =
state->string.len;
13019 if (NK_TEXT_HAS_SELECTION(
state)) {
13023 if (
state->select_start ==
state->select_end)
13033 nk_textedit_makeundo_delete(
state, where,
len);
13035 state->has_preferred_x = 0;
13042 nk_textedit_clamp(
state);
13043 if (NK_TEXT_HAS_SELECTION(
state)) {
13044 if (
state->select_start <
state->select_end) {
13053 state->has_preferred_x = 0;
13061 if (
state->select_end <
state->select_start) {
13062 int temp =
state->select_end;
13064 state->select_start = temp;
13072 if (NK_TEXT_HAS_SELECTION(
state)) {
13073 nk_textedit_sortselection(
state);
13076 state->has_preferred_x = 0;
13084 if (NK_TEXT_HAS_SELECTION(
state)) {
13085 nk_textedit_sortselection(
state);
13086 nk_textedit_clamp(
state);
13089 state->has_preferred_x = 0;
13098 if (
idx <= 0)
return 1;
13100 return (
c ==
' ' ||
c ==
'\t' ||
c == 0x3000 ||
c ==
',' ||
c ==
';' ||
13101 c ==
'(' ||
c ==
')' ||
c ==
'{' ||
c ==
'}' ||
c ==
'[' ||
c ==
']' ||
13108 int c =
state->cursor - 1;
13109 while(
c >= 0 && !nk_is_word_boundary(
state,
c))
13121 const int len =
state->string.len;
13122 int c =
state->cursor+1;
13123 while(
c <
len && !nk_is_word_boundary(
state,
c))
13136 if (!NK_TEXT_HAS_SELECTION(
state))
13147 if (NK_TEXT_HAS_SELECTION(
state)) {
13149 state->has_preferred_x = 0;
13160 const char *text = (
const char *) ctext;
13164 nk_textedit_clamp(
state);
13170 nk_textedit_makeundo_insert(
state,
state->cursor, glyphs);
13172 state->has_preferred_x = 0;
13176 if (
state->undo.undo_point)
13177 --
state->undo.undo_point;
13193 while ((text_len < total_len) && glyph_len)
13196 if (unicode == 127)
goto next;
13198 if (unicode ==
'\n' &&
state->single_line)
goto next;
13202 if (!NK_TEXT_HAS_SELECTION(
state) &&
13206 nk_textedit_makeundo_replace(
state,
state->cursor, 1, 1);
13213 state->has_preferred_x = 0;
13220 nk_textedit_makeundo_insert(
state,
state->cursor, 1);
13222 state->has_preferred_x = 0;
13226 text_len += glyph_len;
13227 glyph_len =
nk_utf_decode(text + text_len, &unicode, total_len-text_len);
13250 state->has_preferred_x = 0;
13255 state->has_preferred_x = 0;
13260 state->has_preferred_x = 0;
13279 nk_textedit_clamp(
state);
13280 nk_textedit_prep_selection_at_cursor(
state);
13282 if (
state->select_end > 0)
13283 --
state->select_end;
13285 state->has_preferred_x = 0;
13289 if (NK_TEXT_HAS_SELECTION(
state))
13290 nk_textedit_move_to_first(
state);
13291 else if (
state->cursor > 0)
13293 state->has_preferred_x = 0;
13298 nk_textedit_prep_selection_at_cursor(
state);
13300 ++
state->select_end;
13301 nk_textedit_clamp(
state);
13303 state->has_preferred_x = 0;
13307 if (NK_TEXT_HAS_SELECTION(
state))
13308 nk_textedit_move_to_last(
state);
13309 else ++
state->cursor;
13310 nk_textedit_clamp(
state);
13311 state->has_preferred_x = 0;
13316 if( !NK_TEXT_HAS_SELECTION(
state ) )
13317 nk_textedit_prep_selection_at_cursor(
state);
13318 state->cursor = nk_textedit_move_to_word_previous(
state);
13320 nk_textedit_clamp(
state );
13322 if (NK_TEXT_HAS_SELECTION(
state))
13323 nk_textedit_move_to_first(
state);
13325 state->cursor = nk_textedit_move_to_word_previous(
state);
13326 nk_textedit_clamp(
state );
13332 if( !NK_TEXT_HAS_SELECTION(
state ) )
13333 nk_textedit_prep_selection_at_cursor(
state);
13334 state->cursor = nk_textedit_move_to_word_next(
state);
13336 nk_textedit_clamp(
state);
13338 if (NK_TEXT_HAS_SELECTION(
state))
13339 nk_textedit_move_to_last(
state);
13341 state->cursor = nk_textedit_move_to_word_next(
state);
13342 nk_textedit_clamp(
state );
13347 struct nk_text_find find;
13348 struct nk_text_edit_row
row;
13349 int i, sel = shift_mod;
13351 if (
state->single_line) {
13358 nk_textedit_prep_selection_at_cursor(
state);
13359 else if (NK_TEXT_HAS_SELECTION(
state))
13360 nk_textedit_move_to_last(
state);
13363 nk_textedit_clamp(
state);
13364 nk_textedit_find_charpos(&find,
state,
state->cursor,
state->single_line,
13371 float goal_x =
state->has_preferred_x ?
state->preferred_x : find.x;
13372 int start = find.first_char + find.length;
13378 for (i=0; i <
row.num_chars &&
x <
row.x1; ++i) {
13385 nk_textedit_clamp(
state);
13387 state->has_preferred_x = 1;
13388 state->preferred_x = goal_x;
13395 struct nk_text_find find;
13396 struct nk_text_edit_row
row;
13397 int i, sel = shift_mod;
13399 if (
state->single_line) {
13406 nk_textedit_prep_selection_at_cursor(
state);
13407 else if (NK_TEXT_HAS_SELECTION(
state))
13408 nk_textedit_move_to_first(
state);
13411 nk_textedit_clamp(
state);
13412 nk_textedit_find_charpos(&find,
state,
state->cursor,
state->single_line,
13416 if (find.prev_first != find.first_char) {
13419 float goal_x =
state->has_preferred_x ?
state->preferred_x : find.x;
13421 state->cursor = find.prev_first;
13425 for (i=0; i <
row.num_chars &&
x <
row.x1; ++i) {
13426 float dx = nk_textedit_get_width(
state, find.prev_first, i,
font);
13432 nk_textedit_clamp(
state);
13434 state->has_preferred_x = 1;
13435 state->preferred_x = goal_x;
13443 if (NK_TEXT_HAS_SELECTION(
state))
13446 int n =
state->string.len;
13450 state->has_preferred_x = 0;
13456 if (NK_TEXT_HAS_SELECTION(
state))
13459 nk_textedit_clamp(
state);
13460 if (
state->cursor > 0) {
13465 state->has_preferred_x = 0;
13470 nk_textedit_prep_selection_at_cursor(
state);
13472 state->has_preferred_x = 0;
13475 state->has_preferred_x = 0;
13481 nk_textedit_prep_selection_at_cursor(
state);
13483 state->has_preferred_x = 0;
13486 state->select_start =
state->select_end = 0;
13487 state->has_preferred_x = 0;
13493 struct nk_text_find find;
13494 nk_textedit_clamp(
state);
13495 nk_textedit_prep_selection_at_cursor(
state);
13498 nk_textedit_find_charpos(&find,
state,
state->cursor,
state->single_line,
13500 state->cursor =
state->select_end = find.first_char;
13501 state->has_preferred_x = 0;
13503 struct nk_text_find find;
13506 nk_textedit_clamp(
state);
13507 nk_textedit_move_to_first(
state);
13508 nk_textedit_find_charpos(&find,
state,
state->cursor,
state->single_line,
13510 state->cursor = find.first_char;
13511 state->has_preferred_x = 0;
13517 struct nk_text_find find;
13518 nk_textedit_clamp(
state);
13519 nk_textedit_prep_selection_at_cursor(
state);
13520 nk_textedit_find_charpos(&find,
state,
state->cursor,
state->single_line,
13522 state->has_preferred_x = 0;
13523 state->cursor = find.first_char + find.length;
13528 struct nk_text_find find;
13529 nk_textedit_clamp(
state);
13530 nk_textedit_move_to_first(
state);
13531 nk_textedit_find_charpos(&find,
state,
state->cursor,
state->single_line,
13534 state->has_preferred_x = 0;
13535 state->cursor = find.first_char + find.length;
13553 if (
state->undo_point > 0) {
13555 if (
state->undo_rec[0].char_storage >= 0) {
13556 int n =
state->undo_rec[0].insert_length, i;
13558 state->undo_char_point = (short)(
state->undo_char_point -
n);
13559 NK_MEMCPY(
state->undo_char,
state->undo_char +
n,
13561 for (i=0; i <
state->undo_point; ++i) {
13562 if (
state->undo_rec[i].char_storage >= 0)
13563 state->undo_rec[i].char_storage = (short)
13564 (
state->undo_rec[i].char_storage -
n);
13567 --
state->undo_point;
13568 NK_MEMCPY(
state->undo_rec,
state->undo_rec+1,
13582 if (
state->redo_point <= k) {
13584 if (
state->undo_rec[k].char_storage >= 0) {
13585 int n =
state->undo_rec[k].insert_length, i;
13587 state->redo_char_point = (short)(
state->redo_char_point +
n);
13589 NK_MEMCPY(
state->undo_char +
state->redo_char_point,
13590 state->undo_char +
state->redo_char_point-
n,
num *
sizeof(
char));
13591 for (i =
state->redo_point; i < k; ++i) {
13592 if (
state->undo_rec[i].char_storage >= 0) {
13593 state->undo_rec[i].char_storage = (short)
13594 (
state->undo_rec[i].char_storage +
n);
13598 ++
state->redo_point;
13609 nk_textedit_flush_redo(
state);
13614 nk_textedit_discard_undo(
state);
13619 state->undo_point = 0;
13620 state->undo_char_point = 0;
13627 nk_textedit_discard_undo(
state);
13628 return &
state->undo_rec[
state->undo_point++];
13633 int insert_len,
int delete_len)
13640 r->insert_length = (short) insert_len;
13641 r->delete_length = (short) delete_len;
13643 if (insert_len == 0) {
13644 r->char_storage = -1;
13647 r->char_storage =
state->undo_char_point;
13648 state->undo_char_point = (short)(
state->undo_char_point + insert_len);
13649 return &
state->undo_char[
r->char_storage];
13658 if (
s->undo_point == 0)
13662 u =
s->undo_rec[
s->undo_point-1];
13663 r = &
s->undo_rec[
s->redo_point-1];
13664 r->char_storage = -1;
13666 r->insert_length = u.delete_length;
13667 r->delete_length = u.insert_length;
13668 r->where = u.where;
13670 if (u.delete_length)
13683 r->insert_length = 0;
13687 while (
s->undo_char_point + u.delete_length >
s->redo_char_point) {
13689 nk_textedit_discard_redo(
s);
13695 r = &
s->undo_rec[
s->redo_point-1];
13696 r->char_storage = (short)(
s->redo_char_point - u.delete_length);
13697 s->redo_char_point = (short)(
s->redo_char_point - u.delete_length);
13700 for (i=0; i < u.delete_length; ++i)
13701 s->undo_char[
r->char_storage + i] =
13709 if (u.insert_length) {
13712 &
s->undo_char[u.char_storage], u.insert_length);
13713 s->undo_char_point = (short)(
s->undo_char_point - u.insert_length);
13715 state->cursor = (short)(u.where + u.insert_length);
13730 u = &
s->undo_rec[
s->undo_point];
13731 r =
s->undo_rec[
s->redo_point];
13740 if (
r.delete_length) {
13760 if (
r.insert_length) {
13763 &
s->undo_char[
r.char_storage],
r.insert_length);
13765 state->cursor =
r.where +
r.insert_length;
13783 for (i=0; i <
length; ++i)
13790 int old_length,
int new_length)
13795 for (i=0; i < old_length; ++i)
13805 state->undo.undo_point = 0;
13806 state->undo.undo_char_point = 0;
13809 state->select_end =
state->select_start = 0;
13811 state->has_preferred_x = 0;
13812 state->preferred_x = 0;
13813 state->cursor_at_end_of_line = 0;
13814 state->initialized = 1;
13826 if (!
state || !memory || !
size)
return;
13837 if (!
state || !alloc)
return;
13843 #ifdef NK_INCLUDE_DEFAULT_ALLOCATOR 13848 if (!
state)
return;
13851 nk_str_init_default(&
state->string);
13859 state->select_start = 0;
13867 if (!
state)
return;
13876 #define nk_widget_state_reset(s)\ 13877 if ((*(s)) & NK_WIDGET_STATE_MODIFIED)\ 13878 (*(s)) = NK_WIDGET_STATE_INACTIVE|NK_WIDGET_STATE_MODIFIED;\ 13879 else (*(s)) = NK_WIDGET_STATE_INACTIVE; 13889 const char *
string,
int len,
const struct nk_text *
t,
13897 if (!o || !
t)
return;
13901 label.y =
b.y +
t->padding.y;
13904 text_width =
f->width(
f->userdata,
f->height, (
const char*)
string,
len);
13905 text_width += (2.0f *
t->padding.x);
13909 label.x =
b.x +
t->padding.x;
13912 label.w =
NK_MAX(1, 2 *
t->padding.x + (
float)text_width);
13913 label.x = (
b.x +
t->padding.x + ((
b.w - 2 *
t->padding.x) -
label.w) / 2);
13918 label.x =
NK_MAX(
b.x +
t->padding.x, (
b.x +
b.w) - (2 *
t->padding.x + (
float)text_width));
13919 label.w = (float)text_width + 2 *
t->padding.x;
13924 label.y =
b.y +
b.h/2.0f - (float)
f->height/2.0f;
13931 len,
f,
t->background,
t->text);
13936 const char *
string,
int len,
const struct nk_text *
t,
13949 if (!o || !
t)
return;
13952 text.background =
t->background;
13953 text.text =
t->text;
13957 b.h =
b.h - 2 *
t->padding.y;
13959 line.x =
b.x +
t->padding.x;
13960 line.y =
b.y +
t->padding.y;
13961 line.w =
b.w - 2 *
t->padding.x;
13962 line.h = 2 *
t->padding.y +
f->height;
13964 fitting = nk_text_clamp(
f,
string,
len, line.w, &glyphs, &
width, seperator,
NK_LEN(seperator));
13965 while (done <
len) {
13966 if (!fitting || line.y + line.h >= (
b.y +
b.h))
break;
13967 nk_widget_text(o, line, &
string[done], fitting, &text,
NK_TEXT_LEFT,
f);
13969 line.y +=
f->height + 2 *
t->padding.y;
13970 fitting = nk_text_clamp(
f, &
string[done],
len - done, line.w, &glyphs, &
width, seperator,
NK_LEN(seperator));
13995 text.background = background;
13996 text.text = foreground;
14038 nk_widget_state_reset(
state);
14047 #ifdef NK_BUTTON_TRIGGER_ON_RELEASE 14068 background = &style->
hover;
14070 background = &style->
active;
14071 else background = &style->
normal;
14091 if (!
out || !style)
14116 background = nk_draw_button(
out, bounds,
state, style);
14120 text.background = background->
data.
color;
14147 if (!
out || !style || !
font || !
string)
14167 background = nk_draw_button(
out, bounds,
state, style);
14209 nk_draw_button(
out, bounds,
state, style);
14252 background = nk_draw_button(
out, bounds,
state, style);
14254 text.background = background->
data.
color;
14282 struct nk_rect tri = {0,0,0,0};
14301 nk_draw_button_text_symbol(
out, &bounds, &
content, &tri,
14316 background = nk_draw_button(
out, bounds,
state, style);
14320 text.background = background->
data.
color;
14353 icon.w = icon.h = bounds.
h - 2 * style->
padding.
y;
14355 icon.x = (bounds.
x + bounds.
w) - (2 * style->
padding.
x + icon.w);
14356 icon.x =
NK_MAX(icon.x, 0);
14357 }
else icon.x = bounds.
x + 2 * style->
padding.
x;
14375 enum nk_toggle_type {
14384 nk_widget_state_reset(
state);
14400 const struct nk_rect *cursors,
const char *
string,
int len,
14409 background = &style->
hover;
14413 background = &style->
hover;
14417 background = &style->
normal;
14433 text.padding.x = 0;
14434 text.padding.y = 0;
14443 const struct nk_rect *cursors,
const char *
string,
int len,
14452 background = &style->
hover;
14456 background = &style->
hover;
14460 background = &style->
normal;
14476 text.padding.x = 0;
14477 text.padding.y = 0;
14485 int *active,
const char *
str,
int len,
enum nk_toggle_type
type,
14498 if (!
out || !style || !
font || !active)
14529 was_active = *active;
14530 *active = nk_toggle_behavior(
in, bounds,
state, *active);
14535 if (
type == NK_TOGGLE_CHECK) {
14542 return (was_active != *active);
14558 text.padding = style->
padding;
14563 background = &style->
pressed;
14566 background = &style->
hover;
14569 background = &style->
normal;
14589 text.background =
nk_rgba(0,0,0,0);
14592 text.background = background->
data.
color;
14616 old_value = *
value;
14626 *
value = !(*value);
14630 nk_draw_selectable(
out, *
state, style, *
value, &bounds, 0,0,
str,
len,
align,
font);
14632 return old_value != *
value;
14654 old_value = *
value;
14662 *
value = !(*value);
14665 icon.
w = icon.
h = bounds.
h - 2 * style->
padding.
y;
14667 icon.
x = (bounds.
x + bounds.
w) - (2 * style->
padding.
x + icon.
w);
14669 }
else icon.
x = bounds.
x + 2 * style->
padding.
x;
14678 nk_draw_selectable(
out, *
state, style, *
value, &bounds, &icon,
img,
str,
len,
align,
font);
14680 return old_value != *
value;
14692 struct nk_rect bounds,
float slider_min,
float slider_max,
float slider_value,
14693 float slider_step,
float slider_steps)
14695 int left_mouse_down;
14696 int left_mouse_click_in_cursor;
14699 nk_widget_state_reset(
state);
14704 if (left_mouse_down && left_mouse_click_in_cursor)
14707 const float d =
in->mouse.pos.x - (visual_cursor->
x+visual_cursor->
w*0.5f);
14708 const float pxstep = bounds.
w / slider_steps;
14712 if (
NK_ABS(d) >= pxstep) {
14713 const float steps = (float)((
int)(
NK_ABS(d) / pxstep));
14714 slider_value += (d > 0) ? (slider_step*steps) : -(slider_step*steps);
14715 slider_value =
NK_CLAMP(slider_min, slider_value, slider_max);
14716 ratio = (slider_value - slider_min)/slider_step;
14717 logical_cursor->
x = bounds.
x + (logical_cursor->
w * ratio);
14730 return slider_value;
14736 const struct nk_rect *visual_cursor,
float min,
float value,
float max)
14751 background = &style->
active;
14755 background = &style->
hover;
14759 background = &style->
normal;
14766 bar.y = (visual_cursor->
y + visual_cursor->
h/2) - bounds->
h/12;
14768 bar.h = bounds->
h/6;
14771 fill.w = (visual_cursor->
x + (visual_cursor->
w/2.0f)) - bar.x;
14797 float min,
float val,
float max,
float step,
14801 float slider_range;
14804 float slider_value;
14805 float slider_steps;
14806 float cursor_offset;
14808 struct nk_rect visual_cursor;
14809 struct nk_rect logical_cursor;
14813 if (!
out || !style)
14853 slider_max =
NK_MAX(min, max);
14854 slider_min =
NK_MIN(min, max);
14855 slider_value =
NK_CLAMP(slider_min,
val, slider_max);
14856 slider_range = slider_max - slider_min;
14857 slider_steps = slider_range / step;
14858 cursor_offset = (slider_value - slider_min) / step;
14863 logical_cursor.
h = bounds.
h;
14864 logical_cursor.
w = bounds.
w / slider_steps;
14865 logical_cursor.
x = bounds.
x + (logical_cursor.
w * cursor_offset);
14866 logical_cursor.
y = bounds.
y;
14870 visual_cursor.
y = (bounds.
y + bounds.
h*0.5f) - visual_cursor.
h*0.5f;
14871 visual_cursor.
x = logical_cursor.
x - visual_cursor.
w*0.5f;
14873 slider_value = nk_slider_behavior(
state, &logical_cursor, &visual_cursor,
14874 in, bounds, slider_min, slider_max, slider_value, step, slider_steps);
14875 visual_cursor.
x = logical_cursor.
x - visual_cursor.
w*0.5f;
14879 nk_draw_slider(
out, *
state, style, &bounds, &visual_cursor, slider_min, slider_value, slider_max);
14881 return slider_value;
14893 nk_widget_state_reset(
state);
14899 if (left_mouse_down && left_mouse_click_in_cursor) {
14900 float ratio =
NK_MAX(0, (
float)(
in->mouse.pos.x -
r.x)) / (float)
r.w;
14912 if (!max)
return value;
14930 background = &style->
active;
14933 background = &style->
hover;
14936 background = &style->
normal;
14965 if (!
out || !style)
return 0;
14971 prog_scale = (float)
value / (
float)max;
14972 cursor.w = (bounds.
w - 2) * prog_scale;
14976 prog_value = nk_progress_behavior(
state,
in, bounds, max, prog_value, modifiable);
14980 nk_draw_progress(
out, *
state, style, &bounds, &cursor,
value, max);
14992 int has_scrolling,
const struct nk_rect *scroll,
14994 const struct nk_rect *empty1,
float scroll_offset,
14998 int left_mouse_down;
14999 int left_mouse_click_in_cursor;
15000 float scroll_delta;
15002 nk_widget_state_reset(
state);
15003 if (!
in)
return scroll_offset;
15011 scroll_delta = (o ==
NK_VERTICAL) ?
in->mouse.scroll_delta.y:
in->mouse.scroll_delta.x;
15012 if (left_mouse_down && left_mouse_click_in_cursor) {
15014 float pixel, delta;
15018 pixel =
in->mouse.delta.y;
15019 delta = (pixel / scroll->
h) *
target;
15020 scroll_offset =
NK_CLAMP(0, scroll_offset + delta,
target - scroll->
h);
15021 cursor_y = scroll->
y + ((scroll_offset/
target) * scroll->
h);
15025 pixel =
in->mouse.delta.x;
15026 delta = (pixel / scroll->
w) *
target;
15027 scroll_offset =
NK_CLAMP(0, scroll_offset + delta,
target - scroll->
w);
15028 cursor_x = scroll->
x + ((scroll_offset/
target) * scroll->
w);
15035 scroll_offset =
NK_MAX(0, scroll_offset - scroll->
h);
15036 else scroll_offset =
NK_MAX(0, scroll_offset - scroll->
w);
15041 scroll_offset =
NK_MIN(scroll_offset + scroll->
h,
target - scroll->
h);
15042 else scroll_offset =
NK_MIN(scroll_offset + scroll->
w,
target - scroll->
w);
15043 }
else if (has_scrolling) {
15044 if ((scroll_delta < 0 || (scroll_delta > 0))) {
15046 scroll_offset = scroll_offset + scroll_step * (-scroll_delta);
15062 return scroll_offset;
15068 const struct nk_rect *scroll)
15075 background = &style->
active;
15078 background = &style->
hover;
15081 background = &style->
normal;
15103 float offset,
float target,
float step,
float button_pixel_inc,
15112 float scroll_offset;
15114 float scroll_ratio;
15119 if (!
out || !style)
return 0;
15123 if (
target <= scroll.
h)
return 0;
15136 scroll_step =
NK_MIN(step, button_pixel_inc);
15151 scroll.
h = scroll_h;
15155 scroll_step =
NK_MIN(step, scroll.
h);
15157 scroll_ratio = scroll.
h /
target;
15158 scroll_off = scroll_offset /
target;
15162 cursor.y = scroll.
y + (scroll_off * scroll.
h) + style->
border + style->
padding.
y;
15167 empty_north.x = scroll.
x;
15168 empty_north.y = scroll.
y;
15169 empty_north.w = scroll.
w;
15170 empty_north.h =
NK_MAX(cursor.y - scroll.
y, 0);
15172 empty_south.x = scroll.
x;
15173 empty_south.y = cursor.y + cursor.h;
15174 empty_south.w = scroll.
w;
15175 empty_south.h =
NK_MAX((scroll.
y + scroll.
h) - (cursor.y + cursor.h), 0);
15178 scroll_offset = nk_scrollbar_behavior(
state,
in, has_scrolling, &scroll, &cursor,
15180 scroll_off = scroll_offset /
target;
15185 nk_draw_scrollbar(
out, *
state, style, &scroll, &cursor);
15187 return scroll_offset;
15193 float offset,
float target,
float step,
float button_pixel_inc,
15202 float scroll_offset;
15204 float scroll_ratio;
15208 if (!
out || !style)
return 0;
15212 scroll.
w =
NK_MAX(scroll.
w, 2 * scroll.
h);
15213 if (
target <= scroll.
w)
return 0;
15224 scroll_w = scroll.
w - 2 *
button.w;
15225 scroll_step =
NK_MIN(step, button_pixel_inc);
15240 scroll.
w = scroll_w;
15244 scroll_step =
NK_MIN(step, scroll.
w);
15246 scroll_ratio = scroll.
w /
target;
15247 scroll_off = scroll_offset /
target;
15250 cursor.w = (scroll_ratio * scroll.
w) - (2*style->
border + 2*style->
padding.
x);
15251 cursor.x = scroll.
x + (scroll_off * scroll.
w) + style->
border + style->
padding.
x;
15256 empty_west.x = scroll.
x;
15257 empty_west.y = scroll.
y;
15258 empty_west.w = cursor.x - scroll.
x;
15259 empty_west.h = scroll.
h;
15261 empty_east.x = cursor.x + cursor.w;
15262 empty_east.y = scroll.
y;
15263 empty_east.w = (scroll.
x + scroll.
w) - (cursor.x + cursor.w);
15264 empty_east.h = scroll.
h;
15267 scroll_offset = nk_scrollbar_behavior(
state,
in, has_scrolling, &scroll, &cursor,
15269 scroll_off = scroll_offset /
target;
15270 cursor.x = scroll.
x + (scroll_off * scroll.
w);
15274 nk_draw_scrollbar(
out, *
state, style, &scroll, &cursor);
15276 return scroll_offset;
15291 if (unicode > 128)
return nk_false;
15299 if ((unicode < '0' || unicode >
'9') && unicode !=
'.' && unicode !=
'-')
15308 if ((unicode < '0' || unicode >
'9') && unicode !=
'-')
15317 if ((unicode < '0' || unicode >
'9') &&
15318 (unicode < 'a' || unicode >
'f') &&
15319 (unicode < 'A' || unicode >
'F'))
15328 if (unicode < '0' || unicode >
'7')
15337 if (unicode !=
'0' && unicode !=
'1')
15349 const struct nk_style_edit *style,
float pos_x,
float pos_y,
15350 float x_offset,
const char *text,
int byte_len,
float row_height,
15352 struct nk_color foreground,
int is_selected)
15357 if (!text || !byte_len || !
out || !style)
return;
15359 {
int glyph_len = 0;
15362 float line_width = 0;
15364 const char *line = text;
15365 float line_offset = 0;
15366 int line_count = 0;
15370 txt.background = background;
15371 txt.text = foreground;
15373 glyph_len =
nk_utf_decode(text+text_len, &unicode, byte_len-text_len);
15374 if (!glyph_len)
return;
15375 while ((text_len < byte_len) && glyph_len)
15377 if (unicode ==
'\n') {
15380 label.
y = pos_y + line_offset;
15381 label.h = row_height;
15382 label.w = line_width;
15385 label.x += x_offset;
15389 nk_widget_text(
out,
label, line, (
int)((text + text_len) - line),
15395 line = text + text_len;
15396 line_offset += row_height;
15397 glyph_len =
nk_utf_decode(text + text_len, &unicode, (
int)(byte_len-text_len));
15400 if (unicode ==
'\r') {
15402 glyph_len =
nk_utf_decode(text + text_len, &unicode, byte_len-text_len);
15405 glyph_width =
font->width(
font->userdata,
font->height, text+text_len, glyph_len);
15406 line_width += (float)glyph_width;
15407 text_len += glyph_len;
15408 glyph_len =
nk_utf_decode(text + text_len, &unicode, byte_len-text_len);
15411 if (line_width > 0) {
15414 label.
y = pos_y + line_offset;
15415 label.h = row_height;
15416 label.w = line_width;
15419 label.x += x_offset;
15423 nk_widget_text(
out,
label, line, (
int)((text + text_len) - line),
15437 char prev_state = 0;
15438 char is_hovered = 0;
15439 char select_all = 0;
15440 char cursor_follow = 0;
15460 old_clip =
out->clip;
15461 nk_unify(&clip, &old_clip, area.x, area.y, area.x + area.w, area.y + area.h);
15464 prev_state = (char)edit->
active;
15468 bounds.
x, bounds.
y, bounds.
w, bounds.
h);
15472 if (!prev_state && edit->
active) {
15475 nk_textedit_clear_state(edit,
type,
filter);
15489 if (prev_state != edit->
active)
15496 const float mouse_x = (
in->mouse.pos.x - area.x) + edit->
scrollbar.
x;
15497 const float mouse_y = (
in->mouse.pos.y - area.y) + edit->
scrollbar.
y;
15505 nk_textedit_click(edit, mouse_x, mouse_y,
font, row_height);
15507 (
in->mouse.delta.x != 0.0f ||
in->mouse.delta.y != 0.0f)) {
15508 nk_textedit_drag(edit, mouse_x, mouse_y,
font, row_height);
15522 nk_textedit_key(edit, (
enum nk_keys)i, shift_mod,
font, row_height);
15527 in->keyboard.text_len = 0;
15532 if (
in->keyboard.text_len) {
15535 in->keyboard.text_len = 0;
15588 else nk_widget_state_reset(
state);
15600 background = &style->
active;
15602 background = &style->
hover;
15603 else background = &style->
normal;
15614 int total_lines = 1;
15618 const char *cursor_ptr = 0;
15619 const char *select_begin_ptr = 0;
15620 const char *select_end_ptr = 0;
15631 float line_width = 0.0f;
15643 glyph_width =
font->width(
font->userdata,
font->height, text, glyph_len);
15647 while ((text_len <
len) && glyph_len)
15650 if (!cursor_ptr && glyphs == edit->
cursor)
15655 const char *remaining;
15658 cursor_pos.
y = (float)(total_lines-1) * row_height;
15659 row_size = nk_text_calculate_text_bounds(
font, text+row_begin,
15660 text_len-row_begin, row_height, &remaining,
15661 &out_offset, &glyph_offset, NK_STOP_ON_NEW_LINE);
15662 cursor_pos.
x = row_size.x;
15663 cursor_ptr = text + text_len;
15668 glyphs == selection_begin)
15673 const char *remaining;
15676 selection_offset_start.
y = (float)(
NK_MAX(total_lines-1,0)) * row_height;
15677 row_size = nk_text_calculate_text_bounds(
font, text+row_begin,
15678 text_len-row_begin, row_height, &remaining,
15679 &out_offset, &glyph_offset, NK_STOP_ON_NEW_LINE);
15680 selection_offset_start.
x = row_size.x;
15681 select_begin_ptr = text + text_len;
15686 glyphs == selection_end)
15691 const char *remaining;
15694 selection_offset_end.
y = (float)(total_lines-1) * row_height;
15695 row_size = nk_text_calculate_text_bounds(
font, text+row_begin,
15696 text_len-row_begin, row_height, &remaining,
15697 &out_offset, &glyph_offset, NK_STOP_ON_NEW_LINE);
15698 selection_offset_end.
x = row_size.x;
15699 select_end_ptr = text + text_len;
15701 if (unicode ==
'\n') {
15702 text_size.
x =
NK_MAX(text_size.
x, line_width);
15707 row_begin = text_len;
15709 glyph_width =
font->width(
font->userdata,
font->height, text+text_len, glyph_len);
15714 text_len += glyph_len;
15715 line_width += (float)glyph_width;
15718 glyph_width =
font->width(
font->userdata,
font->height,
15719 text+text_len, glyph_len);
15722 text_size.
y = (float)total_lines * row_height;
15726 cursor_pos.
x = line_width;
15727 cursor_pos.
y = text_size.
y - row_height;
15737 const float scroll_increment = area.w * 0.25f;
15758 float scroll_target;
15759 float scroll_offset;
15768 scroll_step = scroll.
h * 0.10f;
15769 scroll_inc = scroll.
h * 0.01f;
15770 scroll_target = text_size.
y;
15772 scroll_offset, scroll_target, scroll_step, scroll_inc,
15778 {
struct nk_color background_color;
15780 struct nk_color sel_background_color;
15783 struct nk_color cursor_text_color;
15789 background = &style->
active;
15796 background = &style->
hover;
15803 background = &style->
normal;
15811 background_color =
nk_rgba(0,0,0,0);
15812 else background_color = background->
data.
color;
15821 background_color, text_color,
nk_false);
15827 NK_ASSERT(select_begin_ptr);
15829 area.y - edit->
scrollbar.
y, 0, begin, (
int)(select_begin_ptr - begin),
15830 row_height,
font, background_color, text_color,
nk_false);
15834 NK_ASSERT(select_begin_ptr);
15835 if (!select_end_ptr) {
15839 nk_edit_draw_text(
out, style,
15841 area.y + selection_offset_start.
y - edit->
scrollbar.
y,
15842 selection_offset_start.
x,
15843 select_begin_ptr, (
int)(select_end_ptr - select_begin_ptr),
15844 row_height,
font, sel_background_color, sel_text_color,
nk_true);
15847 selection_end < edit->
string.len))
15850 const char *begin = select_end_ptr;
15853 NK_ASSERT(select_end_ptr);
15854 nk_edit_draw_text(
out, style,
15856 area.y + selection_offset_end.
y - edit->
scrollbar.
y,
15857 selection_offset_end.
x,
15858 begin, (
int)(
end - begin), row_height,
font,
15859 background_color, text_color,
nk_true);
15867 (cursor_ptr && *cursor_ptr ==
'\n')) {
15871 cursor.h =
font->height;
15872 cursor.x = area.x + cursor_pos.
x - edit->
scrollbar.
x;
15873 cursor.y = area.y + cursor_pos.
y + row_height/2.0f - cursor.h/2.0f;
15883 NK_ASSERT(cursor_ptr);
15889 label.h = row_height;
15892 txt.background = cursor_color;;
15893 txt.text = cursor_text_color;
15908 background = &style->
active;
15911 background = &style->
hover;
15914 background = &style->
normal;
15918 background_color =
nk_rgba(0,0,0,0);
15919 else background_color = background->
data.
color;
15922 background_color, text_color,
nk_false);
15933 enum nk_property_status {
15934 NK_PROPERTY_DEFAULT,
15938 enum nk_property_filter {
15942 enum nk_property_kind {
15947 union nk_property {
15952 struct nk_property_variant {
15953 enum nk_property_kind kind;
15954 union nk_property
value;
15955 union nk_property min_value;
15956 union nk_property max_value;
15957 union nk_property step;
15962 struct nk_rect drag,
struct nk_property_variant *variant,
15963 float inc_per_pixel)
15966 int left_mouse_click_in_cursor =
in &&
15969 nk_widget_state_reset(
state);
15973 if (left_mouse_down && left_mouse_click_in_cursor) {
15976 delta =
pixels * inc_per_pixel;
15977 switch (variant->kind) {
15979 case NK_PROPERTY_INT:
15980 variant->value.i = variant->value.i + (int)delta;
15981 variant->value.i =
NK_CLAMP(variant->min_value.i, variant->value.i, variant->max_value.i);
15983 case NK_PROPERTY_FLOAT:
15984 variant->value.f = variant->value.f + (float)delta;
15985 variant->value.f =
NK_CLAMP(variant->min_value.f, variant->value.f, variant->max_value.f);
15987 case NK_PROPERTY_DOUBLE:
15988 variant->value.d = variant->value.d + (double)delta;
15989 variant->value.d =
NK_CLAMP(variant->min_value.d, variant->value.d, variant->max_value.d);
16003 struct nk_rect empty,
int *
state,
struct nk_property_variant *variant,
16004 float inc_per_pixel)
16006 if (
in && *
state == NK_PROPERTY_DEFAULT) {
16008 *
state = NK_PROPERTY_EDIT;
16010 *
state = NK_PROPERTY_DRAG;
16012 *
state = NK_PROPERTY_DRAG;
16014 if (*
state == NK_PROPERTY_DRAG) {
16015 nk_drag_behavior(ws,
in, property, variant, inc_per_pixel);
16030 background = &style->
active;
16033 background = &style->
hover;
16036 background = &style->
normal;
16043 text.background =
nk_rgba(0,0,0,0);
16045 text.background = background->
data.
color;
16058 const char *
name,
struct nk_property_variant *variant,
16059 float inc_per_pixel,
char *
buffer,
int *
len,
16060 int *
state,
int *cursor,
int *select_begin,
int *select_end,
16071 int num_len, name_len;
16088 left.y =
property.y + style->
border +
property.h/2.0f -
left.h/2;
16105 if (*
state == NK_PROPERTY_EDIT) {
16111 switch (variant->kind) {
16113 case NK_PROPERTY_INT:
16114 nk_itoa(
string, variant->value.i);
16117 case NK_PROPERTY_FLOAT:
16118 nk_dtoa(
string, (
double)variant->value.f);
16121 case NK_PROPERTY_DOUBLE:
16122 nk_dtoa(
string, variant->value.d);
16134 edit.
y =
property.y + style->
border;
16135 edit.
h =
property.h - (2 * style->
border);
16140 empty.
y =
property.y;
16141 empty.
h =
property.h;
16144 old = (*
state == NK_PROPERTY_EDIT);
16145 nk_property_behavior(ws,
in, property,
label, edit, empty,
state, variant, inc_per_pixel);
16149 nk_draw_property(
out, style, &property, &
label, *ws,
name, name_len,
font);
16154 switch (variant->kind) {
16156 case NK_PROPERTY_INT:
16157 variant->value.i =
NK_CLAMP(variant->min_value.i, variant->value.i - variant->step.i, variant->max_value.i);
break;
16158 case NK_PROPERTY_FLOAT:
16159 variant->value.f =
NK_CLAMP(variant->min_value.f, variant->value.f - variant->step.f, variant->max_value.f);
break;
16160 case NK_PROPERTY_DOUBLE:
16161 variant->value.d =
NK_CLAMP(variant->min_value.d, variant->value.d - variant->step.d, variant->max_value.d);
break;
16166 switch (variant->kind) {
16168 case NK_PROPERTY_INT:
16169 variant->value.i =
NK_CLAMP(variant->min_value.i, variant->value.i + variant->step.i, variant->max_value.i);
break;
16170 case NK_PROPERTY_FLOAT:
16171 variant->value.f =
NK_CLAMP(variant->min_value.f, variant->value.f + variant->step.f, variant->max_value.f);
break;
16172 case NK_PROPERTY_DOUBLE:
16173 variant->value.d =
NK_CLAMP(variant->min_value.d, variant->value.d + variant->step.d, variant->max_value.d);
break;
16176 if (old != NK_PROPERTY_EDIT && (*
state == NK_PROPERTY_EDIT)) {
16184 }
else active = (*
state == NK_PROPERTY_EDIT);
16188 text_edit->
active = (
unsigned char)active;
16202 *cursor = text_edit->
cursor;
16208 if (active && !text_edit->
active) {
16210 *
state = NK_PROPERTY_DEFAULT;
16212 switch (variant->kind) {
16214 case NK_PROPERTY_INT:
16216 variant->value.i =
NK_CLAMP(variant->min_value.i, variant->value.i, variant->max_value.i);
16218 case NK_PROPERTY_FLOAT:
16221 variant->value.f =
NK_CLAMP(variant->min_value.f, variant->value.f, variant->max_value.f);
16223 case NK_PROPERTY_DOUBLE:
16226 variant->value.d =
NK_CLAMP(variant->min_value.d, variant->value.d, variant->max_value.d);
16243 int value_changed = 0;
16244 int hsv_changed = 0;
16248 NK_ASSERT(hue_bar);
16256 value_changed = hsv_changed = 1;
16261 hsva[0] =
NK_SATURATE((
in->mouse.pos.y - hue_bar->
y) / (hue_bar->
h-1));
16262 value_changed = hsv_changed = 1;
16268 hsva[3] = 1.0f -
NK_SATURATE((
in->mouse.pos.y - alpha_bar->
y) / (alpha_bar->
h-1));
16272 nk_widget_state_reset(
state);
16277 if (value_changed) {
16289 return value_changed;
16301 const float crosshair_size = 7.0f;
16309 NK_ASSERT(hue_bar);
16313 for (i = 0; i < 6; ++i) {
16320 {255, 0, 255, 255},
16324 nk_rect(hue_bar->
x, hue_bar->
y + (
float)i * (hue_bar->
h/6.0f) + 0.5f,
16325 hue_bar->
w, (hue_bar->
h/6.0f) + 0.5f), hue_colors[i], hue_colors[i],
16326 hue_colors[i+1], hue_colors[i+1]);
16328 line_y = (float)(
int)(hue_bar->
y + hsva[0] *
matrix->h + 0.5f);
16330 line_y, 1,
nk_rgb(255,255,255));
16335 line_y = (float)(
int)(alpha_bar->
y + (1.0f -
alpha) *
matrix->h + 0.5f);
16339 line_y, 1,
nk_rgb(255,255,255));
16348 {
struct nk_vec2 p;
float S = hsva[1];
float V = hsva[2];
16377 bar_w =
font->height;
16378 bounds.
x += padding.
x;
16379 bounds.
y += padding.
x;
16380 bounds.
w -= 2 * padding.
x;
16381 bounds.
h -= 2 * padding.
y;
16386 matrix.w = bounds.
w - (3 * padding.
x + 2 * bar_w);
16389 hue_bar.
y = bounds.
y;
16393 alpha_bar.
x = hue_bar.
x + hue_bar.
w + padding.
x;
16394 alpha_bar.
y = bounds.
y;
16395 alpha_bar.
w = bar_w;
16398 ret = nk_color_picker_behavior(
state, &bounds, &
matrix, &hue_bar,
16410 #define NK_COLOR_MAP(NK_COLOR)\ 16411 NK_COLOR(NK_COLOR_TEXT, 175,175,175,255) \ 16412 NK_COLOR(NK_COLOR_WINDOW, 45, 45, 45, 255) \ 16413 NK_COLOR(NK_COLOR_HEADER, 40, 40, 40, 255) \ 16414 NK_COLOR(NK_COLOR_BORDER, 65, 65, 65, 255) \ 16415 NK_COLOR(NK_COLOR_BUTTON, 50, 50, 50, 255) \ 16416 NK_COLOR(NK_COLOR_BUTTON_HOVER, 40, 40, 40, 255) \ 16417 NK_COLOR(NK_COLOR_BUTTON_ACTIVE, 35, 35, 35, 255) \ 16418 NK_COLOR(NK_COLOR_TOGGLE, 100,100,100,255) \ 16419 NK_COLOR(NK_COLOR_TOGGLE_HOVER, 120,120,120,255) \ 16420 NK_COLOR(NK_COLOR_TOGGLE_CURSOR, 45, 45, 45, 255) \ 16421 NK_COLOR(NK_COLOR_SELECT, 45, 45, 45, 255) \ 16422 NK_COLOR(NK_COLOR_SELECT_ACTIVE, 35, 35, 35,255) \ 16423 NK_COLOR(NK_COLOR_SLIDER, 38, 38, 38, 255) \ 16424 NK_COLOR(NK_COLOR_SLIDER_CURSOR, 100,100,100,255) \ 16425 NK_COLOR(NK_COLOR_SLIDER_CURSOR_HOVER, 120,120,120,255) \ 16426 NK_COLOR(NK_COLOR_SLIDER_CURSOR_ACTIVE, 150,150,150,255) \ 16427 NK_COLOR(NK_COLOR_PROPERTY, 38, 38, 38, 255) \ 16428 NK_COLOR(NK_COLOR_EDIT, 38, 38, 38, 255) \ 16429 NK_COLOR(NK_COLOR_EDIT_CURSOR, 175,175,175,255) \ 16430 NK_COLOR(NK_COLOR_COMBO, 45, 45, 45, 255) \ 16431 NK_COLOR(NK_COLOR_CHART, 120,120,120,255) \ 16432 NK_COLOR(NK_COLOR_CHART_COLOR, 45, 45, 45, 255) \ 16433 NK_COLOR(NK_COLOR_CHART_COLOR_HIGHLIGHT,255, 0, 0, 255) \ 16434 NK_COLOR(NK_COLOR_SCROLLBAR, 40, 40, 40, 255) \ 16435 NK_COLOR(NK_COLOR_SCROLLBAR_CURSOR, 100,100,100,255) \ 16436 NK_COLOR(NK_COLOR_SCROLLBAR_CURSOR_HOVER,120,120,120,255) \ 16437 NK_COLOR(NK_COLOR_SCROLLBAR_CURSOR_ACTIVE,150,150,150,255) \ 16438 NK_COLOR(NK_COLOR_TAB_HEADER, 40, 40, 40,255) 16442 #define NK_COLOR(a,b,c,d,e) {b,c,d,e}, 16443 NK_COLOR_MAP(NK_COLOR)
16448 #define NK_COLOR(a,b,c,d,e) #a, 16449 NK_COLOR_MAP(NK_COLOR)
16454 {
return nk_color_names[
c];}
16485 style = &
ctx->style;
16489 text = &style->
text;
16510 button->rounding = 4.0f;
16530 button->rounding = 0.0f;
16550 button->rounding = 1.0f;
16574 toggle = &style->
option;
16610 select->rounding = 0.0f;
16615 slider = &style->
slider;
16654 button->rounding = 0.0f;
16718 button->rounding = 0.0f;
16726 edit = &style->
edit;
16764 property->padding =
nk_vec2(4,4);
16765 property->border = 1;
16766 property->rounding = 10;
16767 property->draw_begin = 0;
16768 property->draw_end = 0;
16786 button->rounding = 0.0f;
16815 chart = &style->
chart;
16826 combo = &style->
combo;
16859 button->rounding = 0.0f;
16892 button->rounding = 0.0f;
16913 button->rounding = 0.0f;
16950 button->rounding = 0.0f;
16970 button->rounding = 0.0f;
17016 style = &
ctx->style;
17018 ctx->stacks.fonts.head = 0;
17026 struct nk_config_stack_user_font *font_stack;
17027 struct nk_config_stack_user_font_element *element;
17030 if (!
ctx)
return 0;
17032 font_stack = &
ctx->stacks.fonts;
17033 NK_ASSERT(font_stack->head < (
int)
NK_LEN(font_stack->elements));
17034 if (font_stack->head >= (
int)
NK_LEN(font_stack->elements))
17037 element = &font_stack->elements[font_stack->head++];
17038 element->address = &
ctx->style.font;
17039 element->old_value =
ctx->style.font;
17047 struct nk_config_stack_user_font *font_stack;
17048 struct nk_config_stack_user_font_element *element;
17051 if (!
ctx)
return 0;
17053 font_stack = &
ctx->stacks.fonts;
17054 NK_ASSERT(font_stack->head > 0);
17055 if (font_stack->head < 1)
17058 element = &font_stack->elements[--font_stack->head];
17059 *element->address = element->old_value;
17063 #define NK_STYLE_PUSH_IMPLEMENATION(prefix, type, stack) \ 17064 nk_style_push_##type(struct nk_context *ctx, prefix##_##type *address, prefix##_##type value)\ 17066 struct nk_config_stack_##type * type_stack;\ 17067 struct nk_config_stack_##type##_element *element;\ 17069 if (!ctx) return 0;\ 17070 type_stack = &ctx->stacks.stack;\ 17071 NK_ASSERT(type_stack->head < (int)NK_LEN(type_stack->elements));\ 17072 if (type_stack->head >= (int)NK_LEN(type_stack->elements))\ 17074 element = &type_stack->elements[type_stack->head++];\ 17075 element->address = address;\ 17076 element->old_value = *address;\ 17081 #define NK_STYLE_POP_IMPLEMENATION(type, stack) \ 17082 nk_style_pop_##type(struct nk_context *ctx)\ 17084 struct nk_config_stack_##type *type_stack;\ 17085 struct nk_config_stack_##type##_element *element;\ 17087 if (!ctx) return 0;\ 17088 type_stack = &ctx->stacks.stack;\ 17089 NK_ASSERT(type_stack->head > 0);\ 17090 if (type_stack->head < 1)\ 17092 element = &type_stack->elements[--type_stack->head];\ 17093 *element->address = element->old_value;\ 17097 NK_API int NK_STYLE_PUSH_IMPLEMENATION(
struct nk, style_item, style_items)
17098 NK_API int NK_STYLE_PUSH_IMPLEMENATION(nk,
float, floats)
17099 NK_API int NK_STYLE_PUSH_IMPLEMENATION(
struct nk, vec2, vectors)
17101 NK_API int NK_STYLE_PUSH_IMPLEMENATION(
struct nk,
color, colors)
17103 NK_API int NK_STYLE_POP_IMPLEMENATION(style_item, style_items)
17104 NK_API int NK_STYLE_POP_IMPLEMENATION(
float,floats)
17105 NK_API int NK_STYLE_POP_IMPLEMENATION(vec2, vectors)
17107 NK_API int NK_STYLE_POP_IMPLEMENATION(
color,colors)
17114 if (!
ctx)
return 0;
17115 style = &
ctx->style;
17142 style = &
ctx->style;
17153 style = &
ctx->style;
17166 unsigned int capacity)
17168 nk_zero(pool,
sizeof(*pool));
17169 pool->
alloc = *alloc;
17176 nk_pool_free(
struct nk_pool *pool)
17191 nk_zero(pool,
sizeof(*pool));
17201 nk_pool_alloc(
struct nk_pool *pool)
17207 if (!pool->
pages) {
17208 NK_ASSERT(pool->
pages);
17217 page->next = pool->
pages;
17218 pool->
pages = page;
17247 #ifdef NK_INCLUDE_VERTEX_BUFFER_OUTPUT 17248 nk_draw_list_init(&
ctx->draw_list);
17252 #ifdef NK_INCLUDE_DEFAULT_ALLOCATOR 17257 alloc.userdata.ptr = 0;
17258 alloc.alloc = nk_malloc;
17259 alloc.free = nk_mfree;
17269 if (!memory)
return 0;
17282 if (!cmds || !pool)
return 0;
17285 ctx->memory = *cmds;
17292 nk_pool_init(&
ctx->pool,
alloc, NK_POOL_DEFAULT_CAPACITY);
17303 if (!
alloc)
return 0;
17306 nk_pool_init(&
ctx->pool,
alloc, NK_POOL_DEFAULT_CAPACITY);
17311 #ifdef NK_INCLUDE_COMMAND_USERDATA 17316 ctx->userdata = handle;
17318 ctx->current->buffer.userdata = handle;
17329 nk_pool_free(&
ctx->pool);
17331 nk_zero(&
ctx->input,
sizeof(
ctx->input));
17332 nk_zero(&
ctx->style,
sizeof(
ctx->style));
17333 nk_zero(&
ctx->memory,
sizeof(
ctx->memory));
17358 ctx->memory.calls = 0;
17359 ctx->last_widget_state = 0;
17361 NK_MEMSET(&
ctx->overlay, 0,
sizeof(
ctx->overlay));
17362 #ifdef NK_INCLUDE_VERTEX_BUFFER_OUTPUT 17363 nk_draw_list_clear(&
ctx->draw_list);
17378 iter ==
ctx->active) {
17394 if (it->
seq !=
ctx->seq) {
17395 nk_remove_table(iter, it);
17397 nk_free_table(
ctx, it);
17406 nk_remove_window(
ctx, iter);
17407 nk_free_window(
ctx, iter);
17409 }
else iter = iter->
next;
17428 buffer->clip = nk_null_rect;
17445 if (!
ctx || !win)
return;
17462 if (!
ctx || !win)
return;
17487 if (!
ctx || !win)
return;
17492 memory =
ctx->memory.memory.ptr;
17494 parent_last->
next =
buf->end;
17505 if (!
ctx->style.cursor_active)
17507 if (
ctx->style.cursor_active && !
ctx->input.mouse.grabbed &&
ctx->style.cursor_visible) {
17509 const struct nk_cursor *cursor =
ctx->style.cursor_active;
17511 nk_start_buffer(
ctx, &
ctx->overlay);
17513 mouse_bounds.x =
ctx->input.mouse.pos.x - cursor->
offset.
x;
17514 mouse_bounds.y =
ctx->input.mouse.pos.y - cursor->
offset.
y;
17515 mouse_bounds.w = cursor->size.x;
17516 mouse_bounds.h = cursor->size.y;
17519 nk_finish_buffer(
ctx, &
ctx->overlay);
17524 while (iter != 0) {
17531 while (
next && ((
next->buffer.last ==
next->buffer.begin) ||
17540 while (iter != 0) {
17554 if (
ctx->overlay.end !=
ctx->overlay.begin)
17555 cmd->next =
ctx->overlay.begin;
17556 else cmd->next =
ctx->memory.allocated;
17566 if (!
ctx)
return 0;
17567 if (!
ctx->count)
return 0;
17577 if (!iter)
return 0;
17587 if (!
ctx || !
cmd || !
ctx->count)
return 0;
17588 if (
cmd->next >=
ctx->memory.allocated)
return 0;
17651 case NK_PANEL_MENU:
return style->window.menu_border_color;
17678 struct nk_vec2 scrollbar_size;
17679 struct nk_vec2 panel_padding;
17682 NK_ASSERT(
ctx->current);
17683 NK_ASSERT(
ctx->current->layout);
17684 if (!
ctx || !
ctx->current || !
ctx->current->layout)
return 0;
17685 nk_zero(
ctx->current->layout,
sizeof(*
ctx->current->layout));
17687 nk_zero(
ctx->current->layout,
sizeof(
struct nk_panel));
17688 ctx->current->layout->type = panel_type;
17692 style = &
ctx->style;
17694 win =
ctx->current;
17698 #ifdef NK_INCLUDE_COMMAND_USERDATA
17703 panel_padding = nk_panel_get_padding(style, panel_type);
17707 int left_mouse_down;
17708 int left_mouse_click_in_cursor;
17715 if (nk_panel_has_header(win->
flags, title)) {
17718 }
else header.h = panel_padding.y;
17724 if (left_mouse_down && left_mouse_click_in_cursor) {
17734 layout->
type = panel_type;
17737 layout->
bounds.
x += panel_padding.x;
17738 layout->
bounds.
w -= 2*panel_padding.x;
17740 layout->
border = nk_panel_get_border(style, win->
flags, panel_type);
17742 }
else layout->
border = 0;
17757 layout->
bounds.
w -= scrollbar_size.x;
17758 if (!nk_panel_is_nonblock(panel_type)) {
17766 if (nk_panel_has_header(win->
flags, title))
17781 layout->
bounds.
y += header.h;
17782 layout->
bounds.
h -= header.h;
17783 layout->
at_y += header.h;
17786 if (
ctx->active == win) {
17800 text.background =
nk_rgba(0,0,0,0);
17803 text.background = background->
data.
color;
17856 float t =
font->width(
font->userdata,
font->height, title, text_len);
17886 layout->
clip = clip;}
17899 struct nk_vec2 scrollbar_size;
17900 struct nk_vec2 panel_padding;
17903 NK_ASSERT(
ctx->current);
17904 NK_ASSERT(
ctx->current->layout);
17905 if (!
ctx || !
ctx->current || !
ctx->current->layout)
17909 layout =
window->layout;
17910 style = &
ctx->style;
17913 if (!nk_panel_is_sub(layout->
type))
17918 panel_padding = nk_panel_get_padding(style, layout->
type);
17932 empty_space.x =
window->bounds.x;
17933 empty_space.y = layout->
bounds.
y;
17934 empty_space.h = panel_padding.y;
17935 empty_space.w =
window->bounds.w;
17939 empty_space.x =
window->bounds.x;
17940 empty_space.y = layout->
bounds.
y;
17941 empty_space.w = panel_padding.x + layout->
border;
17942 empty_space.h = layout->
bounds.
h;
17947 empty_space.y = layout->
bounds.
y;
17948 empty_space.w = panel_padding.x + layout->
border;
17949 empty_space.h = layout->
bounds.
h;
17951 empty_space.w += scrollbar_size.x;
17956 empty_space.x =
window->bounds.x;
17958 empty_space.w =
window->bounds.w;
17959 empty_space.h = scrollbar_size.y;
17970 int scroll_has_scrolling;
17971 float scroll_target;
17972 float scroll_offset;
17977 if (nk_panel_is_sub(layout->
type))
17982 while (root_panel->
parent)
17983 root_panel = root_panel->
parent;
17984 while (root_window->
parent)
17985 root_window = root_window->
parent;
17988 scroll_has_scrolling = 0;
17996 root_panel =
window->layout;
17997 while (root_panel->
parent) {
17999 root_panel = root_panel->
parent;
18002 scroll_has_scrolling =
nk_true;
18005 }
else if (!nk_panel_is_sub(layout->
type)) {
18008 if (
in && (
in->mouse.scroll_delta.y > 0 ||
in->mouse.scroll_delta.x > 0) && scroll_has_scrolling)
18011 }
else scroll_has_scrolling =
nk_false;
18016 scroll.x = layout->
bounds.
x + layout->
bounds.
w + panel_padding.x;
18018 scroll.w = scrollbar_size.x;
18021 scroll_offset = (float)*layout->
offset_y;
18022 scroll_step = scroll.h * 0.10f;
18023 scroll_inc = scroll.h * 0.01f;
18024 scroll_target = (
float)(int)(layout->
at_y - scroll.y);
18025 scroll_offset = nk_do_scrollbarv(&
state,
out, scroll, scroll_has_scrolling,
18026 scroll_offset, scroll_target, scroll_step, scroll_inc,
18029 if (
in && scroll_has_scrolling)
18030 in->mouse.scroll_delta.y = 0;
18038 scroll.h = scrollbar_size.y;
18040 scroll_offset = (float)*layout->
offset_x;
18041 scroll_target = (
float)(int)(layout->
max_x - scroll.x);
18042 scroll_step = layout->
max_x * 0.05f;
18043 scroll_inc = layout->
max_x * 0.005f;
18044 scroll_offset = nk_do_scrollbarh(&
state,
out, scroll, scroll_has_scrolling,
18045 scroll_offset, scroll_target, scroll_step, scroll_inc,
18053 int has_input =
ctx->input.mouse.delta.x != 0 ||
ctx->input.mouse.delta.y != 0 ||
ctx->input.mouse.scroll_delta.y != 0;
18056 if ((!has_input && is_window_hovered) || (!is_window_hovered && !any_item_active))
18057 window->scrollbar_hiding_timer +=
ctx->delta_time_seconds;
18058 else window->scrollbar_hiding_timer = 0;
18059 }
else window->scrollbar_hiding_timer = 0;
18064 struct nk_color border_color = nk_panel_get_border_color(style, layout->
type);
18074 layout->
border, border_color);
18083 padding_y, layout->
border, border_color);
18088 padding_y, layout->
border, border_color);
18096 scaler.
w = scrollbar_size.x;
18097 scaler.h = scrollbar_size.y;
18100 scaler.x = layout->
bounds.
x - panel_padding.x * 0.5f;
18101 else scaler.x = layout->
bounds.
x + layout->
bounds.
w + panel_padding.x;
18103 scaler.x -= scaler.w;
18112 scaler.y + scaler.h, scaler.x + scaler.w,
18113 scaler.y + scaler.h, item->
data.
color);
18116 scaler.y + scaler.h, scaler.x, scaler.y + scaler.h, item->
data.
color);
18127 if (left_mouse_down && left_mouse_click_in_scaler) {
18128 float delta_x =
in->mouse.delta.x;
18130 delta_x = -delta_x;
18131 window->bounds.x +=
in->mouse.delta.x;
18134 if (
window->bounds.w + delta_x >= window_size.
x) {
18135 if ((delta_x < 0) || (delta_x > 0 &&
in->mouse.pos.x >= scaler.x)) {
18137 scaler.x +=
in->mouse.delta.x;
18142 if (window_size.
y <
window->bounds.h +
in->mouse.delta.y) {
18143 if ((
in->mouse.delta.y < 0) || (
in->mouse.delta.y > 0 &&
in->mouse.pos.y >= scaler.y)) {
18145 scaler.y +=
in->mouse.delta.y;
18150 in->mouse.buttons[
NK_BUTTON_LEFT].clicked_pos.x = scaler.x + scaler.w/2.0f;
18151 in->mouse.buttons[
NK_BUTTON_LEFT].clicked_pos.y = scaler.y + scaler.h/2.0f;
18155 if (!nk_panel_is_sub(layout->
type)) {
18158 nk_command_buffer_reset(&
window->buffer);
18177 window->property.seq = 0;
18190 window->popup.con_count = 0;
18191 window->popup.con_old = 0;
18192 window->popup.active_con = 0;
18195 window->popup.con_count = 0;
18197 window->popup.combo_count = 0;
18211 if (
ctx->freelist) {
18213 elem =
ctx->freelist;
18215 }
else if (
ctx->use_pool) {
18217 elem = nk_pool_alloc(&
ctx->pool);
18219 if (!elem)
return 0;
18226 if (!elem)
return 0;
18239 if (!
ctx->freelist) {
18240 ctx->freelist = elem;
18243 ctx->freelist = elem;
18251 if (
ctx->use_pool) {
18252 nk_link_page_element_into_freelist(
ctx, elem);
18256 {
void *elem_end = (
void*)(elem + 1);
18257 void *buffer_end = (
nk_byte*)
ctx->memory.memory.ptr +
ctx->memory.size;
18258 if (elem_end == buffer_end)
18260 else nk_link_page_element_into_freelist(
ctx, elem);}
18272 elem = nk_create_page_element(
ctx);
18273 if (!elem)
return 0;
18283 nk_free_page_element(
ctx, pe);
18295 elem = nk_create_page_element(
ctx);
18296 if (!elem)
return 0;
18306 nk_free_page_element(
ctx, pe);
18347 if (!win || !
ctx)
return 0;
18351 if (!tbl)
return 0;
18352 nk_push_table(win, tbl);
18365 unsigned int i = 0;
18367 for (i = 0; i <
size; ++i) {
18370 return &iter->
values[i];
18387 elem = nk_create_page_element(
ctx);
18388 if (!elem)
return 0;
18408 nk_remove_table(win, it);
18409 nk_free_table(
ctx, it);
18418 nk_free_page_element(
ctx, pe);}
18427 NK_ASSERT(iter != iter->
next);
18428 if (iter->
name == hash) {
18438 enum nk_window_insert_location {
18444 enum nk_window_insert_location loc)
18449 if (!win || !
ctx)
return;
18453 NK_ASSERT(iter != iter->
next);
18454 NK_ASSERT(iter != win);
18455 if (iter == win)
return;
18467 if (loc == NK_INSERT_BACK) {
18479 ctx->begin->prev = win;
18491 if (win ==
ctx->begin || win ==
ctx->end) {
18492 if (win ==
ctx->begin) {
18497 if (win ==
ctx->end) {
18508 if (win ==
ctx->active || !
ctx->active) {
18538 NK_ASSERT(
ctx->style.font &&
ctx->style.font->width &&
"if this triggers you forgot to add a font");
18539 NK_ASSERT(!
ctx->current &&
"if this triggers you missed a `nk_end` call");
18540 if (!
ctx ||
ctx->current || !title || !
name)
18544 style = &
ctx->style;
18547 win = nk_find_window(
ctx, title_hash,
name);
18553 if (!win)
return 0;
18556 nk_insert_window(
ctx, win, NK_INSERT_FRONT);
18557 else nk_insert_window(
ctx, win, NK_INSERT_BACK);
18562 win->
name = title_hash;
18582 NK_ASSERT(win->
seq !=
ctx->seq);
18590 ctx->current = win;
18598 int inpanel, ishovered;
18606 nk_start(
ctx, win);
18616 iter_bounds.
x, iter_bounds.
y, iter_bounds.
w, iter_bounds.
h) &&
18630 if (iter && inpanel && (win !=
ctx->end)) {
18637 iter_bounds.
x, iter_bounds.
y, iter_bounds.
w, iter_bounds.
h) &&
18651 ctx->active = iter;
18655 nk_remove_window(
ctx, iter);
18656 nk_insert_window(
ctx, iter, NK_INSERT_BACK);
18659 if (!iter &&
ctx->end != win) {
18663 nk_remove_window(
ctx, win);
18664 nk_insert_window(
ctx, win, NK_INSERT_BACK);
18675 ctx->current = win;
18687 NK_ASSERT(
ctx->current &&
"if this triggers you forgot to call `nk_begin`");
18688 if (!
ctx || !
ctx->current)
18691 layout =
ctx->current->layout;
18697 nk_free_panel(
ctx,
ctx->current->layout);
18705 NK_ASSERT(
ctx->current);
18707 return ctx->current->bounds;
18714 NK_ASSERT(
ctx->current);
18716 return nk_vec2(
ctx->current->bounds.x,
ctx->current->bounds.y);
18723 NK_ASSERT(
ctx->current);
18725 return nk_vec2(
ctx->current->bounds.w,
ctx->current->bounds.h);
18732 NK_ASSERT(
ctx->current);
18733 if (!
ctx || !
ctx->current)
return 0;
18734 return ctx->current->bounds.w;
18741 NK_ASSERT(
ctx->current);
18742 if (!
ctx || !
ctx->current)
return 0;
18743 return ctx->current->bounds.h;
18750 NK_ASSERT(
ctx->current);
18752 return ctx->current->layout->clip;
18759 NK_ASSERT(
ctx->current);
18760 NK_ASSERT(
ctx->current->layout);
18762 return nk_vec2(
ctx->current->layout->clip.x,
ctx->current->layout->clip.y);
18769 NK_ASSERT(
ctx->current);
18770 NK_ASSERT(
ctx->current->layout);
18772 return nk_vec2(
ctx->current->layout->clip.x +
ctx->current->layout->clip.w,
18773 ctx->current->layout->clip.y +
ctx->current->layout->clip.h);
18780 NK_ASSERT(
ctx->current);
18781 NK_ASSERT(
ctx->current->layout);
18783 return nk_vec2(
ctx->current->layout->clip.w,
ctx->current->layout->clip.h);
18790 NK_ASSERT(
ctx->current);
18791 NK_ASSERT(
ctx->current->layout);
18792 if (!
ctx || !
ctx->current)
return 0;
18793 return &
ctx->current->buffer;
18800 NK_ASSERT(
ctx->current);
18801 if (!
ctx || !
ctx->current)
return 0;
18802 return ctx->current->layout;
18809 NK_ASSERT(
ctx->current);
18810 NK_ASSERT(
ctx->current->layout);
18811 if (!
ctx || !
ctx->current)
return 0;
18812 return ctx->current ==
ctx->active;
18819 NK_ASSERT(
ctx->current);
18820 if (!
ctx || !
ctx->current)
return 0;
18831 if (!
ctx)
return 0;
18842 header.
h =
ctx->style.font->height + 2 *
ctx->style.window.header.padding.y;
18859 return any_hovered || any_active;
18869 if (!
ctx)
return 0;
18873 win = nk_find_window(
ctx, title_hash,
name);
18874 if (!win)
return 0;
18885 if (!
ctx)
return 1;
18889 win = nk_find_window(
ctx, title_hash,
name);
18890 if (!win)
return 1;
18901 if (!
ctx)
return 1;
18905 win = nk_find_window(
ctx, title_hash,
name);
18906 if (!win)
return 1;
18917 if (!
ctx)
return 0;
18921 win = nk_find_window(
ctx, title_hash,
name);
18922 if (!win)
return 0;
18923 return win ==
ctx->active;
18933 return nk_find_window(
ctx, title_hash,
name);
18944 NK_ASSERT(
ctx->current != win &&
"You cannot close a currently active window");
18945 if (
ctx->current == win)
return;
18959 NK_ASSERT(
ctx->current != win &&
"You cannot update a currently in procecss window");
18970 bounds.
w =
ctx->current->bounds.w;
18971 bounds.
h =
ctx->current->bounds.h;
18980 bounds.
x =
ctx->current->bounds.x;
18981 bounds.
y =
ctx->current->bounds.y;
18999 win = nk_find_window(
ctx, title_hash,
name);
19026 win = nk_find_window(
ctx, title_hash,
name);
19053 win = nk_find_window(
ctx, title_hash,
name);
19054 if (win &&
ctx->end != win) {
19055 nk_remove_window(
ctx, win);
19056 nk_insert_window(
ctx, win, NK_INSERT_BACK);
19071 NK_ASSERT(
ctx->current);
19072 NK_ASSERT(
ctx->current->layout);
19073 if (!
ctx || !
ctx->current || !
ctx->current->layout)
19076 layout =
ctx->current->layout;
19112 NK_ASSERT(
ctx->current);
19113 NK_ASSERT(
ctx->current->layout);
19114 if (!
ctx || !
ctx->current || !
ctx->current->layout)
19117 win =
ctx->current;
19147 NK_ASSERT(
ctx->current);
19148 NK_ASSERT(
ctx->current->layout);
19149 if (!
ctx || !
ctx->current || !
ctx->current->layout)
19152 win =
ctx->current;
19164 NK_ASSERT(
ctx->current);
19165 NK_ASSERT(
ctx->current->layout);
19166 if (!
ctx || !
ctx->current || !
ctx->current->layout)
19169 win =
ctx->current;
19178 float total_space,
int columns)
19180 float panel_padding;
19181 float panel_spacing;
19188 padding = nk_panel_get_padding(style,
type);
19191 panel_padding = 2 * padding.
x;
19192 panel_spacing = (float)
NK_MAX(columns - 1, 0) * spacing.x;
19193 panel_space = total_space - panel_padding - panel_spacing;
19194 return panel_space;
19209 NK_ASSERT(
ctx->current);
19210 NK_ASSERT(
ctx->current->layout);
19211 if (!
ctx || !
ctx->current || !
ctx->current->layout)
19216 style = &
ctx->style;
19242 background.x = win->
bounds.
x;
19243 background.w = win->
bounds.
w;
19244 background.y = layout->
at_y - 1.0f;
19245 background.h = layout->
row.
height + 1.0f;
19257 NK_ASSERT(
ctx->current);
19258 NK_ASSERT(
ctx->current->layout);
19259 if (!
ctx || !
ctx->current || !
ctx->current->layout)
19262 win =
ctx->current;
19263 nk_panel_layout(
ctx, win,
height, cols);
19279 NK_ASSERT(pixel_width);
19280 if (!
ctx || !
ctx->current || !
ctx->current->layout)
return 0;
19281 win =
ctx->current;
19299 float row_height,
int cols)
19305 NK_ASSERT(
ctx->current);
19306 NK_ASSERT(
ctx->current->layout);
19307 if (!
ctx || !
ctx->current || !
ctx->current->layout)
19310 win =
ctx->current;
19312 nk_panel_layout(
ctx, win, row_height, cols);
19331 NK_ASSERT(
ctx->current);
19332 NK_ASSERT(
ctx->current->layout);
19333 if (!
ctx || !
ctx->current || !
ctx->current->layout)
19336 win =
ctx->current;
19343 float ratio = ratio_or_width;
19344 if ((ratio + layout->
row.
filled) > 1.0f)
return;
19358 NK_ASSERT(
ctx->current);
19359 NK_ASSERT(
ctx->current->layout);
19360 if (!
ctx || !
ctx->current || !
ctx->current->layout)
19363 win =
ctx->current;
19374 float height,
int cols,
const float *ratio)
19382 NK_ASSERT(
ctx->current);
19383 NK_ASSERT(
ctx->current->layout);
19384 if (!
ctx || !
ctx->current || !
ctx->current->layout)
19387 win =
ctx->current;
19389 nk_panel_layout(
ctx, win,
height, cols);
19394 for (i = 0; i < cols; ++i) {
19395 if (ratio[i] < 0.0
f)
19397 else r += ratio[i];
19401 layout->
row.
item_width = (
r > 0 && n_undef > 0) ? (
r / (
float)n_undef):0;
19419 NK_ASSERT(
ctx->current);
19420 NK_ASSERT(
ctx->current->layout);
19421 if (!
ctx || !
ctx->current || !
ctx->current->layout)
19424 win =
ctx->current;
19447 NK_ASSERT(
ctx->current);
19448 NK_ASSERT(
ctx->current->layout);
19449 if (!
ctx || !
ctx->current || !
ctx->current->layout)
19452 win =
ctx->current;
19468 NK_ASSERT(
ctx->current);
19469 NK_ASSERT(
ctx->current->layout);
19470 if (!
ctx || !
ctx->current || !
ctx->current->layout)
19473 win =
ctx->current;
19489 NK_ASSERT(
ctx->current);
19490 NK_ASSERT(
ctx->current->layout);
19491 if (!
ctx || !
ctx->current || !
ctx->current->layout)
19494 win =
ctx->current;
19510 int variable_count = 0;
19511 int min_variable_count = 0;
19512 float min_fixed_width = 0.0f;
19513 float total_fixed_width = 0.0f;
19514 float max_variable_width = 0.0f;
19517 NK_ASSERT(
ctx->current);
19518 NK_ASSERT(
ctx->current->layout);
19519 if (!
ctx || !
ctx->current || !
ctx->current->layout)
19522 win =
ctx->current;
19529 total_fixed_width +=
width;
19530 min_fixed_width +=
width;
19531 }
else if (
width < -1.0
f) {
19533 total_fixed_width +=
width;
19534 max_variable_width =
NK_MAX(max_variable_width,
width);
19537 min_variable_count++;
19541 if (variable_count) {
19542 float space = nk_layout_row_calculate_usable_space(&
ctx->style, layout->
type,
19544 float var_width = (
NK_MAX(space-min_fixed_width,0.0
f)) / (
float)variable_count;
19545 int enough_space = var_width >= max_variable_width;
19547 var_width = (
NK_MAX(space-total_fixed_width,0)) / (
float)min_variable_count;
19557 float height,
int widget_count)
19563 NK_ASSERT(
ctx->current);
19564 NK_ASSERT(
ctx->current->layout);
19565 if (!
ctx || !
ctx->current || !
ctx->current->layout)
19568 win =
ctx->current;
19570 nk_panel_layout(
ctx, win,
height, widget_count);
19588 NK_ASSERT(
ctx->current);
19589 NK_ASSERT(
ctx->current->layout);
19590 if (!
ctx || !
ctx->current || !
ctx->current->layout)
19593 win =
ctx->current;
19608 NK_ASSERT(
ctx->current);
19609 NK_ASSERT(
ctx->current->layout);
19610 if (!
ctx || !
ctx->current || !
ctx->current->layout)
19613 win =
ctx->current;
19626 NK_ASSERT(
ctx->current);
19627 NK_ASSERT(
ctx->current->layout);
19628 win =
ctx->current;
19631 ret.x = layout->
clip.
x;
19632 ret.y = layout->
clip.
y;
19633 ret.w = layout->
clip.
w;
19646 NK_ASSERT(
ctx->current);
19647 NK_ASSERT(
ctx->current->layout);
19648 win =
ctx->current;
19651 ret.x = layout->
at_x;
19652 ret.y = layout->
at_y;
19665 NK_ASSERT(
ctx->current);
19666 NK_ASSERT(
ctx->current->layout);
19667 win =
ctx->current;
19682 NK_ASSERT(
ctx->current);
19683 NK_ASSERT(
ctx->current->layout);
19684 win =
ctx->current;
19699 NK_ASSERT(
ctx->current);
19700 NK_ASSERT(
ctx->current->layout);
19701 win =
ctx->current;
19716 NK_ASSERT(
ctx->current);
19717 NK_ASSERT(
ctx->current->layout);
19718 win =
ctx->current;
19730 struct nk_vec2 spacing =
ctx->style.window.spacing;
19731 const float row_height = layout->
row.
height - spacing.
y;
19732 nk_panel_layout(
ctx, win, row_height, layout->
row.
columns);
19745 float item_offset = 0;
19746 float item_width = 0;
19747 float item_spacing = 0;
19748 float panel_space = 0;
19751 NK_ASSERT(
ctx->current);
19752 NK_ASSERT(
ctx->current->layout);
19753 if (!
ctx || !
ctx->current || !
ctx->current->layout)
19756 win =
ctx->current;
19758 style = &
ctx->style;
19762 padding = nk_panel_get_padding(style, layout->
type);
19763 panel_space = nk_layout_row_calculate_usable_space(&
ctx->style, layout->
type,
19771 item_offset = (
float)layout->
row.
index * item_width;
19772 item_spacing = (float)layout->
row.
index * spacing.x;
19803 item_spacing = (
float)layout->
row.
index * spacing.x;
19804 item_width = (ratio * panel_space);
19815 item_offset = (float)layout->
row.
index * item_width;
19816 item_spacing = (
float)layout->
row.
index * spacing.x;
19822 item_spacing = (float)layout->
row.
index * spacing.x;
19829 if (((bounds->
x + bounds->
w) > layout->
max_x) && modify)
19830 layout->
max_x = (bounds->
x + bounds->
w);
19839 item_spacing = (float)layout->
row.
index * spacing.x;
19850 item_spacing = (float)layout->
row.
index * spacing.x;
19853 default: NK_ASSERT(0);
break;
19857 bounds->
w = item_width;
19860 bounds->
x = layout->
at_x + item_offset + item_spacing + padding.
x;
19861 if (((bounds->
x + bounds->
w) > layout->
max_x) && modify)
19862 layout->
max_x = bounds->
x + bounds->
w;
19873 NK_ASSERT(
ctx->current);
19874 NK_ASSERT(
ctx->current->layout);
19875 if (!
ctx || !
ctx->current || !
ctx->current->layout)
19879 win =
ctx->current;
19882 nk_panel_alloc_row(
ctx, win);
19898 NK_ASSERT(
ctx->current);
19899 NK_ASSERT(
ctx->current->layout);
19900 if (!
ctx || !
ctx->current || !
ctx->current->layout)
19903 win =
ctx->current;
19930 struct nk_rect header = {0,0,0,0};
19931 struct nk_rect sym = {0,0,0,0};
19938 NK_ASSERT(
ctx->current);
19939 NK_ASSERT(
ctx->current->layout);
19940 if (!
ctx || !
ctx->current || !
ctx->current->layout)
19944 win =
ctx->current;
19947 style = &
ctx->style;
19961 text.background =
nk_rgba(0,0,0,0);
19963 text.background = background->
data.
color;
19998 sym.
x = sym.
x + sym.
w + 4 * item_spacing.x;
20005 header.
w =
NK_MAX(header.
w, sym.
w + item_spacing.x);
20006 label.x = sym.
x + sym.
w + item_spacing.x;
20028 const char *hash,
int len,
int line)
20040 state = nk_find_value(win, tree_hash);
20042 state = nk_add_value(
ctx, win, tree_hash, 0);
20043 *
state = initial_state;
20051 {
return nk_tree_state_base(
ctx,
type, 0, title,
state);}
20065 NK_ASSERT(
ctx->current);
20066 NK_ASSERT(
ctx->current->layout);
20067 if (!
ctx || !
ctx->current || !
ctx->current->layout)
20070 win =
ctx->current;
20072 layout->
at_x -=
ctx->style.tab.indent +
ctx->style.window.padding.x;
20073 layout->
bounds.
w +=
ctx->style.tab.indent +
ctx->style.window.padding.x;
20081 const char *hash,
int len,
int line)
20082 {
return nk_tree_base(
ctx,
type, 0, title, initial_state, hash,
len, line);}
20087 const char *hash,
int len,
int seed)
20088 {
return nk_tree_base(
ctx,
type, &
img, title, initial_state, hash,
len, seed);}
20104 NK_ASSERT(
ctx->current);
20105 if (!
ctx || !
ctx->current)
20107 nk_layout_peek(&bounds,
ctx);
20116 NK_ASSERT(
ctx->current);
20117 if (!
ctx || !
ctx->current)
20120 nk_layout_peek(&bounds,
ctx);
20129 NK_ASSERT(
ctx->current);
20130 if (!
ctx || !
ctx->current)
20133 nk_layout_peek(&bounds,
ctx);
20142 NK_ASSERT(
ctx->current);
20143 if (!
ctx || !
ctx->current)
20146 nk_layout_peek(&bounds,
ctx);
20155 NK_ASSERT(
ctx->current);
20156 if (!
ctx || !
ctx->current)
20159 nk_layout_peek(&bounds,
ctx);
20169 NK_ASSERT(
ctx->current);
20170 if (!
ctx || !
ctx->current ||
ctx->active !=
ctx->current)
20173 c =
ctx->current->layout->clip;
20174 c.x = (float)((
int)
c.x);
20175 c.y = (float)((
int)
c.y);
20176 c.w = (float)((
int)
c.w);
20177 c.h = (float)((
int)
c.h);
20179 nk_layout_peek(&bounds,
ctx);
20180 nk_unify(&
v, &
c, bounds.
x, bounds.
y, bounds.
x + bounds.
w, bounds.
y + bounds.
h);
20192 NK_ASSERT(
ctx->current);
20193 if (!
ctx || !
ctx->current ||
ctx->active !=
ctx->current)
20196 c =
ctx->current->layout->clip;
20197 c.x = (float)((
int)
c.x);
20198 c.y = (float)((
int)
c.y);
20199 c.w = (float)((
int)
c.w);
20200 c.h = (float)((
int)
c.h);
20202 nk_layout_peek(&bounds,
ctx);
20203 nk_unify(&
v, &
c, bounds.
x, bounds.
y, bounds.
x + bounds.
w, bounds.
y + bounds.
h);
20215 NK_ASSERT(
ctx->current);
20216 if (!
ctx || !
ctx->current ||
ctx->active !=
ctx->current)
20219 c =
ctx->current->layout->clip;
20220 c.x = (float)((
int)
c.x);
20221 c.y = (float)((
int)
c.y);
20222 c.w = (float)((
int)
c.w);
20223 c.h = (float)((
int)
c.h);
20225 nk_layout_peek(&bounds,
ctx);
20226 nk_unify(&
v, &
c, bounds.
x, bounds.
y, bounds.
x + bounds.
w, bounds.
y + bounds.
h);
20241 NK_ASSERT(
ctx->current);
20242 NK_ASSERT(
ctx->current->layout);
20243 if (!
ctx || !
ctx->current || !
ctx->current->layout)
20247 nk_panel_alloc_space(bounds,
ctx);
20248 win =
ctx->current;
20263 bounds->
x = (float)((
int)bounds->
x);
20264 bounds->
y = (float)((
int)bounds->
y);
20265 bounds->
w = (float)((
int)bounds->
w);
20266 bounds->
h = (float)((
int)bounds->
h);
20268 c.x = (float)((
int)
c.x);
20269 c.y = (float)((
int)
c.y);
20270 c.w = (float)((
int)
c.w);
20271 c.h = (float)((
int)
c.h);
20273 nk_unify(&
v, &
c, bounds->
x, bounds->
y, bounds->
x + bounds->
w, bounds->
y + bounds->
h);
20290 struct nk_vec2 panel_padding;
20293 NK_ASSERT(
ctx->current);
20294 NK_ASSERT(
ctx->current->layout);
20295 if (!
ctx || !
ctx->current || !
ctx->current->layout)
20298 win =
ctx->current;
20299 style = &
ctx->style;
20303 panel_padding = nk_panel_get_padding(style, layout->
type);
20305 bounds->
w += panel_padding.x;
20306 bounds->
x -= panel_padding.x;
20307 }
else bounds->
x -= item_padding.
x;
20310 bounds->
w += panel_padding.x;
20311 else bounds->
w += item_padding.
x;
20326 int i,
index, rows;
20329 NK_ASSERT(
ctx->current);
20330 NK_ASSERT(
ctx->current->layout);
20331 if (!
ctx || !
ctx->current || !
ctx->current->layout)
20335 win =
ctx->current;
20340 for (i = 0; i < rows; ++i)
20341 nk_panel_alloc_row(
ctx, win);
20347 for (i = 0; i < cols; ++i)
20348 nk_panel_alloc_space(&none,
ctx);
20370 NK_ASSERT(
ctx->current);
20371 NK_ASSERT(
ctx->current->layout);
20372 if (!
ctx || !
ctx->current || !
ctx->current->layout)
return;
20374 win =
ctx->current;
20375 style = &
ctx->style;
20376 nk_panel_alloc_space(&bounds,
ctx);
20383 nk_widget_text(&win->
buffer, bounds,
str,
len, &text, alignment, style->
font);
20398 NK_ASSERT(
ctx->current);
20399 NK_ASSERT(
ctx->current->layout);
20400 if (!
ctx || !
ctx->current || !
ctx->current->layout)
return;
20402 win =
ctx->current;
20403 style = &
ctx->style;
20404 nk_panel_alloc_space(&bounds,
ctx);
20414 #ifdef NK_INCLUDE_STANDARD_VARARGS 20421 va_start(
args, fmt);
20429 const char *fmt, ...)
20433 va_start(
args, fmt);
20444 va_start(
args, fmt);
20451 nk_labelf_wrap(
struct nk_context *
ctx,
const char *fmt,...)
20455 va_start(
args, fmt);
20476 double double_value = (double)
value;
20482 {nk_labelf(
ctx,
NK_TEXT_LEFT,
"%s: (%d, %d, %d, %d)",
p,
c.r,
c.g,
c.b,
c.a);}
20489 p,
c[0],
c[1],
c[2],
c[3]);
20541 NK_ASSERT(
ctx->current);
20542 NK_ASSERT(
ctx->current->layout);
20543 if (!
ctx || !
ctx->current || !
ctx->current->layout)
return;
20545 win =
ctx->current;
20560 ctx->button_behavior = behavior;
20566 struct nk_config_stack_button_behavior *button_stack;
20567 struct nk_config_stack_button_behavior_element *element;
20570 if (!
ctx)
return 0;
20572 button_stack = &
ctx->stacks.button_behaviors;
20573 NK_ASSERT(button_stack->head < (
int)
NK_LEN(button_stack->elements));
20574 if (button_stack->head >= (
int)
NK_LEN(button_stack->elements))
20577 element = &button_stack->elements[button_stack->head++];
20578 element->address = &
ctx->button_behavior;
20579 element->old_value =
ctx->button_behavior;
20580 ctx->button_behavior = behavior;
20587 struct nk_config_stack_button_behavior *button_stack;
20588 struct nk_config_stack_button_behavior_element *element;
20591 if (!
ctx)
return 0;
20593 button_stack = &
ctx->stacks.button_behaviors;
20594 NK_ASSERT(button_stack->head > 0);
20595 if (button_stack->head < 1)
20598 element = &button_stack->elements[--button_stack->head];
20599 *element->address = element->old_value;
20616 NK_ASSERT(
ctx->current);
20617 NK_ASSERT(
ctx->current->layout);
20618 if (!style || !
ctx || !
ctx->current || !
ctx->current->layout)
return 0;
20620 win =
ctx->current;
20624 if (!
state)
return 0;
20626 return nk_do_button_text(&
ctx->last_widget_state, &win->
buffer, bounds,
20628 style,
in,
ctx->style.font);
20635 if (!
ctx)
return 0;
20660 NK_ASSERT(
ctx->current);
20661 NK_ASSERT(
ctx->current->layout);
20662 if (!
ctx || !
ctx->current || !
ctx->current->layout)
20665 win =
ctx->current;
20669 if (!
state)
return 0;
20676 ret = nk_do_button(&
ctx->last_widget_state, &win->
buffer, bounds,
20678 nk_draw_button(&win->
buffer, &bounds,
ctx->last_widget_state, &
button);
20694 NK_ASSERT(
ctx->current);
20695 NK_ASSERT(
ctx->current->layout);
20696 if (!
ctx || !
ctx->current || !
ctx->current->layout)
20699 win =
ctx->current;
20702 if (!
state)
return 0;
20704 return nk_do_button_symbol(&
ctx->last_widget_state, &win->
buffer, bounds,
20705 symbol,
ctx->button_behavior, style,
in,
ctx->style.font);
20712 if (!
ctx)
return 0;
20728 NK_ASSERT(
ctx->current);
20729 NK_ASSERT(
ctx->current->layout);
20730 if (!
ctx || !
ctx->current || !
ctx->current->layout)
20733 win =
ctx->current;
20737 if (!
state)
return 0;
20739 return nk_do_button_image(&
ctx->last_widget_state, &win->
buffer, bounds,
20740 img,
ctx->button_behavior, style,
in);
20747 if (!
ctx)
return 0;
20764 NK_ASSERT(
ctx->current);
20765 NK_ASSERT(
ctx->current->layout);
20766 if (!
ctx || !
ctx->current || !
ctx->current->layout)
20769 win =
ctx->current;
20773 if (!
state)
return 0;
20775 return nk_do_button_text_symbol(&
ctx->last_widget_state, &win->
buffer, bounds,
20777 style,
ctx->style.font,
in);
20785 if (!
ctx)
return 0;
20811 NK_ASSERT(
ctx->current);
20812 NK_ASSERT(
ctx->current->layout);
20813 if (!
ctx || !
ctx->current || !
ctx->current->layout)
20816 win =
ctx->current;
20820 if (!
state)
return 0;
20822 return nk_do_button_text_image(&
ctx->last_widget_state, &win->
buffer,
20824 style,
ctx->style.font,
in);
20861 NK_ASSERT(
ctx->current);
20862 NK_ASSERT(
ctx->current->layout);
20866 win =
ctx->current;
20868 style = &
ctx->style;
20871 if (!
state)
return 0;
20873 return nk_do_selectable(&
ctx->last_widget_state, &win->
buffer, bounds,
20891 NK_ASSERT(
ctx->current);
20892 NK_ASSERT(
ctx->current->layout);
20896 win =
ctx->current;
20898 style = &
ctx->style;
20901 if (!
state)
return 0;
20903 return nk_do_selectable_image(&
ctx->last_widget_state, &win->
buffer, bounds,
20946 NK_ASSERT(
ctx->current);
20947 NK_ASSERT(
ctx->current->layout);
20948 if (!
ctx || !
ctx->current || !
ctx->current->layout)
20951 win =
ctx->current;
20952 style = &
ctx->style;
20956 if (!
state)
return active;
20958 nk_do_toggle(&
ctx->last_widget_state, &win->
buffer, bounds, &active,
20985 if (!
ctx || !text || !active)
return 0;
20988 return old_val != *active;
20999 if (!
ctx || !text || !
flags)
return 0;
21041 NK_ASSERT(
ctx->current);
21042 NK_ASSERT(
ctx->current->layout);
21043 if (!
ctx || !
ctx->current || !
ctx->current->layout)
21046 win =
ctx->current;
21047 style = &
ctx->style;
21053 nk_do_toggle(&
ctx->last_widget_state, &win->
buffer, bounds, &is_active,
21065 if (!
ctx || !text || !active)
return 0;
21066 old_value = *active;
21068 return old_value != *active;
21099 NK_ASSERT(
ctx->current);
21100 NK_ASSERT(
ctx->current->layout);
21105 win =
ctx->current;
21106 style = &
ctx->style;
21110 if (!
state)
return ret;
21113 old_value = *
value;
21114 *
value = nk_do_slider(&
ctx->last_widget_state, &win->
buffer, bounds, min_value,
21115 old_value, max_value, value_step, &style->
slider,
in, style->
font);
21116 return (old_value > *
value || old_value < *
value);
21162 NK_ASSERT(
ctx->current);
21163 NK_ASSERT(
ctx->current->layout);
21164 if (!
ctx || !
ctx->current || !
ctx->current->layout || !
cur)
21167 win =
ctx->current;
21168 style = &
ctx->style;
21171 if (!
state)
return 0;
21175 *
cur = nk_do_progress(&
ctx->last_widget_state, &win->
buffer, bounds,
21177 return (*
cur != old_value);
21195 NK_ASSERT(
ctx->current);
21196 if (!
ctx || !
ctx->current)
return;
21198 win =
ctx->current;
21211 NK_ASSERT(
ctx->current);
21212 if (!
ctx || !
ctx->current)
return;
21214 win =
ctx->current;
21231 if (!
ctx || !memory || !
len)
21235 win =
ctx->current;
21264 *
len = (int)
edit->string.buffer.allocated;
21289 unsigned char prev_state;
21295 NK_ASSERT(
ctx->current);
21296 NK_ASSERT(
ctx->current->layout);
21297 if (!
ctx || !
ctx->current || !
ctx->current->layout)
21300 win =
ctx->current;
21301 style = &
ctx->style;
21322 prev_state = (
unsigned char)edit->
active;
21324 ret_flags = nk_do_edit(&
ctx->last_widget_state, &win->
buffer, bounds,
flags,
21333 }
else if (prev_state && !edit->
active) {
21357 nk_property_variant_int(int
value, int min_value, int max_value, int step)
21359 struct nk_property_variant
result;
21360 result.kind = NK_PROPERTY_INT;
21362 result.min_value.i = min_value;
21363 result.max_value.i = max_value;
21369 nk_property_variant_float(float
value, float min_value, float max_value, float step)
21371 struct nk_property_variant
result;
21372 result.kind = NK_PROPERTY_FLOAT;
21374 result.min_value.f = min_value;
21375 result.max_value.f = max_value;
21381 nk_property_variant_double(double
value, double min_value, double max_value,
21384 struct nk_property_variant
result;
21385 result.kind = NK_PROPERTY_DOUBLE;
21387 result.min_value.d = min_value;
21388 result.max_value.d = max_value;
21394 nk_property(
struct nk_context *
ctx,
const char *
name,
struct nk_property_variant *variant,
21395 float inc_per_pixel,
const enum nk_property_filter
filter)
21410 int *select_begin = 0;
21411 int *select_end = 0;
21415 int dummy_state = NK_PROPERTY_DEFAULT;
21416 int dummy_length = 0;
21417 int dummy_cursor = 0;
21418 int dummy_select_begin = 0;
21419 int dummy_select_end = 0;
21422 NK_ASSERT(
ctx->current);
21423 NK_ASSERT(
ctx->current->layout);
21424 if (!
ctx || !
ctx->current || !
ctx->current->layout)
21427 win =
ctx->current;
21429 style = &
ctx->style;
21434 if (
name[0] ==
'#') {
21449 len = &dummy_length;
21450 cursor = &dummy_cursor;
21451 state = &dummy_state;
21452 select_begin = &dummy_select_begin;
21453 select_end = &dummy_select_end;
21457 old_state = *
state;
21458 ctx->text_edit.clip =
ctx->clip;
21461 nk_do_property(&
ctx->last_widget_state, &win->
buffer, bounds,
name,
21462 variant, inc_per_pixel,
buffer,
len,
state, cursor, select_begin,
21464 ctx->button_behavior);
21476 if (*
state == NK_PROPERTY_DRAG) {
21482 if (*
state == NK_PROPERTY_DEFAULT && old_state != NK_PROPERTY_DEFAULT) {
21483 if (old_state == NK_PROPERTY_DRAG) {
21496 int min,
int *
val,
int max,
int step,
float inc_per_pixel)
21498 struct nk_property_variant variant;
21504 variant = nk_property_variant_int(*
val, min, max, step);
21505 nk_property(
ctx,
name, &variant, inc_per_pixel, NK_FILTER_INT);
21506 *
val = variant.value.i;
21511 float min,
float *
val,
float max,
float step,
float inc_per_pixel)
21513 struct nk_property_variant variant;
21519 variant = nk_property_variant_float(*
val, min, max, step);
21520 nk_property(
ctx,
name, &variant, inc_per_pixel, NK_FILTER_FLOAT);
21521 *
val = variant.value.f;
21526 double min,
double *
val,
double max,
double step,
float inc_per_pixel)
21528 struct nk_property_variant variant;
21534 variant = nk_property_variant_double(*
val, min, max, step);
21535 nk_property(
ctx,
name, &variant, inc_per_pixel, NK_FILTER_FLOAT);
21536 *
val = variant.value.d;
21541 int max,
int step,
float inc_per_pixel)
21543 struct nk_property_variant variant;
21548 variant = nk_property_variant_int(
val, min, max, step);
21549 nk_property(
ctx,
name, &variant, inc_per_pixel, NK_FILTER_INT);
21550 val = variant.value.i;
21556 float val,
float max,
float step,
float inc_per_pixel)
21558 struct nk_property_variant variant;
21563 variant = nk_property_variant_float(
val, min, max, step);
21564 nk_property(
ctx,
name, &variant, inc_per_pixel, NK_FILTER_FLOAT);
21565 val = variant.value.f;
21571 double val,
double max,
double step,
float inc_per_pixel)
21573 struct nk_property_variant variant;
21578 variant = nk_property_variant_double(
val, min, max, step);
21579 nk_property(
ctx,
name, &variant, inc_per_pixel, NK_FILTER_FLOAT);
21580 val = variant.value.d;
21603 NK_ASSERT(
ctx->current);
21604 NK_ASSERT(
ctx->current->layout);
21608 win =
ctx->current;
21612 if (!
state)
return 0;
21614 return nk_do_color_picker(&
ctx->last_widget_state, &win->
buffer,
color, fmt, bounds,
21634 int count,
float min_value,
float max_value)
21642 struct nk_rect bounds = {0, 0, 0, 0};
21645 NK_ASSERT(
ctx->current);
21646 NK_ASSERT(
ctx->current->layout);
21648 if (!
ctx || !
ctx->current || !
ctx->current->layout)
return 0;
21650 chart = &
ctx->current->layout->chart;
21651 nk_zero(chart,
sizeof(*chart));
21655 win =
ctx->current;
21661 nk_zero(chart,
sizeof(*chart));
21675 slot->
min =
NK_MIN(min_value, max_value);
21676 slot->
max =
NK_MAX(min_value, max_value);
21693 int count,
float min_value,
float max_value)
21699 int count,
float min_value,
float max_value)
21702 NK_ASSERT(
ctx->current);
21703 NK_ASSERT(
ctx->current->layout);
21705 if (!
ctx || !
ctx->current || !
ctx->current->layout)
return;
21709 {
struct nk_chart *chart = &
ctx->current->layout->chart;
21715 slot->
min =
NK_MIN(min_value, max_value);
21716 slot->
max =
NK_MAX(min_value, max_value);
21722 int count,
float min_value,
float max_value)
21742 step =
g->w / (float)
g->slots[slot].count;
21743 range =
g->slots[slot].max -
g->slots[slot].min;
21746 if (
g->slots[slot].index == 0) {
21748 g->slots[slot].last.x =
g->x;
21749 g->slots[slot].last.y = (
g->y +
g->h) - ratio * (
float)
g->h;
21751 bounds.
x =
g->slots[slot].last.x - 2;
21752 bounds.
y =
g->slots[slot].last.y - 2;
21753 bounds.
w = bounds.
h = 4;
21755 color =
g->slots[slot].color;
21761 color =
g->slots[slot].highlight;
21764 g->slots[slot].index += 1;
21769 color =
g->slots[slot].color;
21770 cur.x =
g->x + (float)(step * (
float)
g->slots[slot].index);
21771 cur.y = (
g->y +
g->h) - (ratio * (
float)
g->h);
21774 bounds.
x =
cur.x - 3;
21775 bounds.
y =
cur.y - 3;
21776 bounds.
w = bounds.
h = 6;
21784 color =
g->slots[slot].highlight;
21790 g->slots[slot].last.x =
cur.x;
21791 g->slots[slot].last.y =
cur.y;
21792 g->slots[slot].index += 1;
21807 struct nk_rect item = {0,0,0,0};
21813 float padding = (float)(chart->
slots[slot].
count-1);
21814 item.
w = (chart->
w - padding) / (
float)(chart->
slots[slot].
count);
21822 item.
y = (chart->
y + chart->
h) - chart->
h * ratio;
21825 item.
y = chart->
y + (chart->
h *
NK_ABS(ratio)) - item.
h;
21827 item.
x = chart->
x + ((float)chart->
slots[slot].
index * item.
w);
21850 NK_ASSERT(
ctx->current);
21852 NK_ASSERT(slot < ctx->current->layout->chart.slot);
21854 if (slot >=
ctx->current->layout->chart.slot)
return nk_false;
21856 win =
ctx->current;
21881 NK_ASSERT(
ctx->current);
21882 if (!
ctx || !
ctx->current)
21885 win =
ctx->current;
21887 NK_MEMSET(chart, 0,
sizeof(*chart));
21905 for (i = 0; i <
count; ++i) {
21911 for (i = 0; i <
count; ++i)
21926 NK_ASSERT(value_getter);
21927 if (!
ctx || !value_getter || !
count)
return;
21929 max_value = min_value = value_getter(userdata,
offset);
21930 for (i = 0; i <
count; ++i) {
21931 float value = value_getter(userdata, i +
offset);
21937 for (i = 0; i <
count; ++i)
21956 win =
ctx->current;
21967 nk_zero(&panel,
sizeof(panel));
21968 panel.bounds = bounds;
21969 panel.flags =
flags;
21970 panel.scrollbar.x = *x_offset;
21971 panel.scrollbar.y = *y_offset;
21972 panel.buffer = win->
buffer;
21973 panel.layout = (
struct nk_panel*)nk_create_panel(
ctx);
21974 ctx->current = &panel;
21977 win->
buffer = panel.buffer;
21979 panel.layout->offset_x = x_offset;
21980 panel.layout->offset_y = y_offset;
21981 panel.layout->parent = win->
layout;
21982 win->
layout = panel.layout;
21984 ctx->current = win;
22007 struct nk_vec2 panel_padding;
22010 NK_ASSERT(
ctx->current);
22011 if (!
ctx || !
ctx->current)
22015 NK_ASSERT(
ctx->current);
22016 win =
ctx->current;
22019 NK_ASSERT(
g->parent);
22025 pan.bounds.y =
g->bounds.y - (
g->header_height +
g->menu.h);
22026 pan.bounds.x =
g->bounds.x - panel_padding.x;
22027 pan.bounds.w =
g->bounds.w + 2 * panel_padding.x;
22028 pan.bounds.h =
g->bounds.h +
g->header_height +
g->menu.h;
22030 pan.bounds.x -=
g->border;
22031 pan.bounds.y -=
g->border;
22032 pan.bounds.w += 2*
g->border;
22033 pan.bounds.h += 2*
g->border;
22036 pan.bounds.w +=
ctx->style.window.scrollbar_size.x;
22037 pan.bounds.h +=
ctx->style.window.scrollbar_size.y;
22039 pan.scrollbar.x = *
g->offset_x;
22040 pan.scrollbar.y = *
g->offset_y;
22041 pan.flags =
g->flags;
22042 pan.buffer = win->
buffer;
22045 ctx->current = &pan;
22048 nk_unify(&clip, &parent->
clip, pan.bounds.
x, pan.bounds.y,
22049 pan.bounds.x + pan.bounds.w, pan.bounds.y + pan.bounds.h + panel_padding.x);
22053 win->
buffer = pan.buffer;
22055 ctx->current = win;
22077 NK_ASSERT(
ctx->current);
22078 NK_ASSERT(
ctx->current->layout);
22079 if (!
ctx || !
ctx->current || !
ctx->current->layout || !title)
22083 win =
ctx->current;
22086 x_offset = nk_find_value(win, title_hash);
22088 x_offset = nk_add_value(
ctx, win, title_hash, 0);
22089 y_offset = nk_add_value(
ctx, win, title_hash+1, 0);
22091 NK_ASSERT(x_offset);
22092 NK_ASSERT(y_offset);
22093 if (!x_offset || !y_offset)
return 0;
22094 *x_offset = *y_offset = 0;
22095 }
else y_offset = nk_find_value(win, title_hash+1);
22105 const char *title,
nk_flags flags,
int row_height,
int row_count)
22121 if (!
ctx || !view || !title)
return 0;
22123 win =
ctx->current;
22124 style = &
ctx->style;
22126 row_height +=
NK_MAX(0, (
int)item_spacing.y);
22131 x_offset = nk_find_value(win, title_hash);
22133 x_offset = nk_add_value(
ctx, win, title_hash, 0);
22134 y_offset = nk_add_value(
ctx, win, title_hash+1, 0);
22136 NK_ASSERT(x_offset);
22137 NK_ASSERT(y_offset);
22138 if (!x_offset || !y_offset)
return 0;
22139 *x_offset = *y_offset = 0;
22140 }
else y_offset = nk_find_value(win, title_hash+1);
22146 win =
ctx->current;
22151 view->
count = (int)
NK_MAX(nk_iceilf((layout->
clip.
h)/(float)row_height), 0);
22165 NK_ASSERT(view->
ctx);
22167 if (!view || !view->
ctx)
return;
22170 win =
ctx->current;
22196 NK_ASSERT(
ctx->current);
22197 NK_ASSERT(
ctx->current->layout);
22198 if (!
ctx || !
ctx->current || !
ctx->current->layout)
22201 win =
ctx->current;
22211 popup->parent = win;
22233 popup->parent = win;
22234 popup->bounds = rect;
22243 nk_start_popup(
ctx, win);
22244 allocated =
ctx->memory.allocated;
22271 ctx->memory.allocated = allocated;
22272 ctx->current = win;
22290 NK_ASSERT(
ctx->current);
22291 NK_ASSERT(
ctx->current->layout);
22292 if (!
ctx || !
ctx->current || !
ctx->current->layout)
22296 win =
ctx->current;
22304 popup->parent = win;
22310 int pressed, in_body, in_header;
22314 if (pressed && (!in_body || in_header))
22337 NK_ASSERT(popup->
layout);
22339 nk_start_popup(
ctx, win);
22342 ctx->current = popup;
22344 nk_panel_begin(
ctx, 0, panel_type);
22365 if (!
ctx || !
ctx->current)
return;
22368 NK_ASSERT(
popup->parent);
22380 NK_ASSERT(
ctx->current);
22381 NK_ASSERT(
ctx->current->layout);
22382 if (!
ctx || !
ctx->current || !
ctx->current->layout)
22386 if (!
popup->parent)
return;
22387 win =
popup->parent;
22401 nk_finish_popup(
ctx, win);
22402 ctx->current = win;
22419 NK_ASSERT(
ctx->current);
22420 NK_ASSERT(
ctx->current->layout);
22421 if (!
ctx || !
ctx->current || !
ctx->current->layout)
22425 win =
ctx->current;
22431 bounds.
h = nk_null_rect.h;
22447 NK_ASSERT(
ctx->current);
22448 if (!
ctx || !
ctx->current)
return;
22449 ctx->current->seq--;
22465 NK_ASSERT(
ctx->current);
22466 NK_ASSERT(
ctx->current->layout);
22468 if (!
ctx || !
ctx->current || !
ctx->current->layout || !text)
22472 style = &
ctx->style;
22479 text_width += (4 * padding.x);
22480 text_height = (style->
font->
height + 2 * padding.y);
22496 struct nk_rect trigger_bounds)
22503 int is_clicked = 0;
22509 NK_ASSERT(
ctx->current);
22510 NK_ASSERT(
ctx->current->layout);
22511 if (!
ctx || !
ctx->current || !
ctx->current->layout)
22514 win =
ctx->current;
22523 if ((is_clicked && is_open && !is_active) || (!is_open && !is_active && !is_clicked))
22529 body.x =
ctx->input.mouse.pos.x;
22530 body.y =
ctx->input.mouse.pos.y;
22562 NK_ASSERT(
ctx->current);
22563 NK_ASSERT(
ctx->current->layout);
22564 if (!
ctx || !
ctx->current || !
ctx->current->layout)
22567 win =
ctx->current;
22568 style = &
ctx->style;
22573 if (nk_do_button_text(&
ctx->last_widget_state, &win->
buffer, bounds,
22596 NK_ASSERT(
ctx->current);
22597 NK_ASSERT(
ctx->current->layout);
22598 if (!
ctx || !
ctx->current || !
ctx->current->layout)
22601 win =
ctx->current;
22602 style = &
ctx->style;
22607 if (nk_do_button_text_image(&
ctx->last_widget_state, &win->
buffer, bounds,
22631 NK_ASSERT(
ctx->current);
22632 NK_ASSERT(
ctx->current->layout);
22633 if (!
ctx || !
ctx->current || !
ctx->current->layout)
22636 win =
ctx->current;
22637 style = &
ctx->style;
22642 if (nk_do_button_text_symbol(&
ctx->last_widget_state, &win->
buffer, bounds,
22658 NK_ASSERT(
ctx->current);
22659 NK_ASSERT(
ctx->current->layout);
22660 if (!
ctx || !
ctx->current || !
ctx->current->layout)
return;
22670 NK_ASSERT(
ctx->current);
22671 if (!
ctx || !
ctx->current)
return;
22673 popup =
ctx->current;
22675 NK_ASSERT(popup->
parent);
22685 struct nk_vec2 padding = nk_panel_get_padding(&
ctx->style, panel->
type);
22692 if (pressed && in_body)
22717 NK_ASSERT(
ctx->current);
22718 NK_ASSERT(
ctx->current->layout);
22719 if (!
ctx || !
ctx->current || !
ctx->current->layout)
22725 body.y = header.
y + header.
h-
ctx->style.window.combo_border;
22731 if ((is_clicked && is_open && !is_active) || (is_open && !is_active) ||
22732 (!is_open && !is_active && !is_clicked))
return 0;
22733 if (!nk_nonblock_begin(
ctx, 0,
body,
22756 NK_ASSERT(selected);
22757 NK_ASSERT(
ctx->current);
22758 NK_ASSERT(
ctx->current->layout);
22759 if (!
ctx || !
ctx->current || !
ctx->current->layout || !selected)
22762 win =
ctx->current;
22763 style = &
ctx->style;
22784 text.background =
nk_rgba(0,0,0,0);
22787 text.background = background->
data.
color;
22800 else if (is_clicked)
22826 &
ctx->style.combo.button, sym, style->
font);
22828 return nk_combo_begin(
ctx, win,
size, is_clicked, header);
22847 NK_ASSERT(
ctx->current);
22848 NK_ASSERT(
ctx->current->layout);
22849 if (!
ctx || !
ctx->current || !
ctx->current->layout)
22852 win =
ctx->current;
22853 style = &
ctx->style;
22883 else if (is_clicked)
22907 &
ctx->style.combo.button, sym, style->
font);
22909 return nk_combo_begin(
ctx, win,
size, is_clicked, header);
22927 NK_ASSERT(
ctx->current);
22928 NK_ASSERT(
ctx->current->layout);
22929 if (!
ctx || !
ctx->current || !
ctx->current->layout)
22932 win =
ctx->current;
22933 style = &
ctx->style;
22955 sym_background =
nk_rgba(0,0,0,0);
22958 sym_background = background->
data.
color;
22963 struct nk_rect bounds = {0,0,0,0};
22970 else if (is_clicked)
22990 nk_draw_symbol(&win->
buffer, symbol, bounds, sym_background, symbol_color,
22991 1.0f, style->
font);
22994 nk_draw_button_symbol(&win->
buffer, &bounds, &
content,
ctx->last_widget_state,
22995 &
ctx->style.combo.button, sym, style->
font);
22997 return nk_combo_begin(
ctx, win,
size, is_clicked, header);
23016 NK_ASSERT(
ctx->current);
23017 NK_ASSERT(
ctx->current->layout);
23018 if (!
ctx || !
ctx->current || !
ctx->current->layout)
23021 win =
ctx->current;
23022 style = &
ctx->style;
23045 text.background =
nk_rgba(0,0,0,0);
23048 text.background = background->
data.
color;
23061 else if (is_clicked)
23076 &
ctx->style.combo.button, sym, style->
font);
23083 nk_draw_symbol(&win->
buffer, symbol,
image, text.background, symbol_color,
23084 1.0f, style->
font);
23094 return nk_combo_begin(
ctx, win,
size, is_clicked, header);
23110 NK_ASSERT(
ctx->current);
23111 NK_ASSERT(
ctx->current->layout);
23112 if (!
ctx || !
ctx->current || !
ctx->current->layout)
23115 win =
ctx->current;
23116 style = &
ctx->style;
23139 struct nk_rect bounds = {0,0,0,0};
23146 else if (is_clicked)
23169 nk_draw_button_symbol(&win->
buffer, &bounds, &
content,
ctx->last_widget_state,
23170 &
ctx->style.combo.button, sym, style->
font);
23172 return nk_combo_begin(
ctx, win,
size, is_clicked, header);
23190 NK_ASSERT(
ctx->current);
23191 NK_ASSERT(
ctx->current->layout);
23192 if (!
ctx || !
ctx->current || !
ctx->current->layout)
23195 win =
ctx->current;
23196 style = &
ctx->style;
23216 text.background =
nk_rgba(0,0,0,0);
23219 text.background = background->
data.
color;
23232 else if (is_clicked)
23247 &
ctx->style.combo.button, sym, style->
font);
23264 return nk_combo_begin(
ctx, win,
size, is_clicked, header);
23286 const char *text,
nk_flags alignment)
23305 int selected,
int item_height,
struct nk_vec2 size)
23310 struct nk_vec2 window_padding;
23314 NK_ASSERT(
ctx->current);
23318 item_spacing =
ctx->style.window.spacing;
23319 window_padding = nk_panel_get_padding(&
ctx->style,
ctx->current->layout->type);
23321 max_height += (
int)item_spacing.y * 2 + (int)window_padding.y * 2;
23325 for (i = 0; i <
count; ++i) {
23336 int separator,
int selected,
int count,
int item_height,
struct nk_vec2 size)
23341 struct nk_vec2 window_padding;
23342 const char *current_item;
23347 NK_ASSERT(items_separated_by_separator);
23348 if (!
ctx || !items_separated_by_separator)
23352 item_spacing =
ctx->style.window.spacing;
23353 window_padding = nk_panel_get_padding(&
ctx->style,
ctx->current->layout->type);
23355 max_height += (
int)item_spacing.y * 2 + (int)window_padding.y * 2;
23359 current_item = items_separated_by_separator;
23360 for (i = 0; i <
count; ++i) {
23361 iter = current_item;
23362 while (*iter && *iter != separator) iter++;
23363 length = (int)(iter - current_item);
23364 if (i == selected)
break;
23365 current_item = iter + 1;
23369 current_item = items_separated_by_separator;
23371 for (i = 0; i <
count; ++i) {
23372 iter = current_item;
23373 while (*iter && *iter != separator) iter++;
23374 length = (int)(iter - current_item);
23377 current_item = current_item +
length + 1;
23391 void *userdata,
int selected,
int count,
int item_height,
struct nk_vec2 size)
23396 struct nk_vec2 window_padding;
23400 NK_ASSERT(item_getter);
23401 if (!
ctx || !item_getter)
23405 item_spacing =
ctx->style.window.spacing;
23406 window_padding = nk_panel_get_padding(&
ctx->style,
ctx->current->layout->type);
23408 max_height += (
int)item_spacing.y * 2 + (int)window_padding.y * 2;
23411 item_getter(userdata, selected, &item);
23414 for (i = 0; i <
count; ++i) {
23415 item_getter(userdata, i, &item);
23425 int *selected,
int item_height,
struct nk_vec2 size)
23433 int separator,
int *selected,
int count,
int item_height,
struct nk_vec2 size)
23438 void(*item_getter)(
void*
data,
int id,
const char **out_text),
23439 void *userdata,
int *selected,
int count,
int item_height,
struct nk_vec2 size)
23460 NK_ASSERT(
ctx->current);
23461 NK_ASSERT(
ctx->current->layout);
23462 if (!
ctx || !
ctx->current || !
ctx->current->layout)
23467 body.y = header.
y + header.
h;
23473 if ((is_clicked && is_open && !is_active) || (is_open && !is_active) ||
23474 (!is_open && !is_active && !is_clicked))
return 0;
23494 NK_ASSERT(
ctx->current);
23495 NK_ASSERT(
ctx->current->layout);
23496 if (!
ctx || !
ctx->current || !
ctx->current->layout)
23499 win =
ctx->current;
23501 if (!
state)
return 0;
23503 if (nk_do_button_text(&
ctx->last_widget_state, &win->
buffer, header,
23506 return nk_menu_begin(
ctx, win, title, is_clicked, header,
size);
23524 NK_ASSERT(
ctx->current);
23525 NK_ASSERT(
ctx->current->layout);
23526 if (!
ctx || !
ctx->current || !
ctx->current->layout)
23529 win =
ctx->current;
23531 if (!
state)
return 0;
23533 if (nk_do_button_image(&
ctx->last_widget_state, &win->
buffer, header,
23536 return nk_menu_begin(
ctx, win,
id, is_clicked, header,
size);
23550 NK_ASSERT(
ctx->current);
23551 NK_ASSERT(
ctx->current->layout);
23552 if (!
ctx || !
ctx->current || !
ctx->current->layout)
23555 win =
ctx->current;
23557 if (!
state)
return 0;
23559 if (nk_do_button_symbol(&
ctx->last_widget_state, &win->
buffer, header,
23562 return nk_menu_begin(
ctx, win,
id, is_clicked, header,
size);
23576 NK_ASSERT(
ctx->current);
23577 NK_ASSERT(
ctx->current->layout);
23578 if (!
ctx || !
ctx->current || !
ctx->current->layout)
23581 win =
ctx->current;
23583 if (!
state)
return 0;
23585 if (nk_do_button_text_image(&
ctx->last_widget_state, &win->
buffer,
23587 ctx->style.font,
in))
23589 return nk_menu_begin(
ctx, win, title, is_clicked, header,
size);
23607 NK_ASSERT(
ctx->current);
23608 NK_ASSERT(
ctx->current->layout);
23609 if (!
ctx || !
ctx->current || !
ctx->current->layout)
23612 win =
ctx->current;
23614 if (!
state)
return 0;
23617 if (nk_do_button_text_symbol(&
ctx->last_widget_state, &win->
buffer,
23620 return nk_menu_begin(
ctx, win, title, is_clicked, header,
size);
const struct nk_draw_vertex_layout_element * vertex_layout
Definition: nuklear.h:989
Definition: nuklear.h:3884
float item_width
Definition: nuklear.h:3867
NK_API void nk_chart_add_slot(struct nk_context *ctx, const enum nk_chart_type, int count, float min_value, float max_value)
NK_API void nk_buffer_mark(struct nk_buffer *, enum nk_buffer_allocation_type type)
NK_API void nk_layout_space_push(struct nk_context *, struct nk_rect)
Definition: nuklear.h:3171
Definition: nuklear.h:467
nk_button_behavior
Definition: nuklear.h:466
struct nk_font * font
Definition: nk_common.c:40
Definition: nuklear.h:2814
float min
Definition: nuklear.h:3836
nk_handle userdata
Definition: nuklear.h:3640
unsigned short line_thickness
Definition: nuklear.h:3058
struct nk_color background
Definition: nuklear.h:3115
Definition: nuklear.h:491
nk_tree_type
Definition: nuklear.h:476
nk_size size
Definition: nuklear.h:2702
NK_API void nk_textedit_redo(struct nk_text_edit *)
NK_API int nk_menu_begin_image_label(struct nk_context *, const char *, nk_flags align, struct nk_image, struct nk_vec2 size)
Definition: nuklear.h:2018
Definition: nuklear.h:3930
unsigned short w
Definition: nuklear.h:3050
struct nk_style_button menu_button
Definition: nuklear.h:3787
NK_POINTER_TYPE nk_ptr
Definition: nuklear.h:402
void(* nk_plugin_paste)(nk_handle, struct nk_text_edit *)
Definition: nuklear.h:481
NK_API char * nk_str_get(struct nk_str *)
#define NK_CHART_MAX_SLOT
Definition: nuklear.h:3814
Definition: nuklear.h:2147
NK_API int nk_input_any_mouse_click_in_rect(const struct nk_input *, struct nk_rect)
NK_API int nk_select_label(struct nk_context *, const char *, nk_flags align, int value)
NK_API int nk_window_is_closed(struct nk_context *, const char *)
Definition: nuklear.h:473
nk_handle userdata
Definition: nuklear.h:3516
NK_API int nk_str_append_str_runes(struct nk_str *, const nk_rune *)
enum nk_symbol_type inc_symbol
Definition: nuklear.h:3512
void *(* nk_plugin_alloc)(nk_handle, void *old, nk_size)
Definition: nuklear.h:478
float h
Definition: nuklear.h:3844
struct nk_style_item cursor_active
Definition: nuklear.h:3498
NK_API void nk_style_show_cursor(struct nk_context *)
NK_API void * nk_buffer_memory(struct nk_buffer *)
NK_API void nk_textedit_free(struct nk_text_edit *)
struct nk_style_item active
Definition: nuklear.h:3618
Definition: nuklear.h:3842
struct nk_page * next
Definition: nuklear.h:4118
static char * number(char *str, long num, int base, int size, int precision, int type)
Definition: kprintf.c:42
Definition: nuklear.h:3112
NK_API const struct nk_command * nk__begin(struct nk_context *)
struct nk_color border_color
Definition: nuklear.h:3619
Definition: nuklear.h:2684
Definition: nuklear.h:493
#define ftell
Definition: file_stream_transforms.h:54
unsigned circle_segment_count
Definition: nuklear.h:985
Definition: nuklear.h:2154
unsigned curve_segment_count
Definition: nuklear.h:987
nk_plugin_free free
Definition: nuklear.h:487
unsigned int scrolled
Definition: nuklear.h:3988
GLuint const GLchar * name
Definition: glext.h:6671
nk_keys
Definition: nuklear.h:660
NK_API void nk_text(struct nk_context *, const char *, int, nk_flags)
Definition: nuklear.h:2025
GLuint * ids
Definition: glext.h:6547
NK_API int nk_combo_begin_symbol_label(struct nk_context *, const char *selected, enum nk_symbol_type, struct nk_vec2 size)
NK_API int nk_str_len_char(struct nk_str *)
struct nk_style_item fixed_background
Definition: nuklear.h:3742
#define NK_INT16
Definition: nuklear.h:343
struct nk_color cursor_text_hover
Definition: nuklear.h:3592
enum nk_symbol_type sym_active
Definition: nuklear.h:3679
short x
Definition: nuklear.h:3041
NK_API int nk_group_scrolled_offset_begin(struct nk_context *, nk_uint *x_offset, nk_uint *y_offset, const char *, nk_flags)
const GLvoid * ptr
Definition: nx_glsym.h:242
struct nk_scroll scrollbar
Definition: nuklear.h:3979
float height
Definition: nuklear.h:3119
NK_UINT8 nk_uchar
Definition: nuklear.h:395
struct nk_color symbol_hover
Definition: nuklear.h:3672
#define NK_SIZE_TYPE
Definition: nuklear.h:374
NK_API int nk_strlen(const char *str)
Definition: nuklear.h:3740
struct nk_page_element * next
Definition: nuklear.h:4112
NK_API int nk_contextual_item_symbol_text(struct nk_context *, enum nk_symbol_type, const char *, int, nk_flags alignment)
const GLint * first
Definition: glext.h:6478
struct nk_style_item hover
Definition: nuklear.h:3661
Definition: nuklear.h:3086
NK_API enum nk_widget_layout_states nk_widget_fitting(struct nk_rect *, struct nk_context *, struct nk_vec2)
float w
Definition: nuklear.h:457
struct nk_color menu_border_color
Definition: nuklear.h:3749
Definition: nuklear.h:2484
Definition: nuklear.h:472
int active
Definition: nuklear.h:2680
Definition: nuklear.h:2175
GLubyte * pattern
Definition: glext.h:8454
float y
Definition: nuklear.h:457
Definition: nuklear.h:2151
Definition: nuklear.h:2157
char nk_glyph[NK_UTF_SIZE]
Definition: nuklear.h:459
NK_API int nk_strfilter(const char *text, const char *regexp)
NK_API int nk_tree_push_hashed(struct nk_context *, enum nk_tree_type, const char *title, enum nk_collapse_states initial_state, const char *hash, int len, int seed)
NK_API void nk_image(struct nk_context *, struct nk_image)
int select_start
Definition: nuklear.h:3964
NK_API int nk_filter_ascii(const struct nk_text_edit *, nk_rune unicode)
void(* draw_begin)(struct nk_command_buffer *, nk_handle)
Definition: nuklear.h:3478
NK_API void nk_fill_rect(struct nk_command_buffer *, struct nk_rect, float rounding, struct nk_color)
enum nk_allocation_type type
Definition: nuklear.h:2690
struct nk_vec2 touch_padding
Definition: nuklear.h:3437
NK_API int nk_checkbox_flags_label(struct nk_context *, const char *, unsigned int *flags, unsigned int value)
struct nk_vec2 padding
Definition: nuklear.h:3610
NK_API int nk_str_insert_str_runes(struct nk_str *, int pos, const nk_rune *)
float preferred_x
Definition: nuklear.h:2863
unsigned short h
Definition: nuklear.h:3043
NK_API void nk_menu_end(struct nk_context *)
short cy
Definition: nuklear.h:3065
static int align(int x, int n)
Definition: psp2.c:23
unsigned int seq
Definition: nuklear.h:4097
NK_API const char * nk_style_get_color_by_name(enum nk_style_colors)
unsigned short r
Definition: nuklear.h:3066
struct nk_style_item hover
Definition: nuklear.h:3420
NK_API struct nk_vec2 nk_vec2(float x, float y)
NK_API int nk_input_is_mouse_down(const struct nk_input *, enum nk_buttons)
NK_API struct nk_vec2 nk_window_get_content_region_size(struct nk_context *)
struct nk_menu_state menu
Definition: nuklear.h:3901
NK_API void nk_chart_add_slot_colored(struct nk_context *ctx, const enum nk_chart_type, struct nk_color, struct nk_color active, int count, float min_value, float max_value)
NK_API nk_hash nk_murmur_hash(const void *key, int len, nk_hash seed)
nk_style_header_align
Definition: nuklear.h:3711
#define const
Definition: zconf.h:217
NK_API int nk_str_insert_text_runes(struct nk_str *, int pos, const nk_rune *, int)
struct nk_window * parent
Definition: nuklear.h:3996
NK_API char * nk_str_at_rune(struct nk_str *, int pos, nk_rune *unicode, int *len)
NK_API int nk_slider_int(struct nk_context *, int min, int *val, int max, int step)
Definition: nuklear.h:3828
GLuint GLfloat * val
Definition: glext.h:7847
set set set set set set set macro pixldst1 op
Definition: pixman-arm-neon-asm.h:54
NK_API int nk_style_pop_vec2(struct nk_context *)
NK_API int nk_button_symbol(struct nk_context *, enum nk_symbol_type)
Definition: nuklear.h:2022
Definition: nuklear.h:1844
enum nk_style_header_align align
Definition: nuklear.h:3734
NK_API void nk_label_colored_wrap(struct nk_context *, const char *, struct nk_color)
Definition: nuklear.h:4104
Definition: nuklear.h:3417
Definition: nuklear.h:2995
#define NK_INPUT_MAX
Definition: nuklear.h:257
nk_anti_aliasing
Definition: nuklear.h:969
#define nk_vec2_len_sqr(a)
Definition: nuklear.h:4195
float y
Definition: nuklear.h:455
int columns
Definition: nuklear.h:3865
Definition: nuklear.h:456
struct nk_vec2 padding
Definition: nuklear.h:3436
NK_API int nk_button_image_text(struct nk_context *, struct nk_image img, const char *, int, nk_flags alignment)
static const unsigned char tag[MAX_TESTS *3][16]
Definition: gcm.c:696
NK_API void nk_layout_row_end(struct nk_context *)
struct nk_color border_color
Definition: nuklear.h:3395
nk_uint x
Definition: nuklear.h:463
struct nk_window * next
Definition: nuklear.h:3994
#define NK_ALIGN_PTR_BACK(x, mask)
Definition: nuklear.h:4222
NK_API void nk_color_f(float *r, float *g, float *b, float *a, struct nk_color)
struct nk_chart chart
Definition: nuklear.h:3903
NK_API int nk_selectable_label(struct nk_context *, const char *, nk_flags align, int *value)
NK_API void nk_combobox(struct nk_context *, const char **items, int count, int *selected, int item_height, struct nk_vec2 size)
nk_window_flags
Definition: nuklear.h:3916
NK_API void nk_window_set_focus(struct nk_context *, const char *name)
struct nk_config_stack_vec2 vectors
Definition: nuklear.h:4083
struct nk_color border_color
Definition: nuklear.h:3422
NK_API void nk_layout_row_template_begin(struct nk_context *, float row_height)
NK_API int nk_color_pick(struct nk_context *, struct nk_color *, enum nk_color_format)
void(* draw_end)(struct nk_command_buffer *, nk_handle)
Definition: nuklear.h:3577
float border
Definition: nuklear.h:3501
struct nk_allocator alloc
Definition: nuklear.h:4123
Definition: nuklear.h:1839
float y
Definition: nuklear.h:3885
NK_API int nk_utf_len(const char *, int byte_len)
nk_color_format
Definition: nuklear.h:473
unsigned active_con
Definition: nuklear.h:3942
Definition: nuklear.h:3972
Definition: nuklear.h:465
NK_API int nk_stricmp(const char *s1, const char *s2)
NK_API void nk_stroke_curve(struct nk_command_buffer *, float, float, float, float, float, float, float, float, float line_thickness, struct nk_color)
nk_size cap
Definition: nuklear.h:4130
Definition: nuklear.h:3380
Definition: nuklear.h:452
struct nk_style_scrollbar scrollbar
Definition: nuklear.h:3586
struct nk_command header
Definition: nuklear.h:3105
Definition: nuklear.h:2972
Definition: nuklear.h:3829
Definition: nuklear.h:453
struct nk_color text_hover
Definition: nuklear.h:3460
NK_API int nk_combo_item_image_text(struct nk_context *, struct nk_image, const char *, int, nk_flags alignment)
struct nk_style_item active
Definition: nuklear.h:3421
GLboolean GLenum GLenum GLvoid * values
Definition: glext.h:6318
NK_API void nk_buffer_init_fixed(struct nk_buffer *, void *memory, nk_size size)
struct nk_row_layout row
Definition: nuklear.h:3902
struct nk_vec2 spacing
Definition: nuklear.h:3737
struct nk_panel * parent
Definition: nuklear.h:3905
short x
Definition: nuklear.h:2999
unsigned char grab
Definition: nuklear.h:3177
NK_API int nk_filter_decimal(const struct nk_text_edit *, nk_rune unicode)
GLuint buffer
Definition: glext.h:6555
Definition: nuklear.h:2007
int down
Definition: nuklear.h:3167
Definition: nuklear.h:2004
void * ptr
Definition: nuklear.h:2684
NK_API int nk_tooltip_begin(struct nk_context *, float width)
struct nk_buffer memory
Definition: nuklear.h:4137
NK_API struct nk_vec2 nk_window_get_content_region_min(struct nk_context *)
struct nk_color text_normal
Definition: nuklear.h:3429
struct nk_vec2 clicked_pos
Definition: nuklear.h:3169
NK_API void nk_layout_row_template_push_dynamic(struct nk_context *)
Definition: nuklear.h:471
float height
Definition: nuklear.h:3863
Definition: nuklear.h:3934
NK_API int nk_style_push_float(struct nk_context *, float *, float)
Definition: nuklear.h:476
NK_API int nk_utf_decode(const char *, nk_rune *, int)
Definition: nuklear.h:3186
unsigned short w
Definition: nuklear.h:3000
NK_API struct nk_rect nk_recti(int x, int y, int w, int h)
nk_symbol_type
Definition: nuklear.h:489
NK_API void nk_end(struct nk_context *ctx)
NK_API int nk_tree_image_push_hashed(struct nk_context *, enum nk_tree_type, struct nk_image, const char *title, enum nk_collapse_states initial_state, const char *hash, int len, int seed)
Definition: nuklear.h:2827
Definition: nuklear.h:469
struct nk_vec2 scrollbar
Definition: nuklear.h:2851
NK_API int nk_button_label_styled(struct nk_context *, const struct nk_style_button *, const char *title)
struct nk_color label_normal
Definition: nuklear.h:3622
NK_API int nk_str_insert_str_char(struct nk_str *, int pos, const char *)
NK_API void nk_input_key(struct nk_context *, enum nk_keys, int down)
NK_API struct nk_color nk_rgba_u32(nk_uint)
NK_API int nk_init_fixed(struct nk_context *, void *memory, nk_size size, const struct nk_user_font *)
NK_API int nk_input_has_mouse_click_in_rect(const struct nk_input *, enum nk_buttons, struct nk_rect)
Definition: nuklear.h:2153
enum nk_symbol_type dec_symbol
Definition: nuklear.h:3572
NK_API int nk_window_is_hidden(struct nk_context *, const char *)
nk_uint * offset_x
Definition: nuklear.h:3893
float rounding
Definition: nuklear.h:3471
int sel_start
Definition: nuklear.h:3952
NK_API void nk_layout_row_template_end(struct nk_context *)
struct nk_table * prev
Definition: nuklear.h:4101
NK_API struct nk_color nk_rgba_f(float r, float g, float b, float a)
Definition: nuklear.h:2670
Definition: nuklear.h:673
struct nk_color label_hover
Definition: nuklear.h:3730
GLenum query
Definition: glext.h:8448
static int codepoint(lua_State *L)
Definition: lutf8lib.c:100
NK_API struct nk_color nk_hsva_iv(const int *hsva)
Definition: nuklear.h:2142
struct nk_style_item normal
Definition: nuklear.h:3660
return
Definition: irq.c:321
struct nk_color symbol_normal
Definition: nuklear.h:3671
struct nk_style_item pressed
Definition: nuklear.h:3451
unsigned short line_thickness
Definition: nuklear.h:2998
NK_API int nk_combo_callback(struct nk_context *, void(*item_getter)(void *, int, const char **), void *userdata, int selected, int count, int item_height, struct nk_vec2 size)
int use_pool
Definition: nuklear.h:4163
struct nk_color text
Definition: nuklear.h:3693
Definition: nuklear.h:3876
GLenum target
Definition: glext.h:7982
Definition: nuklear.h:3166
NK_API void nk_str_delete_chars(struct nk_str *, int pos, int len)
GLuint start
Definition: glext.h:6292
void(* draw_begin)(struct nk_command_buffer *, nk_handle)
Definition: nuklear.h:3517
nk_layout_format
Definition: nuklear.h:475
Definition: nuklear.h:1182
GLenum GLuint GLenum GLsizei const GLchar * buf
Definition: glext.h:8418
Definition: nuklear.h:2731
nk_size needed
Definition: nuklear.h:2664
NK_API int nk_button_text(struct nk_context *, const char *title, int len)
NK_API int nk_filter_oct(const struct nk_text_edit *, nk_rune unicode)
unsigned int table_count
Definition: nuklear.h:3991
#define NK_SCROLLBAR_HIDING_TIMEOUT
Definition: nuklear.h:263
NK_API void nk_color_hsva_b(nk_byte *h, nk_byte *s, nk_byte *v, nk_byte *a, struct nk_color)
Definition: nuklear.h:2956
NK_API struct nk_rect nk_rect(float x, float y, float w, float h)
float border
Definition: nuklear.h:3898
unsigned char padding1
Definition: nuklear.h:2862
unsigned con_old
Definition: nuklear.h:3941
float contextual_border
Definition: nuklear.h:3756
int use_clipping
Definition: nuklear.h:3132
struct nk_command header
Definition: nuklear.h:2987
NK_API int nk_str_insert_str_utf8(struct nk_str *, int pos, const char *)
enum nk_symbol_type sym_left
Definition: nuklear.h:3627
Definition: nuklear.h:2171
#define NK_MAX(a, b)
Definition: nuklear.h:316
Definition: nuklear.h:662
struct nk_page_element * freelist
Definition: nuklear.h:4169
void(* nk_plugin_copy)(nk_handle, const char *, int len)
Definition: nuklear.h:482
#define SEEK_END
Definition: zconf.h:440
NK_API int nk_filter_binary(const struct nk_text_edit *, nk_rune unicode)
GLfixed GLfixed x2
Definition: glsym_gl.h:1051
NK_API int nk_input_has_mouse_click(const struct nk_input *, enum nk_buttons)
NK_API int nk_str_append_str_utf8(struct nk_str *, const char *)
GLuint address
Definition: glext.h:10300
unsigned char initialized
Definition: nuklear.h:2858
NK_API int nk_button_text_styled(struct nk_context *, const struct nk_style_button *, const char *title, int len)
NK_API struct nk_rect nk_rectiv(const int *xywh)
NK_API int nk_radio_text(struct nk_context *, const char *, int, int *active)
void(* nk_command_custom_callback)(void *canvas, short x, short y, unsigned short w, unsigned short h, nk_handle callback_data)
Definition: nuklear.h:3102
Definition: libretro.h:2275
NK_API void nk_input_unicode(struct nk_context *, nk_rune)
GLdouble GLdouble GLdouble r
Definition: glext.h:6406
Definition: nuklear.h:3852
NK_API void nk_window_set_bounds(struct nk_context *, const char *name, struct nk_rect bounds)
int where
Definition: nuklear.h:2821
text_alignment
Definition: video_defines.h:103
struct nk_page * pages
Definition: nuklear.h:4126
NK_API void nk_combo_end(struct nk_context *)
short x
Definition: nuklear.h:3117
NK_API void nk_triangle_from_direction(struct nk_vec2 *result, struct nk_rect r, float pad_x, float pad_y, enum nk_heading)
GLsizei const GLchar ** path
Definition: glext.h:7901
NK_API int nk_group_begin(struct nk_context *, const char *title, nk_flags)
unsigned short point_count
Definition: nuklear.h:3075
NK_API void nk_layout_space_begin(struct nk_context *, enum nk_layout_format, float height, int widget_count)
float w
Definition: nuklear.h:3844
GLuint res
Definition: glext.h:10520
Definition: nuklear.h:975
#define NK_FLOAT_STACK_SIZE
Definition: nuklear.h:4037
NK_API int nk_str_len(struct nk_str *)
GLdouble GLdouble t
Definition: glext.h:6398
float border
Definition: nuklear.h:3439
nk_show_states
Definition: nuklear.h:470
struct nk_rect clip
Definition: nuklear.h:3131
Definition: nuklear.h:3924
unsigned short h
Definition: nuklear.h:3000
struct nk_style_button button
Definition: nuklear.h:3676
struct nk_color text_hover_active
Definition: nuklear.h:3465
NK_API int nk_filter_float(const struct nk_text_edit *, nk_rune unicode)
nk_popup_type
Definition: nuklear.h:474
float rounding
Definition: nuklear.h:3406
NK_API int nk_combo_item_image_label(struct nk_context *, struct nk_image, const char *, nk_flags alignment)
short x
Definition: nuklear.h:3096
nk_panel_type
Definition: nuklear.h:3817
enum nk_symbol_type sym_minimize
Definition: nuklear.h:3700
nk_buffer_allocation_type
Definition: nuklear.h:2673
enum nk_chart_type type
Definition: nuklear.h:3833
void(* draw_begin)(struct nk_command_buffer *, nk_handle userdata)
Definition: nuklear.h:3413
short y
Definition: nuklear.h:3096
NK_API int nk_option_label(struct nk_context *, const char *, int active)
NK_API void nk_popup_end(struct nk_context *)
static overlayled_t * cur
Definition: led_overlay.c:18
struct nk_vec2 spacing
Definition: nuklear.h:3764
GLenum GLsizei len
Definition: glext.h:7389
struct nk_vec2 min_size
Definition: nuklear.h:3766
struct nk_color combo_border_color
Definition: nuklear.h:3747
struct nk_color text_active
Definition: nuklear.h:3431
NK_API int nk_progress(struct nk_context *, nk_size *cur, nk_size max, int modifyable)
NK_API struct nk_color nk_hsva_bv(const nk_byte *hsva)
NK_API void nk_input_scroll(struct nk_context *, struct nk_vec2 val)
struct nk_configuration_stacks stacks
Definition: nuklear.h:4141
Definition: nuklear.h:1841
unsigned capacity
Definition: nuklear.h:4128
Definition: nuklear.h:2944
float bar_height
Definition: nuklear.h:3503
GLbyte ty
Definition: glext.h:9663
NK_API struct nk_style_item nk_style_item_hide(void)
struct nk_page_element * prev
Definition: nuklear.h:4113
GLenum GLint * range
Definition: glext.h:8206
void(* draw_end)(struct nk_command_buffer *, nk_handle)
Definition: nuklear.h:3479
struct nk_style_button inc_button
Definition: nuklear.h:3636
Definition: nuklear.h:494
Definition: nuklear.h:2953
struct nk_color text_normal
Definition: nuklear.h:3399
NK_API void nk_color_hsva_i(int *h, int *s, int *v, int *a, struct nk_color)
struct nk_color bar_active
Definition: nuklear.h:3492
GLenum GLsizei GLenum GLenum const GLvoid * table
Definition: glext.h:6296
struct nk_color text_pressed_active
Definition: nuklear.h:3466
Definition: nuklear.h:2176
NK_API int nk_button_image_text_styled(struct nk_context *, const struct nk_style_button *, struct nk_image img, const char *, int, nk_flags alignment)
NK_API int nk_slider_float(struct nk_context *, float min, float *val, float max, float step)
NK_API int nk_menu_item_image_label(struct nk_context *, struct nk_image, const char *, nk_flags alignment)
static const float font_size
Definition: config.def.h:434
GLsizeiptr size
Definition: glext.h:6559
Definition: nuklear.h:2016
NK_API int nk_menu_begin_symbol_text(struct nk_context *, const char *, int, nk_flags align, enum nk_symbol_type, struct nk_vec2 size)
NK_API int nk_select_image_label(struct nk_context *, struct nk_image, const char *, nk_flags align, int value)
nk_handle userdata
Definition: nuklear.h:3133
void(* draw_end)(struct nk_command_buffer *, nk_handle)
Definition: nuklear.h:3544
NK_API int nk_filter_default(const struct nk_text_edit *, nk_rune unicode)
Definition: nuklear.h:465
GLfloat f
Definition: glext.h:8207
int sel_end
Definition: nuklear.h:3953
Definition: nuklear.h:661
NK_API void nk_input_glyph(struct nk_context *, const nk_glyph)
NK_API float nk_window_get_height(const struct nk_context *)
#define NK_UINT32
Definition: nuklear.h:359
struct nk_style_button minimize_button
Definition: nuklear.h:3723
NK_API struct nk_vec2 nk_vec2v(const float *xy)
NK_API int nk_checkbox_text(struct nk_context *, const char *, int, int *active)
set set set set set set set macro pixldst1 abits if abits op else op endif endm macro pixldst2 abits if abits op else op endif endm macro pixldst4 abits if abits op else op endif endm macro pixldst0 abits op endm macro pixldst3 mem_operand op endm macro pixldst30 mem_operand op endm macro pixldst abits if abits elseif abits elseif abits elseif abits elseif abits pixldst0 abits else pixldst0 abits pixldst0 abits pixldst0 abits pixldst0 abits endif elseif abits else pixldst0 abits pixldst0 abits endif elseif abits else error unsupported bpp *numpix else pixst endif endm macro pixld1_s mem_operand if asr adds SRC_WIDTH_FIXED bpl add asl mov asr adds SRC_WIDTH_FIXED bpl add asl mov asr adds SRC_WIDTH_FIXED bpl add asl mov asr adds SRC_WIDTH_FIXED bpl add asl elseif asr adds SRC_WIDTH_FIXED bpl add asl mov asr adds SRC_WIDTH_FIXED bpl add asl else error unsupported endif endm macro pixld2_s mem_operand if mov asr add asl add asl mov asr sub UNIT_X add asl mov asr add asl add asl mov asr add UNIT_X add asl else pixld1_s mem_operand pixld1_s mem_operand endif endm macro pixld0_s mem_operand if asr adds SRC_WIDTH_FIXED bpl add asl elseif asr adds SRC_WIDTH_FIXED bpl add asl endif endm macro pixld_s_internal mem_operand if mem_operand pixld2_s mem_operand pixdeinterleave basereg elseif mem_operand elseif mem_operand elseif mem_operand elseif mem_operand pixld0_s mem_operand else pixld0_s mem_operand pixld0_s mem_operand pixld0_s mem_operand pixld0_s mem_operand endif elseif mem_operand else pixld0_s mem_operand pixld0_s mem_operand endif elseif mem_operand else error unsupported mem_operand if bpp mem_operand endif endm macro vuzp8 reg2 vuzp d d ®2 endm macro vzip8 reg2 vzip d d ®2 endm macro pixdeinterleave basereg basereg basereg basereg basereg endif endm macro pixinterleave basereg basereg basereg basereg basereg endif endm macro PF boost_increment endif if endif PF tst PF addne PF subne PF cmp ORIG_W if endif if endif if endif PF subge ORIG_W PF subges if endif if endif if endif endif endm macro cache_preload_simple endif if dst_r_bpp pld [DST_R, #(PREFETCH_DISTANCE_SIMPLE *dst_r_bpp/8)] endif if mask_bpp pld endif[MASK, #(PREFETCH_DISTANCE_SIMPLE *mask_bpp/8)] endif endif endm macro fetch_mask_pixblock pixld mask_basereg pixblock_size MASK endm macro ensure_destination_ptr_alignment process_pixblock_tail_head if beq irp local skip1 beq endif SRC MASK if dst_r_bpp DST_R else add endif PF add sub src_basereg pixdeinterleave mask_basereg pixdeinterleave dst_r_basereg process_pixblock_head pixblock_size cache_preload_simple process_pixblock_tail pixinterleave dst_w_basereg irp beq endif process_pixblock_tail_head tst beq irp if pixblock_size chunk_size tst beq pixld_src SRC pixld MASK if DST_R else pixld DST_R endif if
Definition: pixman-arm-neon-asm.h:543
Definition: nuklear.h:465
NK_API int nk_menu_item_label(struct nk_context *, const char *, nk_flags alignment)
Definition: nuklear.h:4096
Definition: nuklear.h:495
GLenum GLuint id
Definition: glext.h:6233
struct nk_color group_border_color
Definition: nuklear.h:3750
Definition: nuklear.h:3390
struct nk_color cursor_border_color
Definition: nuklear.h:3532
#define NK_TEXTEDIT_UNDOSTATECOUNT
Definition: nuklear.h:2806
Definition: nuklear.h:2986
Definition: nuklear.h:2952
nk_handle callback_data
Definition: nuklear.h:3108
nk_size calls
Definition: nuklear.h:2700
NK_API int nk_combo_begin_image(struct nk_context *, struct nk_image img, struct nk_vec2 size)
struct nk_color text_active
Definition: nuklear.h:3401
Definition: nuklear.h:455
NK_API void nk_layout_row_template_push_static(struct nk_context *, float width)
struct nk_vec2 size offset
Definition: nuklear.h:462
Definition: nuklear.h:3856
Definition: nuklear.h:686
unsigned short w
Definition: nuklear.h:3015
#define NK_MIN(a, b)
Definition: nuklear.h:315
NK_API int nk_combo_begin_symbol(struct nk_context *, enum nk_symbol_type, struct nk_vec2 size)
uint32_t adler32(uint32_t adler, const uint8_t *buf, size_t len)
Definition: adler32.c:49
struct nk_popup_state popup
Definition: nuklear.h:3986
NK_API void nk_tree_state_pop(struct nk_context *)
static int cond(LexState *ls)
Definition: lparser.c:1177
NK_API void nk_stroke_rect(struct nk_command_buffer *, struct nk_rect, float rounding, float line_thickness, struct nk_color)
struct nk_color background
Definition: nuklear.h:3743
NK_API struct nk_color nk_rgba(int r, int g, int b, int a)
struct nk_vec2 scroll_delta
Definition: nuklear.h:3176
struct nk_color bar_filled
Definition: nuklear.h:3493
static int str_len(lua_State *L)
Definition: lstrlib.c:54
struct nk_style_item cursor_hover
Definition: nuklear.h:3556
struct nk_pool pool
Definition: nuklear.h:4164
Definition: nuklear.h:3918
int down
Definition: nuklear.h:3183
short x
Definition: nuklear.h:2974
NK_API void nk_text_wrap(struct nk_context *, const char *, int)
Definition: nuklear.h:1178
NK_API int nk_str_insert_text_char(struct nk_str *, int pos, const char *, int)
Definition: nuklear.h:3959
GLenum GLenum GLenum GLenum GLenum scale
Definition: glext.h:9939
struct nk_style_item active
Definition: nuklear.h:3662
NK_API void nk_label(struct nk_context *, const char *, nk_flags align)
NK_API int nk_input_is_mouse_prev_hovering_rect(const struct nk_input *, struct nk_rect)
Definition: nuklear.h:3375
struct nk_style_button tab_maximize_button
Definition: nuklear.h:3696
short cx
Definition: nuklear.h:3056
#define next(ls)
Definition: llex.c:32
NK_API void nk_text_colored(struct nk_context *, const char *, int, nk_flags, struct nk_color)
NK_API struct nk_image nk_image_ptr(void *)
Definition: nuklear.h:2964
struct nk_color color
Definition: nuklear.h:3650
unsigned short h
Definition: nuklear.h:3118
GLuint GLenum matrix
Definition: glext.h:10314
GLdouble s
Definition: glext.h:6390
short insert_length
Definition: nuklear.h:2822
static const struct @115 elements[]
NK_API void nk_style_load_cursor(struct nk_context *, enum nk_style_cursor, const struct nk_cursor *)
Definition: nuklear.h:3821
NK_API void nk_chart_end(struct nk_context *)
struct nk_style_button inc_button
Definition: nuklear.h:3569
Definition: nuklear.h:2005
f32 k1
Definition: gx_regdef.h:5098
Definition: nuklear.h:690
struct nk_vec2 image_padding
Definition: nuklear.h:3408
struct nk_vec2 padding
Definition: nuklear.h:3768
NK_API void nk_textedit_init_fixed(struct nk_text_edit *, void *memory, nk_size size)
struct passwd out
Definition: missing_libc_functions.c:51
NK_API struct nk_rect nk_window_get_content_region(struct nk_context *)
NK_API void nk_color_hsva_iv(int *hsva_out, struct nk_color)
struct nk_style_button tab_minimize_button
Definition: nuklear.h:3697
NK_API void nk_color_hsv_bv(nk_byte *hsv_out, struct nk_color)
struct nk_style_item normal
Definition: nuklear.h:3392
GLdouble GLdouble z
Definition: glext.h:6514
NK_API int nk_selectable_image_label(struct nk_context *, struct nk_image, const char *, nk_flags align, int *value)
enum nk_symbol_type inc_symbol
Definition: nuklear.h:3571
Definition: nuklear.h:2172
NK_API void nk_layout_row_dynamic(struct nk_context *ctx, float height, int cols)
short x
Definition: nuklear.h:3106
Definition: nuklear.h:2675
short undo_char_point
Definition: nuklear.h:2832
struct nk_vec2 scrollbar_size
Definition: nuklear.h:3765
GLsizei const GLchar *const * string
Definition: glext.h:6699
NK_API void nk_menubar_begin(struct nk_context *)
struct nk_page_element win[1]
Definition: nuklear.h:4119
struct nk_command header
Definition: nuklear.h:2979
short x
Definition: nuklear.h:3049
struct nk_color cursor_normal
Definition: nuklear.h:3589
Definition: nuklear.h:2168
nk_panel_flags
Definition: nuklear.h:1173
Definition: nuklear.h:2950
NK_API void nk_buffer_push(struct nk_buffer *, enum nk_buffer_allocation_type type, const void *memory, nk_size size, nk_size align)
GLint GLint bottom
Definition: glext.h:8393
enum nk_anti_aliasing shape_AA
Definition: nuklear.h:984
NK_API struct nk_color nk_rgba_fv(const float *rgba)
struct nk_color tooltip_border_color
Definition: nuklear.h:3751
struct nk_scroll offset
Definition: nuklear.h:3886
short cy
Definition: nuklear.h:3056
Definition: nuklear.h:3858
#define NK_LEN(a)
Definition: nuklear.h:4183
struct nk_style_item hover
Definition: nuklear.h:3617
typedef void(__stdcall *PFN_DESTRUCTION_CALLBACK)(void *pData)
struct nk_command header
Definition: nuklear.h:3040
struct nk_color border_color
Definition: nuklear.h:3663
Definition: nuklear.h:475
Definition: nuklear.h:2010
Definition: nuklear.h:2162
unsigned short h
Definition: nuklear.h:3015
Definition: nuklear.h:972
NK_API struct nk_color nk_rgb(int r, int g, int b)
NK_API void nk_window_set_position(struct nk_context *, const char *name, struct nk_vec2 pos)
GLdouble GLdouble GLdouble GLdouble top
Definition: glext.h:11766
struct nk_command header
Definition: nuklear.h:3080
Definition: nuklear.h:2161
unsigned short w
Definition: nuklear.h:2975
#define exp(a)
Definition: math.h:32
Definition: nuklear.h:3853
Definition: nuklear.h:2842
NK_API struct nk_vec2 nk_rect_size(struct nk_rect)
Definition: nuklear.h:1873
#define NK_MAX_LAYOUT_ROW_TEMPLATE_COLUMNS
Definition: nuklear.h:3811
int length
Definition: nuklear.h:3120
NK_API void nk_color_hsv_fv(float *hsv_out, struct nk_color)
GLenum GLint GLint * precision
Definition: glext.h:8206
Definition: nuklear.h:503
Definition: nuklear.h:465
NK_API int nk_chart_begin_colored(struct nk_context *, enum nk_chart_type, struct nk_color, struct nk_color active, int num, float min, float max)
NK_API int nk_widget_is_mouse_clicked(struct nk_context *, enum nk_buttons)
GLenum GLenum GLenum input
Definition: glext.h:9938
struct nk_style_edit edit
Definition: nuklear.h:3794
unsigned short h
Definition: nuklear.h:461
Definition: nuklear.h:3712
nk_text_edit_mode
Definition: nuklear.h:2841
nk_byte g
Definition: nuklear.h:453
float rounding
Definition: nuklear.h:3683
float filled
Definition: nuklear.h:3870
NK_API struct nk_rect nk_widget_bounds(struct nk_context *)
GLuint GLuint GLfloat weight
Definition: glext.h:12626
NK_API void nk_layout_row_template_push_variable(struct nk_context *, float min_width)
struct nk_vec2 popup_padding
Definition: nuklear.h:3770
struct nk_style_button inc_button
Definition: nuklear.h:3510
GLdouble GLdouble right
Definition: glext.h:11766
Definition: nuklear.h:3372
NK_API void nk_color_d(double *r, double *g, double *b, double *a, struct nk_color)
NK_API struct nk_rect nk_recta(struct nk_vec2 pos, struct nk_vec2 size)
nk_size begin
Definition: nuklear.h:3877
#define nk_zero_struct(s)
Definition: nuklear.h:4200
Definition: nuklear.h:2148
struct nk_color label_normal
Definition: nuklear.h:3729
NK_API int nk_contextual_item_image_label(struct nk_context *, struct nk_image, const char *, nk_flags alignment)
nk_edit_flags
Definition: nuklear.h:1999
#define NK_UINT8
Definition: nuklear.h:340
GLsizei GLsizei GLenum GLenum const GLvoid * data
Definition: glext.h:6303
#define NK_BUTTON_BEHAVIOR_STACK_SIZE
Definition: nuklear.h:4025
Definition: nuklear.h:474
unsigned short point_count
Definition: nuklear.h:3082
const GLubyte * c
Definition: glext.h:9812
short y
Definition: nuklear.h:2999
#define NK_API
Definition: nuklear.h:282
struct nk_vec2 menu_padding
Definition: nuklear.h:3773
GLboolean GLboolean GLboolean b
Definition: glext.h:6844
unsigned char cursor_at_end_of_line
Definition: nuklear.h:2857
NK_API void nk_combo_close(struct nk_context *)
Definition: nuklear.h:700
struct nk_style_item hover
Definition: nuklear.h:3718
NK_API const void * nk_buffer_memory_const(const struct nk_buffer *)
GLuint GLuint GLsizei count
Definition: glext.h:6292
Definition: nuklear.h:676
nk_plugin_filter filter
Definition: nuklear.h:2850
const float * ratio
Definition: nuklear.h:3866
float combo_border
Definition: nuklear.h:3755
float4 p3
Definition: remote.h:1
NK_API struct nk_vec2 nk_layout_space_to_local(struct nk_context *, struct nk_vec2)
struct nk_image image
Definition: nuklear.h:3376
NK_API void nk_textedit_delete_selection(struct nk_text_edit *)
#define NK_STYLE_ITEM_STACK_SIZE
Definition: nuklear.h:4033
NK_API int nk_propertyi(struct nk_context *, const char *name, int min, int val, int max, int step, float inc_per_pixel)
Definition: nuklear.h:471
float rounding
Definition: nuklear.h:3562
NK_API nk_size nk_prog(struct nk_context *, nk_size cur, nk_size max, int modifyable)
nk_handle handle
Definition: nuklear.h:461
GLuint GLuint num
Definition: glext.h:10525
NK_API void nk_layout_row_static(struct nk_context *ctx, float height, int item_width, int cols)
int count
Definition: nuklear.h:3837
float x
Definition: nuklear.h:457
NK_API void nk_buffer_init(struct nk_buffer *, const struct nk_allocator *, nk_size size)
unsigned char mode
Definition: nuklear.h:3955
Definition: nuklear.h:697
unsigned short line_thickness
Definition: nuklear.h:3024
struct nk_style_chart chart
Definition: nuklear.h:3795
struct nk_table * next
Definition: nuklear.h:4101
struct nk_style_scrollbar scrollv
Definition: nuklear.h:3797
struct nk_command header
Definition: nuklear.h:3064
Definition: nuklear.h:2948
Definition: nuklear.h:2008
Definition: nuklear.h:678
struct nk_style_item scaler
Definition: nuklear.h:3752
Definition: nuklear.h:2006
GLuint GLsizei const GLchar * label
Definition: glext.h:8583
struct nk_allocator pool
Definition: nuklear.h:2688
#define NK_WINDOW_MAX_NAME
Definition: nuklear.h:3912
Definition: nuklear.h:2155
NK_API void nk_list_view_end(struct nk_list_view *)
Definition: nuklear.h:1875
NK_API int nk_combo_item_label(struct nk_context *, const char *, nk_flags alignment)
void(* draw_begin)(struct nk_command_buffer *, nk_handle)
Definition: nuklear.h:3641
NK_API const struct nk_command * nk__next(struct nk_context *, const struct nk_command *)
nk_hash name
Definition: nuklear.h:3974
struct nk_draw_null_texture null
Definition: nuklear.h:988
NK_API int nk_str_append_str_char(struct nk_str *, const char *)
Definition: nuklear.h:1866
NK_SIZE_TYPE nk_size
Definition: nuklear.h:401
GLint GLint GLsizei GLsizei GLsizei GLint GLenum GLenum const GLvoid * pixels
Definition: glext.h:6293
Definition: nuklear.h:1175
struct nk_vec2 padding
Definition: nuklear.h:3472
nk_handle userdata
Definition: nuklear.h:3412
Definition: nuklear.h:2174
Definition: nuklear.h:2951
unsigned char single_line
Definition: nuklear.h:2860
GLint GLvoid * img
Definition: glext.h:6388
Definition: nuklear.h:2158
unsigned int seq
Definition: nuklear.h:3948
NK_API int nk_filter_hex(const struct nk_text_edit *, nk_rune unicode)
NK_API int nk_combo_begin_image_text(struct nk_context *, const char *selected, int, struct nk_image, struct nk_vec2 size)
Definition: nuklear.h:2959
NK_API int nk_window_is_hovered(struct nk_context *)
struct nk_color color
Definition: nuklear.h:3386
struct nk_vec2 tooltip_padding
Definition: nuklear.h:3774
NK_API unsigned nk_check_flags_label(struct nk_context *, const char *, unsigned int flags, unsigned int value)
NK_API int nk_menu_item_symbol_text(struct nk_context *, enum nk_symbol_type, const char *, int, nk_flags alignment)
NK_API int nk_check_text(struct nk_context *, const char *, int, int active)
Definition: nuklear.h:672
NK_API struct nk_vec2 nk_widget_position(struct nk_context *)
struct nk_style_item normal_active
Definition: nuklear.h:3454
struct nk_style_window_header header
Definition: nuklear.h:3741
Definition: nuklear.h:974
#define NK_PTR_TO_UINT(x)
Definition: nuklear.h:4211
struct nk_color text_normal_active
Definition: nuklear.h:3464
NK_API nk_rune nk_str_rune_at(const struct nk_str *, int pos)
struct nk_window win
Definition: nuklear.h:4107
NK_API int nk_style_push_font(struct nk_context *, const struct nk_user_font *)
struct nk_style_toggle option
Definition: nuklear.h:3788
float cursor_border
Definition: nuklear.h:3537
Definition: nuklear.h:2945
enum nk_symbol_type close_symbol
Definition: nuklear.h:3724
Definition: nuklear.h:1181
NK_API int nk_item_is_any_active(struct nk_context *)
struct nk_color cursor_text_normal
Definition: nuklear.h:3591
NK_API int nk_check_label(struct nk_context *, const char *, int active)
float border
Definition: nuklear.h:3405
float border
Definition: nuklear.h:3653
NK_API int nk_contextual_begin(struct nk_context *, nk_flags, struct nk_vec2, struct nk_rect trigger_bounds)
Definition: nuklear.h:3857
struct nk_color label_hover
Definition: nuklear.h:3623
NK_API struct nk_color nk_hsva_fv(const float *hsva)
struct nk_color selected_normal
Definition: nuklear.h:3600
NK_API int nk_window_is_collapsed(struct nk_context *ctx, const char *name)
const struct nk_user_font * font
Definition: nuklear.h:3114
NK_API void nk_fill_arc(struct nk_command_buffer *, float cx, float cy, float radius, float a_min, float a_max, struct nk_color)
GLenum const GLvoid GLbitfield GLsizei numGlyphs
Definition: glext.h:12622
NK_API int nk_style_pop_style_item(struct nk_context *)
NK_API void nk_str_remove_chars(struct nk_str *, int len)
GLint i1
Definition: nx_glsym.h:308
300 fps cap). If set to 0.0x, fastforward ratio is unlimited(no FPS cap)." ) MSG_HASH( MENU_ENUM_SUBLABEL_SLOWMOTION_RATIO, "When in slow motion, content will slow down by the factor specified/set." ) MSG_HASH( MENU_ENUM_SUBLABEL_RUN_AHEAD_ENABLED, "Run core logic one or more frames ahead then load the state back to reduce perceived input lag." ) MSG_HASH( MENU_ENUM_SUBLABEL_RUN_AHEAD_FRAMES, "The number of frames to run ahead. Causes gameplay issues such as jitter if you exceed the number of lag frames internal to the game." ) MSG_HASH( MENU_ENUM_SUBLABEL_RUN_AHEAD_SECONDARY_INSTANCE, "Use a second instance of the RetroArch core to run ahead. Prevents audio problems due to loading state." ) MSG_HASH( MENU_ENUM_SUBLABEL_RUN_AHEAD_HIDE_WARNINGS, "Hides the warning message that appears when using RunAhead and the core does not support savestates." ) MSG_HASH( MENU_ENUM_SUBLABEL_REWIND_ENABLE, "Ενεργοποίηση επιστροφής. Η επίδοση θα πέσει κατά το παιχνίδι." ) MSG_HASH( MENU_ENUM_SUBLABEL_CHEAT_APPLY_AFTER_TOGGLE, "Apply cheat immediately after toggling." ) MSG_HASH( MENU_ENUM_SUBLABEL_CHEAT_APPLY_AFTER_LOAD, "Auto-apply cheats when game loads." ) MSG_HASH( MENU_ENUM_SUBLABEL_CHEAT_REPEAT_COUNT, "The number of times the cheat will be applied. Use with the other two Iteration options to affect large areas of memory." ) MSG_HASH( MENU_ENUM_SUBLABEL_CHEAT_REPEAT_ADD_TO_ADDRESS, "After each 'Number of Iterations' the Memory Address will be increased by this number times the 'Memory Search Size'." ) MSG_HASH( MENU_ENUM_SUBLABEL_CHEAT_REPEAT_ADD_TO_VALUE, "After each 'Number of Iterations' the Value will be increased by this amount." ) MSG_HASH( MENU_ENUM_SUBLABEL_REWIND_GRANULARITY, "When rewinding a defined number of frames, you can rewind several frames at a time, increasing the rewind speed." ) MSG_HASH( MENU_ENUM_SUBLABEL_REWIND_BUFFER_SIZE, "The amount of memory(in MB) to reserve for the rewind buffer. Increasing this will increase the amount of rewind history." ) MSG_HASH( MENU_ENUM_SUBLABEL_REWIND_BUFFER_SIZE_STEP, "Each time you increase or decrease the rewind buffer size value via this UI it will change by this amount" ) MSG_HASH( MENU_ENUM_SUBLABEL_CHEAT_IDX, "Index position in list." ) MSG_HASH( MENU_ENUM_SUBLABEL_CHEAT_ADDRESS_BIT_POSITION, "Address bitmask when Memory Search Size< 8-bit." ) MSG_HASH( MENU_ENUM_SUBLABEL_CHEAT_MATCH_IDX, "Select the match to view." ) MSG_HASH( MENU_ENUM_SUBLABEL_CHEAT_START_OR_CONT, "" ) MSG_HASH( MENU_ENUM_SUBLABEL_CHEAT_START_OR_RESTART, "Αριστερά/Δεξιά για αλλαγή μεγέθους bit" ) MSG_HASH( MENU_ENUM_SUBLABEL_CHEAT_SEARCH_EXACT, "Αριστερά/Δεξιά για αλλαγή τιμής" ) MSG_HASH( MENU_ENUM_SUBLABEL_CHEAT_SEARCH_LT, "" ) MSG_HASH( MENU_ENUM_SUBLABEL_CHEAT_SEARCH_GT, "" ) MSG_HASH( MENU_ENUM_SUBLABEL_CHEAT_SEARCH_LTE, "" ) MSG_HASH( MENU_ENUM_SUBLABEL_CHEAT_SEARCH_GTE, "" ) MSG_HASH( MENU_ENUM_SUBLABEL_CHEAT_SEARCH_EQ, "" ) MSG_HASH( MENU_ENUM_SUBLABEL_CHEAT_SEARCH_NEQ, "" ) MSG_HASH( MENU_ENUM_SUBLABEL_CHEAT_SEARCH_EQPLUS, "Αριστερά/Δεξιά για αλλαγή τιμής" ) MSG_HASH( MENU_ENUM_SUBLABEL_CHEAT_SEARCH_EQMINUS, "Αριστερά/Δεξιά για αλλαγή τιμής" ) MSG_HASH( MENU_ENUM_SUBLABEL_CHEAT_ADD_MATCHES, "" ) MSG_HASH( MENU_ENUM_SUBLABEL_CHEAT_VIEW_MATCHES, "" ) MSG_HASH( MENU_ENUM_SUBLABEL_CHEAT_CREATE_OPTION, "" ) MSG_HASH( MENU_ENUM_SUBLABEL_CHEAT_DELETE_OPTION, "" ) MSG_HASH( MENU_ENUM_SUBLABEL_CHEAT_ADD_NEW_TOP, "" ) MSG_HASH( MENU_ENUM_SUBLABEL_CHEAT_ADD_NEW_BOTTOM, "" ) MSG_HASH( MENU_ENUM_SUBLABEL_CHEAT_DELETE_ALL, "" ) MSG_HASH( MENU_ENUM_SUBLABEL_CHEAT_RELOAD_CHEATS, "" ) MSG_HASH( MENU_ENUM_SUBLABEL_CHEAT_BIG_ENDIAN, "Big endian :258=0x0102,\n" "Little endian :258=0x0201" ) MSG_HASH( MENU_ENUM_SUBLABEL_LIBRETRO_LOG_LEVEL, "Sets log level for cores. If a log level issued by a core is below this value, it is ignored." ) MSG_HASH( MENU_ENUM_SUBLABEL_PERFCNT_ENABLE, "Enable performance counters for RetroArch(and cores)." ) MSG_HASH( MENU_ENUM_SUBLABEL_SAVESTATE_AUTO_SAVE, "Automatically makes a savestate at the end of RetroArch 's runtime. RetroArch will automatically load this savestate if 'Auto Load State' is enabled." ) MSG_HASH( MENU_ENUM_SUBLABEL_SAVESTATE_AUTO_LOAD, "Automatically load the auto save state on startup." ) MSG_HASH( MENU_ENUM_SUBLABEL_SAVESTATE_THUMBNAIL_ENABLE, "Show thumbnails of save states inside the menu." ) MSG_HASH( MENU_ENUM_SUBLABEL_AUTOSAVE_INTERVAL, "Autosaves the non-volatile Save RAM at a regular interval. This is disabled by default unless set otherwise. The interval is measured in seconds. A value of 0 disables autosave." ) MSG_HASH( MENU_ENUM_SUBLABEL_INPUT_REMAP_BINDS_ENABLE, "If enabled, overrides the input binds with the remapped binds set for the current core." ) MSG_HASH( MENU_ENUM_SUBLABEL_INPUT_AUTODETECT_ENABLE, "Enable input auto-detection. Will attempt to autoconfigure joypads, Plug-and-Play style." ) MSG_HASH( MENU_ENUM_SUBLABEL_MENU_INPUT_SWAP_OK_CANCEL, "Εναλλαγή πλήτρκων για Επιβεβαίωση/Ακύρωση. Απενεργοποιημένο είναι ο Ιαπωνικός προσανατολισμός, ενεργοποιημένος είναι ο δυτικός προσανατολισμός." ) MSG_HASH( MENU_ENUM_SUBLABEL_PAUSE_LIBRETRO, "Εάν απενεργοποιηθεί το περιεχόμενο θα συνεχίσει να τρέχει στο παρασκήνιο όταν το μενού του RetroArch είναι ανοικτό." ) MSG_HASH( MENU_ENUM_SUBLABEL_VIDEO_DRIVER, "Οδηγός βίντεο προς χρήση." ) MSG_HASH( MENU_ENUM_SUBLABEL_AUDIO_DRIVER, "Οδηγός ήχου προς χρήση." ) MSG_HASH( MENU_ENUM_SUBLABEL_INPUT_DRIVER, "Οδηγός Εισόδου προς χρήση. Ανάλογα με τον οδηγό βίντεο, ίσως αλλάξει αναγκαστικά ο οδηγός εισαγωγής." ) MSG_HASH( MENU_ENUM_SUBLABEL_JOYPAD_DRIVER, "Οδηγός Joypad προς χρήση." ) MSG_HASH( MENU_ENUM_SUBLABEL_AUDIO_RESAMPLER_DRIVER, "Οδηγός Επαναδειγματολήπτη Ήχου προς χρήση." ) MSG_HASH( MENU_ENUM_SUBLABEL_CAMERA_DRIVER, "Οδηγός Κάμερας προς χρήση." ) MSG_HASH( MENU_ENUM_SUBLABEL_LOCATION_DRIVER, "Οδηγός Τοποθεσίας προς χρήση." ) MSG_HASH( MENU_ENUM_SUBLABEL_MENU_DRIVER, "Οδηγός Μενού προς χρήση." ) MSG_HASH( MENU_ENUM_SUBLABEL_RECORD_DRIVER, "Οδηγός Εγγραφής προς χρήση." ) MSG_HASH( MENU_ENUM_SUBLABEL_MIDI_DRIVER, "Οδηγός MIDI προς χρήση." ) MSG_HASH( MENU_ENUM_SUBLABEL_WIFI_DRIVER, "Οδηγός Wi-Fi προς χρήση." ) MSG_HASH( MENU_ENUM_SUBLABEL_NAVIGATION_BROWSER_FILTER_SUPPORTED_EXTENSIONS_ENABLE, "Filter files being shown in filebrowser by supported extensions." ) MSG_HASH( MENU_ENUM_SUBLABEL_MENU_WALLPAPER, "Select an image to set as menu wallpaper." ) MSG_HASH( MENU_ENUM_SUBLABEL_DYNAMIC_WALLPAPER, "Dynamically load a new wallpaper depending on context." ) MSG_HASH( MENU_ENUM_SUBLABEL_AUDIO_DEVICE, "Παράκαμψη της προκαθορισμένης συσκευής ήχου που χρησιμοποιεί ο οδηγός ήχου. Αυτή η επιλογή εξαρτάται από τον οδηγό." ) MSG_HASH( MENU_ENUM_SUBLABEL_AUDIO_DSP_PLUGIN, "Πρόσθετο ήχου DSP που επεξεργάζεται τον ήχο πριν αποσταλεί στον οδηγό." ) MSG_HASH( MENU_ENUM_SUBLABEL_AUDIO_OUTPUT_RATE, "Audio output sample rate." ) MSG_HASH( MENU_ENUM_SUBLABEL_OVERLAY_OPACITY, "Διαφάνεια όλων των στοιχείων του επικαλλύματος." ) MSG_HASH( MENU_ENUM_SUBLABEL_OVERLAY_SCALE, "Κλίμακα όλων των στοιχείων του επικαλλύματος." ) MSG_HASH( MENU_ENUM_SUBLABEL_INPUT_OVERLAY_ENABLE, "Ενεργοποίηση του επικαλλύματος." ) MSG_HASH( MENU_ENUM_SUBLABEL_OVERLAY_PRESET, "Επιλογή ενός επικαλλύματος από τον περιηγητή αρχείων." ) MSG_HASH( MENU_ENUM_SUBLABEL_NETPLAY_IP_ADDRESS, "The address of the host to connect to." ) MSG_HASH( MENU_ENUM_SUBLABEL_NETPLAY_TCP_UDP_PORT, "The port of the host IP address. Can be either a TCP or UDP port." ) MSG_HASH( MENU_ENUM_SUBLABEL_NETPLAY_PASSWORD, "The password for connecting to the netplay host. Used only in host mode." ) MSG_HASH( MENU_ENUM_SUBLABEL_NETPLAY_PUBLIC_ANNOUNCE, "Whether to announce netplay games publicly. If unset, clients must manually connect rather than using the public lobby." ) MSG_HASH( MENU_ENUM_SUBLABEL_NETPLAY_SPECTATE_PASSWORD, "The password for connecting to the netplay host with only spectator privileges. Used only in host mode." ) MSG_HASH( MENU_ENUM_SUBLABEL_NETPLAY_START_AS_SPECTATOR, "Whether to start netplay in spectator mode." ) MSG_HASH( MENU_ENUM_SUBLABEL_NETPLAY_ALLOW_SLAVES, "Whether to allow connections in slave mode. Slave-mode clients require very little processing power on either side, but will suffer significantly from network latency." ) MSG_HASH( MENU_ENUM_SUBLABEL_NETPLAY_REQUIRE_SLAVES, "Whether to disallow connections not in slave mode. Not recommended except for very fast networks with very weak machines." ) MSG_HASH( MENU_ENUM_SUBLABEL_NETPLAY_STATELESS_MODE, "Whether to run netplay in a mode not requiring save states. If set to true, a very fast network is required, but no rewinding is performed, so there will be no netplay jitter." ) MSG_HASH( MENU_ENUM_SUBLABEL_NETPLAY_CHECK_FRAMES, "The frequency in frames with which netplay will verify that the host and client are in sync." ) MSG_HASH( MENU_ENUM_SUBLABEL_NETPLAY_NAT_TRAVERSAL, "When hosting, attempt to listen for connections from the public Internet, using UPnP or similar technologies to escape LANs." ) MSG_HASH( MENU_ENUM_SUBLABEL_STDIN_CMD_ENABLE, "Enable stdin command interface." ) MSG_HASH( MENU_ENUM_SUBLABEL_MOUSE_ENABLE, "Enable mouse controls inside the menu." ) MSG_HASH( MENU_ENUM_SUBLABEL_POINTER_ENABLE, "Enable touch controls inside the menu." ) MSG_HASH( MENU_ENUM_SUBLABEL_THUMBNAILS, "Type of thumbnail to display." ) MSG_HASH( MENU_ENUM_SUBLABEL_LEFT_THUMBNAILS, "Type of thumbnail to display at the left." ) MSG_HASH( MENU_ENUM_SUBLABEL_XMB_VERTICAL_THUMBNAILS, "Display the left thumbnail under the right one, on the right side of the screen." ) MSG_HASH( MENU_ENUM_SUBLABEL_TIMEDATE_ENABLE, "Εμφάνιση τρέχουσας ημερομηνίας ή και ώρας μέσα στο μενού." ) MSG_HASH( MENU_ENUM_SUBLABEL_BATTERY_LEVEL_ENABLE, "Εμφάνιση τρέχουσας μπαταρίας μέσα στο μενού." ) MSG_HASH( MENU_ENUM_SUBLABEL_NAVIGATION_WRAPAROUND, "Wrap-around to beginning and/or end if boundary of list is reached horizontally or vertically." ) MSG_HASH( MENU_ENUM_SUBLABEL_NETPLAY_ENABLE_HOST, "Ενεργοποιεί το netplay ως οικοδεσπότης(εξυπηρετητής)." ) MSG_HASH( MENU_ENUM_SUBLABEL_NETPLAY_ENABLE_CLIENT, "Ενεργοποιεί το netplay ως πελάτης." ) MSG_HASH( MENU_ENUM_SUBLABEL_NETPLAY_DISCONNECT, "Αποσυνδέει μία ενεργή σύνδεση Netplay." ) MSG_HASH( MENU_ENUM_SUBLABEL_SCAN_DIRECTORY, "Σαρώνει ένα ευρετήριο για συμβατά αρχεία και τα προσθέτει στην συλλογή." ) MSG_HASH( MENU_ENUM_SUBLABEL_SCAN_FILE, "Σαρώνει ένα συμβατό αρχείο και το προσθέτει στην συλλογή." ) MSG_HASH( MENU_ENUM_SUBLABEL_VIDEO_SWAP_INTERVAL, "Χρησιμοποιεί ένα προτιμώμενο διάστημα αλλαγής για το Vsync. Ορίστε αυτό ώστε να μειώσεται στο μισό τον ρυθμό ανανέωσης της οθόνης αποτελεσματικά." ) MSG_HASH( MENU_ENUM_SUBLABEL_SORT_SAVEFILES_ENABLE, "Sort save files in folders named after the core used." ) MSG_HASH( MENU_ENUM_SUBLABEL_SORT_SAVESTATES_ENABLE, "Sort save states in folders named after the core used." ) MSG_HASH( MENU_ENUM_SUBLABEL_NETPLAY_REQUEST_DEVICE_I, "Request to play with the given input device." ) MSG_HASH( MENU_ENUM_SUBLABEL_CORE_UPDATER_BUILDBOT_URL, "URL to core updater directory on the Libretro buildbot." ) MSG_HASH( MENU_ENUM_SUBLABEL_BUILDBOT_ASSETS_URL, "URL to assets updater directory on the Libretro buildbot." ) MSG_HASH( MENU_ENUM_SUBLABEL_CORE_UPDATER_AUTO_EXTRACT_ARCHIVE, "After downloading, automatically extract files contained in the downloaded archives." ) MSG_HASH( MENU_ENUM_SUBLABEL_NETPLAY_REFRESH_ROOMS, "Σάρωση για νέα δωμάτια." ) MSG_HASH( MENU_ENUM_SUBLABEL_DELETE_ENTRY, "Κατάργηση αυτής της καταχώρησης από την συλλογή." ) MSG_HASH( MENU_ENUM_SUBLABEL_INFORMATION, "View more information about the content." ) MSG_HASH( MENU_ENUM_SUBLABEL_ADD_TO_FAVORITES, "Προσθήκη καταχώρησης στα αγαπημένα." ) MSG_HASH( MENU_ENUM_SUBLABEL_ADD_TO_FAVORITES_PLAYLIST, "Προσθήκη καταχώρησης στα αγαπημένα." ) MSG_HASH( MENU_ENUM_SUBLABEL_RUN, "Έναρξη περιεχομένου." ) MSG_HASH( MENU_ENUM_SUBLABEL_MENU_FILE_BROWSER_SETTINGS, "Προσαρμογή ρυθμίσεων εξερευνητή αρχείου." ) MSG_HASH( MENU_ENUM_SUBLABEL_AUTO_REMAPS_ENABLE, "Enable customized controls by default at startup." ) MSG_HASH( MENU_ENUM_SUBLABEL_AUTO_OVERRIDES_ENABLE, "Enable customized configuration by default at startup." ) MSG_HASH( MENU_ENUM_SUBLABEL_GAME_SPECIFIC_OPTIONS, "Enable customized core options by default at startup." ) MSG_HASH( MENU_ENUM_SUBLABEL_CORE_ENABLE, "Εμφανίζει το όνομα του τρέχων πυρήνα μέσα στο μενού." ) MSG_HASH( MENU_ENUM_SUBLABEL_DATABASE_MANAGER, "Προβολή βάσεων δεδομένων." ) MSG_HASH( MENU_ENUM_SUBLABEL_CURSOR_MANAGER, "Προβολή προηγούμενων αναζητήσεων." ) MSG_HASH( MENU_ENUM_SUBLABEL_TAKE_SCREENSHOT, "Καταγράφει μία εικόνα της οθόνης." ) MSG_HASH( MENU_ENUM_SUBLABEL_CLOSE_CONTENT, "Κλείνει το τρέχον περιεχόμενο. Οποιεσδήποτε μη αποθηκευμένες αλλαγές μπορεί να χαθούν." ) MSG_HASH( MENU_ENUM_SUBLABEL_LOAD_STATE, "Φόρτωση μίας κατάστασης από την τρέχουσα θέση." ) MSG_HASH( MENU_ENUM_SUBLABEL_SAVE_STATE, "Αποθήκευση μίας κατάστασης στην τρέχουσα θέση." ) MSG_HASH( MENU_ENUM_SUBLABEL_RESUME, "Συνέχιση εκτέλεσης του τρέχοντος περιεχομένου και έξοδος από το Γρήγορο Μενού." ) MSG_HASH( MENU_ENUM_SUBLABEL_RESUME_CONTENT, "Συνέχιση εκτέλεσης του τρέχοντος περιεχομένου και έξοδος από το Γρήγορο Μενού." ) MSG_HASH( MENU_ENUM_SUBLABEL_STATE_SLOT, "Αλλάζει την τρέχουσα επιλεγμένη θέση κατάστασης." ) MSG_HASH( MENU_ENUM_SUBLABEL_UNDO_LOAD_STATE, "Εάν μία κατάσταση φορτώθηκε, το περιεχόμενο θα επιστρέψει στην κατάσταση πριν την φόρτωση." ) MSG_HASH( MENU_ENUM_SUBLABEL_UNDO_SAVE_STATE, "Εάν μία κατάσταση αντικαταστάθηκε, το περιεχόμενο θα επιστρέψει στην προηγούμενη κατάσταση αποθήκευσης." ) MSG_HASH( MENU_ENUM_SUBLABEL_ACCOUNTS_RETRO_ACHIEVEMENTS, "Υπηρεσία RetroAchievements. Για περισσότερες πληροφορίες επισκεφθείτε το http:) MSG_HASH(MENU_ENUM_SUBLABEL_ACCOUNTS_LIST, "Διαχειρίζεται τους τρέχοντες διαμορφωμένους λογαριασμούς.") MSG_HASH(MENU_ENUM_SUBLABEL_INPUT_META_REWIND, "Διαχειρίζεται τις ρυθμίσεις επαναφοράς.") MSG_HASH(MENU_ENUM_SUBLABEL_INPUT_META_CHEAT_DETAILS, "Manages cheat details settings.") MSG_HASH(MENU_ENUM_SUBLABEL_INPUT_META_CHEAT_SEARCH, "Start or continue a cheat code search.") MSG_HASH(MENU_ENUM_SUBLABEL_RESTART_CONTENT, "Επανεκκινεί το περιεχόμενο από την αρχή.") MSG_HASH(MENU_ENUM_SUBLABEL_SAVE_CURRENT_CONFIG_OVERRIDE_CORE, "Saves an override configuration file which will apply for all content loaded with this core. Will take precedence over the main configuration.") MSG_HASH(MENU_ENUM_SUBLABEL_SAVE_CURRENT_CONFIG_OVERRIDE_CONTENT_DIR, "Saves an override configuration file which will apply for all content loaded from the same directory as the current file. Will take precedence over the main configuration.") MSG_HASH(MENU_ENUM_SUBLABEL_SAVE_CURRENT_CONFIG_OVERRIDE_GAME, "Saves an override configuration file which will apply for the current content only. Will take precedence over the main configuration.") MSG_HASH(MENU_ENUM_SUBLABEL_CORE_CHEAT_OPTIONS, "Στήσιμο κωδικών απάτης.") MSG_HASH(MENU_ENUM_SUBLABEL_SHADER_OPTIONS, "Στήσιμο σκιάσεων για την οπτική βελτίωση της εικόνας.") MSG_HASH(MENU_ENUM_SUBLABEL_CORE_INPUT_REMAPPING_OPTIONS, "Αλλαγή χειρισμών για το τρέχον εκτελούμενο περιεχόμενο.") MSG_HASH(MENU_ENUM_SUBLABEL_CORE_OPTIONS, "Αλλαγή επιλογών για το τρέχον εκτελούμενο περιεχόμενο.") MSG_HASH(MENU_ENUM_SUBLABEL_SHOW_ADVANCED_SETTINGS, "Show advanced settings for power users (hidden by default).") MSG_HASH(MENU_ENUM_SUBLABEL_THREADED_DATA_RUNLOOP_ENABLE, "Perform tasks on a separate thread.") MSG_HASH(MENU_ENUM_SUBLABEL_PLAYLIST_ENTRY_REMOVE, "Επιτρέψτε στον χρήστη να καταργεί τις καταχωρήσεις από την συλλογή.") MSG_HASH(MENU_ENUM_SUBLABEL_SYSTEM_DIRECTORY, "Sets the System directory. Cores can query for this directory to load BIOSes, system-specific configs, etc.") MSG_HASH(MENU_ENUM_SUBLABEL_RGUI_BROWSER_DIRECTORY, "Sets start directory for the filebrowser.") MSG_HASH(MENU_ENUM_SUBLABEL_CONTENT_DIR, "Usually set by developers who bundle libretro/RetroArch apps to point to assets.") MSG_HASH(MENU_ENUM_SUBLABEL_DYNAMIC_WALLPAPERS_DIRECTORY, "Directory to store wallpapers dynamically loaded by the menu depending on context.") MSG_HASH(MENU_ENUM_SUBLABEL_THUMBNAILS_DIRECTORY, "Supplementary thumbnails (boxarts/misc. images, etc.) are stored here.") MSG_HASH(MENU_ENUM_SUBLABEL_RGUI_CONFIG_DIRECTORY, "Sets start directory for menu configuration browser.") MSG_HASH(MENU_ENUM_SUBLABEL_NETPLAY_INPUT_LATENCY_FRAMES_MIN, "The number of frames of input latency for netplay to use to hide network latency. Reduces jitter and makes netplay less CPU-intensive, at the expense of noticeable input lag.") MSG_HASH(MENU_ENUM_SUBLABEL_NETPLAY_INPUT_LATENCY_FRAMES_RANGE, "The range of frames of input latency that may be used to hide network latency. Reduces jitter and makes netplay less CPU-intensive, at the expense of unpredictable input lag.") MSG_HASH(MENU_ENUM_SUBLABEL_DISK_CYCLE_TRAY_STATUS, "Cycle the current disk. If the disk is inserted, it will eject the disk. If the disk has not been inserted, it will be inserted. ") MSG_HASH(MENU_ENUM_SUBLABEL_DISK_INDEX, "Change the disk index.") MSG_HASH(MENU_ENUM_SUBLABEL_DISK_OPTIONS, "Disk image management.") MSG_HASH(MENU_ENUM_SUBLABEL_DISK_IMAGE_APPEND, "Select a disk image to insert.") MSG_HASH(MENU_ENUM_SUBLABEL_MENU_ENUM_THROTTLE_FRAMERATE, "Makes sure the framerate is capped while inside the menu.") MSG_HASH(MENU_ENUM_SUBLABEL_VRR_RUNLOOP_ENABLE, "No deviation from core requested timing. Use for Variable Refresh Rate screens, G-Sync, FreeSync.") MSG_HASH(MENU_ENUM_SUBLABEL_XMB_LAYOUT, "Select a different layout for the XMB interface.") MSG_HASH(MENU_ENUM_SUBLABEL_XMB_THEME, "Select a different theme for the icon. Changes will take effect after you restart the program.") MSG_HASH(MENU_ENUM_SUBLABEL_XMB_SHADOWS_ENABLE, "Enable drop shadows for all icons. This will have a minor performance hit.") MSG_HASH(MENU_ENUM_SUBLABEL_MATERIALUI_MENU_COLOR_THEME, "Select a different background color gradient theme.") MSG_HASH(MENU_ENUM_SUBLABEL_MENU_WALLPAPER_OPACITY, "Modify the opacity of the background wallpaper.") MSG_HASH(MENU_ENUM_SUBLABEL_XMB_MENU_COLOR_THEME, "Select a different background color gradient theme.") MSG_HASH(MENU_ENUM_SUBLABEL_XMB_RIBBON_ENABLE, "Select an animated background effect. Can be GPU-intensive depending on the effect. If performance is unsatisfactory, either turn this off or revert to a simpler effect.") MSG_HASH(MENU_ENUM_SUBLABEL_XMB_FONT, "Select a different main font to be used by the menu.") MSG_HASH(MENU_ENUM_SUBLABEL_CONTENT_SHOW_FAVORITES, "Προβολή καρτέλας αγαπημένων μέσα στο μενού.") MSG_HASH(MENU_ENUM_SUBLABEL_CONTENT_SHOW_IMAGES, "Προβολή καρτέλας εικόνων μέσα στο μενού.") MSG_HASH(MENU_ENUM_SUBLABEL_CONTENT_SHOW_MUSIC, "Προβολή καρτέλας μουσικής μέσα στο μενού.") MSG_HASH(MENU_ENUM_SUBLABEL_CONTENT_SHOW_VIDEO, "Προβολή καρτέλας βίντεο μέσα στο μενού.") MSG_HASH(MENU_ENUM_SUBLABEL_CONTENT_SHOW_NETPLAY, "Προβολή καρτέλας netplay μέσα στο μενού.") MSG_HASH(MENU_ENUM_SUBLABEL_CONTENT_SHOW_SETTINGS, "Προβολή καρτέλας ρυθμίσεων μέσα στο μενού.") MSG_HASH(MENU_ENUM_SUBLABEL_CONTENT_SHOW_HISTORY, "Προβολή καρτέλας πρόσφατου ιστορικού μέσα στο μενού.") MSG_HASH(MENU_ENUM_SUBLABEL_CONTENT_SHOW_ADD, "Προβολή καρτέλας εισαγωγής περιεχομένου μέσα στο μενού.") MSG_HASH(MENU_ENUM_SUBLABEL_CONTENT_SHOW_PLAYLISTS, "Προβολή καρτέλας λίστας αναπαραγωγής μέσα στο μενού.") MSG_HASH(MENU_ENUM_SUBLABEL_RGUI_SHOW_START_SCREEN, "Προβολή οθόνης εκκίνησης στο μενού. Τίθεται αυτόματα σε αρνητικό μετά την πρώτη εκκίνηση του προγράμματος.") MSG_HASH(MENU_ENUM_SUBLABEL_MATERIALUI_MENU_HEADER_OPACITY, "Modify the opacity of the header graphic.") MSG_HASH(MENU_ENUM_SUBLABEL_MATERIALUI_MENU_FOOTER_OPACITY, "Modify the opacity of the footer graphic.") MSG_HASH(MENU_ENUM_SUBLABEL_DPI_OVERRIDE_ENABLE, "The menu normally scales itself dynamically. If you want to set a specific scaling size instead, enable this.") MSG_HASH(MENU_ENUM_SUBLABEL_DPI_OVERRIDE_VALUE, "Set the custom scaling size here.\n" "NOTE: You have to enable 'DPI Override' for this scaling size to take effect.") MSG_HASH(MENU_ENUM_SUBLABEL_CORE_ASSETS_DIRECTORY, "Save all downloaded files to this directory.") MSG_HASH(MENU_ENUM_SUBLABEL_INPUT_REMAPPING_DIRECTORY, "Save all remapped controls to this directory.") MSG_HASH(MENU_ENUM_SUBLABEL_LIBRETRO_DIR_PATH, "Directory where the program searches for content/cores.") MSG_HASH(MENU_ENUM_SUBLABEL_LIBRETRO_INFO_PATH, "Application/core information files are stored here.") MSG_HASH(MENU_ENUM_SUBLABEL_JOYPAD_AUTOCONFIG_DIR, "If a joypad is plugged in, that joypad will be autoconfigured if a config file corresponding to it is present inside this directory.") MSG_HASH(MENU_ENUM_SUBLABEL_PLAYLIST_DIRECTORY, "Save all collections to this directory.") MSG_HASH(MENU_ENUM_SUBLABEL_CACHE_DIRECTORY, "If set to a directory, content which is temporarily extracted (e.g. from archives) will be extracted to this directory.") MSG_HASH(MENU_ENUM_SUBLABEL_CURSOR_DIRECTORY, "Saved queries are stored to this directory.") MSG_HASH(MENU_ENUM_SUBLABEL_CONTENT_DATABASE_DIRECTORY, "Databases are stored to this directory.") MSG_HASH(MENU_ENUM_SUBLABEL_ASSETS_DIRECTORY, "This location is queried by default when menu interfaces try to look for loadable assets, etc.") MSG_HASH(MENU_ENUM_SUBLABEL_SAVEFILE_DIRECTORY, "Save all save files to this directory. If not set, will try to save inside the content file's working directory.") MSG_HASH(MENU_ENUM_SUBLABEL_SAVESTATE_DIRECTORY, "Save all save states to this directory. If not set, will try to save inside the content file's working directory.") MSG_HASH(MENU_ENUM_SUBLABEL_SCREENSHOT_DIRECTORY, "Directory to dump screenshots to.") MSG_HASH(MENU_ENUM_SUBLABEL_OVERLAY_DIRECTORY, "Ορίζει ένα ευρετήριο όπου τα επικαλλύματα αποθηκεύονται για εύκολη πρόσβαση.") MSG_HASH(MENU_ENUM_SUBLABEL_CHEAT_DATABASE_PATH, "Τα αρχεία απάτης αποθηκεύονται εδώ.") MSG_HASH(MENU_ENUM_SUBLABEL_AUDIO_FILTER_DIR, "Directory where audio DSP filter files are kept.") MSG_HASH(MENU_ENUM_SUBLABEL_VIDEO_FILTER_DIR, "Directory where CPU-based video filter files are kept.") MSG_HASH(MENU_ENUM_SUBLABEL_VIDEO_SHADER_DIR, "Defines a directory where GPU-based video shader files are kept for easy access.") MSG_HASH(MENU_ENUM_SUBLABEL_RECORDING_OUTPUT_DIRECTORY, "Recordings will be dumped to this directory.") MSG_HASH(MENU_ENUM_SUBLABEL_RECORDING_CONFIG_DIRECTORY, "Recording configurations will be kept here.") MSG_HASH(MENU_ENUM_SUBLABEL_VIDEO_FONT_PATH, "Select a different font for onscreen notifications.") MSG_HASH(MENU_ENUM_SUBLABEL_SHADER_APPLY_CHANGES, "Changes to the shader configuration will take effect immediately. Use this if you changed the amount of shader passes, filtering, FBO scale, etc.") MSG_HASH(MENU_ENUM_SUBLABEL_VIDEO_SHADER_NUM_PASSES, "Increase or decrease the amount of shader pipeline passes. You can bind a separate shader to each pipeline pass and configure its scale and filtering.") MSG_HASH(MENU_ENUM_SUBLABEL_VIDEO_SHADER_PRESET, "Load a shader preset. The shader pipeline will be automatically set-up.") MSG_HASH(MENU_ENUM_SUBLABEL_VIDEO_SHADER_PRESET_SAVE_AS, "Save the current shader settings as a new shader preset.") MSG_HASH(MENU_ENUM_SUBLABEL_VIDEO_SHADER_PRESET_SAVE_CORE, "Save the current shader settings as the default settings for this application/core.") MSG_HASH(MENU_ENUM_SUBLABEL_VIDEO_SHADER_PRESET_SAVE_PARENT, "Save the current shader settings as the default settings for all files in the current content directory.") MSG_HASH(MENU_ENUM_SUBLABEL_VIDEO_SHADER_PRESET_SAVE_GAME, "Save the current shader settings as the default settings for the content.") MSG_HASH(MENU_ENUM_SUBLABEL_VIDEO_SHADER_PARAMETERS, "Modifies the current shader directly. Changes will not be saved to the preset file.") MSG_HASH(MENU_ENUM_SUBLABEL_VIDEO_SHADER_PRESET_PARAMETERS, "Modifies the shader preset itself currently used in the menu.") MSG_HASH(MENU_ENUM_SUBLABEL_CHEAT_NUM_PASSES, "Increase or decrease the amount of cheats.") MSG_HASH(MENU_ENUM_SUBLABEL_CHEAT_APPLY_CHANGES, "Cheat changes will take effect immediately.") MSG_HASH(MENU_ENUM_SUBLABEL_CHEAT_START_SEARCH, "Start search for a new cheat. Number of bits can be changed.") MSG_HASH(MENU_ENUM_SUBLABEL_CHEAT_CONTINUE_SEARCH, "Continue search for a new cheat.") MSG_HASH(MENU_ENUM_SUBLABEL_CHEAT_FILE_LOAD, "Load a cheat file and replace existing cheats.") MSG_HASH(MENU_ENUM_SUBLABEL_CHEAT_FILE_LOAD_APPEND, "Load a cheat file and append to existing cheats.") MSG_HASH(MENU_ENUM_SUBLABEL_CHEAT_FILE_SAVE_AS, "Save current cheats as a save file.") MSG_HASH(MENU_ENUM_SUBLABEL_CONTENT_SETTINGS, "Γρήγορα πρόσβαση σε όλες τις σχετικές ρυθμίσεις παιχνιδιού.") MSG_HASH(MENU_ENUM_SUBLABEL_CORE_INFORMATION, "View information pertaining to the application/core.") MSG_HASH(MENU_ENUM_SUBLABEL_VIDEO_ASPECT_RATIO, "Floating point value for video aspect ratio (width / height), used if the Aspect Ratio is set to 'Config'.") MSG_HASH(MENU_ENUM_SUBLABEL_VIDEO_VIEWPORT_CUSTOM_HEIGHT, "Προτιμώμενο ύψος οπτικής γωνίας το οποίο χρησιμοποιείται εάν η Αναλογία Οθόνης είναι ορισμένη ως 'Προτιμώμενη'.") MSG_HASH(MENU_ENUM_SUBLABEL_VIDEO_VIEWPORT_CUSTOM_WIDTH, "Προτιμώμενο πλάτος οπτικής γωνίας το οποίο χρησιμοποιείται εάν η Αναλογία Οθόνης είναι ορισμένη ως 'Προτιμώμενη'.") MSG_HASH(MENU_ENUM_SUBLABEL_VIDEO_VIEWPORT_CUSTOM_X, "Προτιμώμενη απόκλειση οπτικής γωνίας για τον ορισμό της θέσης του άξωνα X της οπτικής γωνίας. Αυτό αγνοείται εάν έχεται ενεργοποιήσει την 'Ακέραια Κλίμακα'. Τότε θα κεντραριστεί αυτόματα.") MSG_HASH(MENU_ENUM_SUBLABEL_VIDEO_VIEWPORT_CUSTOM_Y, "Προτιμώμενη απόκλειση οπτικής γωνίας για τον ορισμό της θέσης του άξωνα Y της οπτικής γωνίας. Αυτό αγνοείται εάν έχεται ενεργοποιήσει την 'Ακέραια Κλίμακα'. Τότε θα κεντραριστεί αυτόματα.") MSG_HASH(MENU_ENUM_LABEL_VALUE_NETPLAY_USE_MITM_SERVER, "Χρήση Εξυπηρετητή Αναμετάδοσης") MSG_HASH(MENU_ENUM_SUBLABEL_NETPLAY_USE_MITM_SERVER, "Forward netplay connections through a man-in-the-middle server. Useful if the host is behind a firewall or has NAT/UPnP problems.") MSG_HASH(MENU_ENUM_LABEL_VALUE_NETPLAY_MITM_SERVER, "Τοποθεσία Εξυπηρετητή Αναμετάδοσης") MSG_HASH(MENU_ENUM_SUBLABEL_NETPLAY_MITM_SERVER, "Choose a specific relay server to use. Geographically closer locations tend to have lower latency.") MSG_HASH(MENU_ENUM_LABEL_VALUE_ADD_TO_MIXER, "Προσθήκη στον μίκτη") MSG_HASH(MENU_ENUM_LABEL_VALUE_ADD_TO_MIXER_AND_PLAY, "Προσθήκη στον μίκτη και αναπαραγωγή") MSG_HASH(MENU_ENUM_LABEL_VALUE_ADD_TO_MIXER_AND_COLLECTION, "Προσθήκη στον μίκτη") MSG_HASH(MENU_ENUM_LABEL_VALUE_ADD_TO_MIXER_AND_COLLECTION_AND_PLAY, "Προσθήκη στον μίκτη και αναπαραγωγή") MSG_HASH(MENU_ENUM_LABEL_VALUE_FILTER_BY_CURRENT_CORE, "Φιλτράρισμα με βάση τον τρέχων πυρήνα") MSG_HASH(MSG_AUDIO_MIXER_VOLUME, "Γενική ένταση μίκτη ήχου") MSG_HASH(MENU_ENUM_SUBLABEL_AUDIO_MIXER_VOLUME, "Γενική ένταση μίκτη ήχου (σε dB). Το 0 είναι η φυσιολογική ένταση και δεν εφαρμόζεται gain.") MSG_HASH(MENU_ENUM_LABEL_VALUE_AUDIO_MIXER_VOLUME, "Επίπεδο Έντασης Μίκτη Ήχου (dB)") MSG_HASH(MENU_ENUM_LABEL_VALUE_AUDIO_MIXER_MUTE, "Σίγαση Μίκτη Ήχου") MSG_HASH(MENU_ENUM_SUBLABEL_AUDIO_MIXER_MUTE, "Σίγαση/κατάργηση σίγασης μίκτη ήχου.") MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_SHOW_ONLINE_UPDATER, "Προβολή Διαδικτυακού Ενημερωτή") MSG_HASH(MENU_ENUM_SUBLABEL_MENU_SHOW_ONLINE_UPDATER, "Εμφάνιση/απόκρυψη της επιλογής 'Διαδικτυακού Ενημερωτή'.") MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_VIEWS_SETTINGS, "Προβολές") MSG_HASH(MENU_ENUM_SUBLABEL_MENU_VIEWS_SETTINGS, "Προβολή ή απόκρυψη στοιχείων στην οθόνη του μενού.") MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_SHOW_CORE_UPDATER, "Προβολή Ενημερωτή Πυρήνων") MSG_HASH(MENU_ENUM_SUBLABEL_MENU_SHOW_CORE_UPDATER, "Εμφάνιση/απόκρυψη της ικανότητας ενημέρωσης πυρήνων (και πληροφοριακών αρχείων πυρήνων).") MSG_HASH(MSG_PREPARING_FOR_CONTENT_SCAN, "Προετοιμασία για σάρωση περιεχομένου...") MSG_HASH(MENU_ENUM_LABEL_VALUE_CORE_DELETE, "Διαγραφή πυρήνα") MSG_HASH(MENU_ENUM_SUBLABEL_CORE_DELETE, "Κατάργηση αυτού του πυρήνα από τον δίσκο.") MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_FRAMEBUFFER_OPACITY, "Framebuffer Opacity") MSG_HASH(MENU_ENUM_SUBLABEL_MENU_FRAMEBUFFER_OPACITY, "Modify the opacity of the framebuffer.") MSG_HASH(MENU_ENUM_LABEL_VALUE_GOTO_FAVORITES, "Αγαπημένα") MSG_HASH(MENU_ENUM_SUBLABEL_GOTO_FAVORITES, "Περιεχόμενο που έχετε προσθέσει στα 'Αγαπημένα' θα εμφανίζεται εδώ.") MSG_HASH(MENU_ENUM_LABEL_VALUE_GOTO_MUSIC, "Μουσική") MSG_HASH(MENU_ENUM_SUBLABEL_GOTO_MUSIC, "Μουσική που έχει προηγουμένως αναπαραχθεί θα εμφανίζονται εδώ.") MSG_HASH(MENU_ENUM_LABEL_VALUE_GOTO_IMAGES, "Εικόνα") MSG_HASH(MENU_ENUM_SUBLABEL_GOTO_IMAGES, "Εικόνες που έχουν προηγουμένως προβληθεί θα εμφανίζονται εδώ.") MSG_HASH(MENU_ENUM_LABEL_VALUE_GOTO_VIDEO, "Βίντεο") MSG_HASH(MENU_ENUM_SUBLABEL_GOTO_VIDEO, "Βίντεο που έχουν προηγουμένως αναπαραχθεί θα εμφανίζονται εδώ.") MSG_HASH(MENU_ENUM_LABEL_VALUE_MATERIALUI_ICONS_ENABLE, "Εικονίδια Μενού") MSG_HASH(MENU_ENUM_SUBLABEL_MATERIALUI_ICONS_ENABLE, "Ενεργοποίηση/Απενεργοποίηση των εικονιδίων που εμφανίζονται στα αριστερά των καταχωρήσεων του μενού.") MSG_HASH(MENU_ENUM_LABEL_VALUE_XMB_MAIN_MENU_ENABLE_SETTINGS, "Ενεργοποίηση Καρτέλας Μενού") MSG_HASH(MENU_ENUM_LABEL_VALUE_CONTENT_SHOW_SETTINGS_PASSWORD, "Ορισμός Κωδικού Για Την Ενεργοποίηση Της Καρτέλας Ρυθμίσεων") MSG_HASH(MSG_INPUT_ENABLE_SETTINGS_PASSWORD, "Εισαγωγή Κωδικού") MSG_HASH(MSG_INPUT_ENABLE_SETTINGS_PASSWORD_OK, "Σωστός κωδικός.") MSG_HASH(MSG_INPUT_ENABLE_SETTINGS_PASSWORD_NOK, "Λανθασμένος κωδικός.") MSG_HASH(MENU_ENUM_SUBLABEL_XMB_MAIN_MENU_ENABLE_SETTINGS, "Ενεργοποιεί την καρτέλα Ρυθμίσεις. Χρειάζεται επανεκκίνηση για να εμφανιστεί η καρτέλα.") MSG_HASH(MENU_ENUM_SUBLABEL_CONTENT_SHOW_SETTINGS_PASSWORD, "Supplying a password when hiding the settings tab makes it possible to later restore it from the menu, by going to the Main Menu tab, selecting Enable Settings Tab and entering the password.") MSG_HASH(MENU_ENUM_SUBLABEL_PLAYLIST_ENTRY_RENAME, "Επιτρέψτε στον χρήστη να μετονομάζει τις καταχωρήσεις στην συλλογή.") MSG_HASH(MENU_ENUM_LABEL_VALUE_PLAYLIST_ENTRY_RENAME, "Επίτρεψη μετονομασίας καταχωρήσεων") MSG_HASH(MENU_ENUM_SUBLABEL_RENAME_ENTRY, "Μετονομασία του τίτλου αυτής της καταχώρησης.") MSG_HASH(MENU_ENUM_LABEL_VALUE_RENAME_ENTRY, "Μετονομασία") MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_SHOW_LOAD_CORE, "Προβολή Φόρτωσης Πυρήνα") MSG_HASH(MENU_ENUM_SUBLABEL_MENU_SHOW_LOAD_CORE, "Εμφάνιση/απόκρυψη της επιλογής 'Φόρτωση Πυρήνα'.") MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_SHOW_LOAD_CONTENT, "Προβολή Φόρτωσης Περιεχομένου") MSG_HASH(MENU_ENUM_SUBLABEL_MENU_SHOW_LOAD_CONTENT, "Εμφάνιση/απόκρυψη της επιλογής 'Φόρτωση Περιεχομένου'.") MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_SHOW_INFORMATION, "Προβολή Πληροφοριών") MSG_HASH(MENU_ENUM_SUBLABEL_MENU_SHOW_INFORMATION, "Εμφάνιση/απόκρυψη της επιλογής 'Πληροφορίες'.") MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_SHOW_CONFIGURATIONS, "Προβολή Διαμορφώσεων") MSG_HASH(MENU_ENUM_SUBLABEL_MENU_SHOW_CONFIGURATIONS, "Εμφάνιση/απόκρυψη της επιλογής 'Διαμορφώσεις'.") MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_SHOW_HELP, "Προβολή Βοήθειας") MSG_HASH(MENU_ENUM_SUBLABEL_MENU_SHOW_HELP, "Εμφάνιση/απόκρυψη της επιλογής 'Βοήθεια'.") MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_SHOW_QUIT_RETROARCH, "Προβολή Εξόδου RetroArch") MSG_HASH(MENU_ENUM_SUBLABEL_MENU_SHOW_QUIT_RETROARCH, "Εμφάνιση/απόκρυψη της επιλογής 'Έξοδος από RetroArch'.") MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_SHOW_REBOOT, "Προβολή Επανεκκίνησης") MSG_HASH(MENU_ENUM_SUBLABEL_MENU_SHOW_REBOOT, "Εμφάνιση/απόκρυψη της επιλογής 'Επανεκκίνηση'.") MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_SHOW_SHUTDOWN, "Show Shutdown") MSG_HASH(MENU_ENUM_SUBLABEL_MENU_SHOW_SHUTDOWN, "Show/hide the 'Shutdown' option.") MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_VIEWS_SETTINGS, "Γρήγορο Μενού") MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_VIEWS_SETTINGS, "Show or hide elements on the Quick Menu screen.") MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_TAKE_SCREENSHOT, "Show Take Screenshot") MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_TAKE_SCREENSHOT, "Show/hide the 'Take Screenshot' option.") MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_SAVE_LOAD_STATE, "Show Save/Load State") MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_SAVE_LOAD_STATE, "Show/hide the options for saving/loading state.") MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_UNDO_SAVE_LOAD_STATE, "Show Undo Save/Load State") MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_UNDO_SAVE_LOAD_STATE, "Show/hide the options for undoing save/load state.") MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_ADD_TO_FAVORITES, "Show Add to Favorites") MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_ADD_TO_FAVORITES, "Show/hide the 'Add to Favorites' option.") MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_START_RECORDING, "Show Start Recording") MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_START_RECORDING, "Show/hide the 'Start Recording' option.") MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_START_STREAMING, "Show Start Streaming") MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_START_STREAMING, "Show/hide the 'Start Streaming' option.") MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_RESET_CORE_ASSOCIATION, "Show Reset Core Association") MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_RESET_CORE_ASSOCIATION, "Show/hide the 'Reset Core Association' option.") MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_OPTIONS, "Show Options") MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_OPTIONS, "Show/hide the 'Options' option.") MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_CONTROLS, "Show Controls") MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_CONTROLS, "Show/hide the 'Controls' option.") MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_CHEATS, "Show Cheats") MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_CHEATS, "Show/hide the 'Cheats' option.") MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_SHADERS, "Show Shaders") MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_SHADERS, "Show/hide the 'Shaders' option.") MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_SAVE_CORE_OVERRIDES, "Show Save Core Overrides") MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_SAVE_CORE_OVERRIDES, "Show/hide the 'Save Core Overrides' option.") MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_SAVE_GAME_OVERRIDES, "Show Save Game Overrides") MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_SAVE_GAME_OVERRIDES, "Show/hide the 'Save Game Overrides' option.") MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_INFORMATION, "Show Information") MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_INFORMATION, "Show/hide the 'Information' option.") MSG_HASH(MENU_ENUM_LABEL_VALUE_VIDEO_MESSAGE_BGCOLOR_ENABLE, "Notification Background Enable") MSG_HASH(MENU_ENUM_LABEL_VALUE_VIDEO_MESSAGE_BGCOLOR_RED, "Notification Background Red Color") MSG_HASH(MENU_ENUM_LABEL_VALUE_VIDEO_MESSAGE_BGCOLOR_GREEN, "Notification Background Green Color") MSG_HASH(MENU_ENUM_LABEL_VALUE_VIDEO_MESSAGE_BGCOLOR_BLUE, "Notification Background Blue Color") MSG_HASH(MENU_ENUM_LABEL_VALUE_VIDEO_MESSAGE_BGCOLOR_OPACITY, "Notification Background Opacity") MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_DISABLE_KIOSK_MODE, "Disable Kiosk Mode") MSG_HASH(MENU_ENUM_SUBLABEL_MENU_DISABLE_KIOSK_MODE, "Disables kiosk mode. A restart is required for the change to take full effect.") MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_ENABLE_KIOSK_MODE, "Ενεργοποίηση Λειτουργίας Κιόσκι") MSG_HASH(MENU_ENUM_SUBLABEL_MENU_ENABLE_KIOSK_MODE, "Protects the setup by hiding all configuration related settings.") MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_KIOSK_MODE_PASSWORD, "Set Password For Disabling Kiosk Mode") MSG_HASH(MENU_ENUM_SUBLABEL_MENU_KIOSK_MODE_PASSWORD, "Supplying a password when enabling kiosk mode makes it possible to later disable it from the menu, by going to the Main Menu, selecting Disable Kiosk Mode and entering the password.") MSG_HASH(MSG_INPUT_KIOSK_MODE_PASSWORD, "Εισαγωγή Κωδικού") MSG_HASH(MSG_INPUT_KIOSK_MODE_PASSWORD_OK, "Σωστός κωδικός.") MSG_HASH(MSG_INPUT_KIOSK_MODE_PASSWORD_NOK, "Λανθασμένος κωδικός.") MSG_HASH(MENU_ENUM_LABEL_VALUE_VIDEO_MESSAGE_COLOR_RED, "Notification Red Color") MSG_HASH(MENU_ENUM_LABEL_VALUE_VIDEO_MESSAGE_COLOR_GREEN, "Notification Green Color") MSG_HASH(MENU_ENUM_LABEL_VALUE_VIDEO_MESSAGE_COLOR_BLUE, "Notification Blue Color") MSG_HASH(MENU_ENUM_LABEL_VALUE_FRAMECOUNT_SHOW, "Display Frame Count") MSG_HASH(MSG_CONFIG_OVERRIDE_LOADED, "Configuration override loaded.") MSG_HASH(MSG_GAME_REMAP_FILE_LOADED, "Game remap file loaded.") MSG_HASH(MSG_CORE_REMAP_FILE_LOADED, "Core remap file loaded.") MSG_HASH(MSG_RUNAHEAD_CORE_DOES_NOT_SUPPORT_SAVESTATES, "RunAhead has been disabled because this core does not support save states.") MSG_HASH(MSG_RUNAHEAD_FAILED_TO_SAVE_STATE, "Failed to save state. RunAhead has been disabled.") MSG_HASH(MSG_RUNAHEAD_FAILED_TO_LOAD_STATE, "Failed to load state. RunAhead has been disabled.") MSG_HASH(MSG_RUNAHEAD_FAILED_TO_CREATE_SECONDARY_INSTANCE, "Failed to create second instance. RunAhead will now use only one instance.") MSG_HASH(MENU_ENUM_LABEL_VALUE_AUTOMATICALLY_ADD_CONTENT_TO_PLAYLIST, "Automatically add content to playlist") MSG_HASH(MENU_ENUM_SUBLABEL_AUTOMATICALLY_ADD_CONTENT_TO_PLAYLIST, "Automatically scans loaded content so they appear inside playlists.") MSG_HASH(MSG_SCANNING_OF_FILE_FINISHED, "Scanning of file finished") MSG_HASH(MENU_ENUM_LABEL_VALUE_VIDEO_WINDOW_OPACITY, "Διαφάνεια Παραθύρου") MSG_HASH(MENU_ENUM_LABEL_VALUE_AUDIO_RESAMPLER_QUALITY, "Ποιότητα Επαναδειγματολήπτη Ήχου") MSG_HASH(MENU_ENUM_SUBLABEL_AUDIO_RESAMPLER_QUALITY, "Ελαττώστε αυτή την τιμή για καλύτερη επίδοση/χαμηλότερη καθυστέρηση αντί ποιότητας ήχου, αυξήστε εάν θέλετε καλύτερη ποιότητα με κόστος στην επίδοση/χαμηλότερη καθυστέρηση.") MSG_HASH(MENU_ENUM_LABEL_VALUE_SHADER_WATCH_FOR_CHANGES, "Watch shader files for changes") MSG_HASH(MENU_ENUM_SUBLABEL_SHADER_WATCH_FOR_CHANGES, "Auto-apply changes made to shader files on disk.") MSG_HASH(MENU_ENUM_LABEL_VALUE_VIDEO_WINDOW_SHOW_DECORATIONS, "Εμφάνιση Διακοσμητικών Παραθύρου") MSG_HASH(MENU_ENUM_LABEL_VALUE_STATISTICS_SHOW, "Εμφάνιση Στατιστικών") MSG_HASH(MENU_ENUM_SUBLABEL_STATISTICS_SHOW, "Εμφάνιση τεχνικών στατιστικών στην οθόνη.") MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_RGUI_BORDER_FILLER_ENABLE, "Enable border filler") MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_RGUI_BORDER_FILLER_THICKNESS_ENABLE, "Enable border filler thickness") MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_RGUI_BACKGROUND_FILLER_THICKNESS_ENABLE, "Enable background filler thickness") MSG_HASH(MENU_ENUM_SUBLABEL_CRT_SWITCH_RESOLUTION, "Για οθόνες CRT μόνο. Προσπαθεί να χρησιμοποιήσει την ακριβή ανάλυση πυρήνα/παιχνιδιού και ρυθμού ανανέωσης.") MSG_HASH(MENU_ENUM_LABEL_VALUE_CRT_SWITCH_RESOLUTION, "CRT SwitchRes") MSG_HASH(MENU_ENUM_SUBLABEL_CRT_SWITCH_RESOLUTION_SUPER, "Switch among native and ultrawide super resolutions.") MSG_HASH(MENU_ENUM_LABEL_VALUE_CRT_SWITCH_RESOLUTION_SUPER, "Σούπερ Ανάλυση CRT") MSG_HASH(MENU_ENUM_LABEL_VALUE_CONTENT_SHOW_REWIND, "Προβολή Ρυθμίσεων Επιστροφής") MSG_HASH(MENU_ENUM_SUBLABEL_CONTENT_SHOW_REWIND, "Εμφάνιση/απόκρυψη επιλογών Επιστροφής.") MSG_HASH(MENU_ENUM_SUBLABEL_CONTENT_SHOW_LATENCY, "Εμφάνιση/απόκρυψη επιλογών Καθυστέρησης.") MSG_HASH(MENU_ENUM_LABEL_VALUE_CONTENT_SHOW_LATENCY, "Προβολή Ρυθμίσεων Καθυστέρησης") MSG_HASH(MENU_ENUM_SUBLABEL_CONTENT_SHOW_OVERLAYS, "Εμφάνιση/απόκρυψη επιλογών Επικαλλυμάτων.") MSG_HASH(MENU_ENUM_LABEL_VALUE_CONTENT_SHOW_OVERLAYS, "Προβολή Ρυθμίσεων Επικαλλυμάτων") MSG_HASH(MENU_ENUM_LABEL_VALUE_AUDIO_ENABLE_MENU, "Ενεργοποίηση ήχου μενού") MSG_HASH(MENU_ENUM_SUBLABEL_AUDIO_ENABLE_MENU, "Ενεργοποίηση ή απενεργοποίηση ήχου μενού.") MSG_HASH(MENU_ENUM_LABEL_VALUE_AUDIO_MIXER_SETTINGS, "Ρυθμίσεις Μίκτη") MSG_HASH(MENU_ENUM_SUBLABEL_AUDIO_MIXER_SETTINGS, "Εμφάνιση και/ή επεξεργασία ρυθμίσεων μίκτη.") MSG_HASH(MENU_ENUM_LABEL_VALUE_QT_INFO, "Πληροφορίες") MSG_HASH(MENU_ENUM_LABEL_VALUE_QT_MENU_FILE, "&File") MSG_HASH(MENU_ENUM_LABEL_VALUE_QT_MENU_FILE_LOAD_CORE, "&Load Core...") MSG_HASH(MENU_ENUM_LABEL_VALUE_QT_MENU_FILE_UNLOAD_CORE, "&Unload Core") MSG_HASH(MENU_ENUM_LABEL_VALUE_QT_MENU_FILE_EXIT, "E&xit") MSG_HASH(MENU_ENUM_LABEL_VALUE_QT_MENU_EDIT, "&Edit") MSG_HASH(MENU_ENUM_LABEL_VALUE_QT_MENU_EDIT_SEARCH, "&Search") MSG_HASH(MENU_ENUM_LABEL_VALUE_QT_MENU_VIEW, "&View") MSG_HASH(MENU_ENUM_LABEL_VALUE_QT_MENU_VIEW_CLOSED_DOCKS, "Closed Docks") MSG_HASH(MENU_ENUM_LABEL_VALUE_QT_MENU_VIEW_SHADER_PARAMS, "Shader Parameters") MSG_HASH(MENU_ENUM_LABEL_VALUE_QT_MENU_VIEW_OPTIONS, "&Options...") MSG_HASH(MENU_ENUM_LABEL_VALUE_QT_MENU_VIEW_OPTIONS_SAVE_DOCK_POSITIONS, "Remember dock positions:") MSG_HASH(MENU_ENUM_LABEL_VALUE_QT_MENU_VIEW_OPTIONS_SAVE_GEOMETRY, "Remember window geometry:") MSG_HASH(MENU_ENUM_LABEL_VALUE_QT_MENU_VIEW_OPTIONS_SAVE_LAST_TAB, "Remember last content browser tab:") MSG_HASH(MENU_ENUM_LABEL_VALUE_QT_MENU_VIEW_OPTIONS_THEME, "Θέμα:") MSG_HASH(MENU_ENUM_LABEL_VALUE_QT_MENU_VIEW_OPTIONS_THEME_SYSTEM_DEFAULT, "<System Default>") MSG_HASH(MENU_ENUM_LABEL_VALUE_QT_MENU_VIEW_OPTIONS_THEME_DARK, "Σκούρο") MSG_HASH(MENU_ENUM_LABEL_VALUE_QT_MENU_VIEW_OPTIONS_THEME_CUSTOM, "Custom...") MSG_HASH(MENU_ENUM_LABEL_VALUE_QT_MENU_VIEW_OPTIONS_TITLE, "Επιλογές") MSG_HASH(MENU_ENUM_LABEL_VALUE_QT_MENU_TOOLS, "&Tools") MSG_HASH(MENU_ENUM_LABEL_VALUE_QT_MENU_HELP, "&Help") MSG_HASH(MENU_ENUM_LABEL_VALUE_QT_MENU_HELP_ABOUT, "Σχετικά με το RetroArch") MSG_HASH(MENU_ENUM_LABEL_VALUE_QT_MENU_HELP_DOCUMENTATION, "Εγχειρίδιο") MSG_HASH(MENU_ENUM_LABEL_VALUE_QT_LOAD_CUSTOM_CORE, "Load Custom Core...") MSG_HASH(MENU_ENUM_LABEL_VALUE_QT_LOAD_CORE, "Φόρτωση Πυρήνα΄") MSG_HASH(MENU_ENUM_LABEL_VALUE_QT_LOADING_CORE, "Φόρτωση Πυρήνα...") MSG_HASH(MENU_ENUM_LABEL_VALUE_QT_NAME, "Όνομα") MSG_HASH(MENU_ENUM_LABEL_VALUE_QT_CORE_VERSION, "Έκδοση") MSG_HASH(MENU_ENUM_LABEL_VALUE_QT_TAB_PLAYLISTS, "Λίστες Αναπαραγωγής") MSG_HASH(MENU_ENUM_LABEL_VALUE_QT_TAB_FILE_BROWSER, "File Browser") MSG_HASH(MENU_ENUM_LABEL_VALUE_QT_TAB_FILE_BROWSER_TOP, "Top") MSG_HASH(MENU_ENUM_LABEL_VALUE_QT_TAB_FILE_BROWSER_UP, "Up") MSG_HASH(MENU_ENUM_LABEL_VALUE_QT_MENU_DOCK_CONTENT_BROWSER, "Content Browser") MSG_HASH(MENU_ENUM_LABEL_VALUE_QT_THUMBNAIL_BOXART, "Boxart") MSG_HASH(MENU_ENUM_LABEL_VALUE_QT_THUMBNAIL_SCREENSHOT, "Screenshot") MSG_HASH(MENU_ENUM_LABEL_VALUE_QT_THUMBNAIL_TITLE_SCREEN, "Title Screen") MSG_HASH(MENU_ENUM_LABEL_VALUE_QT_ALL_PLAYLISTS, "All Playlists") MSG_HASH(MENU_ENUM_LABEL_VALUE_QT_CORE, "Core") MSG_HASH(MENU_ENUM_LABEL_VALUE_QT_CORE_INFO, "Core Info") MSG_HASH(MENU_ENUM_LABEL_VALUE_QT_CORE_SELECTION_ASK, "<Ask me>") MSG_HASH(MENU_ENUM_LABEL_VALUE_QT_INFORMATION, "Information") MSG_HASH(MENU_ENUM_LABEL_VALUE_QT_WARNING, "Warning") MSG_HASH(MENU_ENUM_LABEL_VALUE_QT_ERROR, "Error") MSG_HASH(MENU_ENUM_LABEL_VALUE_QT_NETWORK_ERROR, "Network Error") MSG_HASH(MENU_ENUM_LABEL_VALUE_QT_RESTART_TO_TAKE_EFFECT, "Please restart the program for the changes to take effect.") MSG_HASH(MENU_ENUM_LABEL_VALUE_QT_LOG, "Log") MSG_HASH(MENU_ENUM_LABEL_VALUE_SHOW_WIMP, "Εμφάνιση Μενού Επιφάνεις Εργασίας") MSG_HASH(MENU_ENUM_SUBLABEL_SHOW_WIMP, "Opens the desktop menu if closed.") MSG_HASH(MENU_ENUM_LABEL_VALUE_QT_DONT_SHOW_AGAIN, "Don't show this again") MSG_HASH(MENU_ENUM_LABEL_VALUE_QT_STOP, "Στοπ") MSG_HASH(MENU_ENUM_LABEL_VALUE_QT_ASSOCIATE_CORE, "Associate Core") MSG_HASH(MENU_ENUM_LABEL_VALUE_QT_HIDDEN_PLAYLISTS, "Hidden Playlists") MSG_HASH(MENU_ENUM_LABEL_VALUE_QT_HIDE, "Hide") MSG_HASH(MENU_ENUM_LABEL_VALUE_QT_MENU_VIEW_OPTIONS_HIGHLIGHT_COLOR, "Highlight color:") MSG_HASH(MENU_ENUM_LABEL_VALUE_QT_CHOOSE, "&Choose...") MSG_HASH(MENU_ENUM_LABEL_VALUE_QT_SELECT_COLOR, "Select Color") MSG_HASH(MENU_ENUM_LABEL_VALUE_QT_SELECT_THEME, "Select Theme") MSG_HASH(MENU_ENUM_LABEL_VALUE_QT_CUSTOM_THEME, "Custom Theme") MSG_HASH(MENU_ENUM_LABEL_VALUE_QT_FILE_PATH_IS_BLANK, "File path is blank.") MSG_HASH(MENU_ENUM_LABEL_VALUE_QT_FILE_IS_EMPTY, "File is empty.") MSG_HASH(MENU_ENUM_LABEL_VALUE_QT_FILE_READ_OPEN_FAILED, "Could not open file for reading.") MSG_HASH(MENU_ENUM_LABEL_VALUE_QT_FILE_WRITE_OPEN_FAILED, "Could not open file for writing.") MSG_HASH(MENU_ENUM_LABEL_VALUE_QT_FILE_DOES_NOT_EXIST, "File does not exist.") MSG_HASH(MENU_ENUM_LABEL_VALUE_QT_MENU_VIEW_OPTIONS_SUGGEST_LOADED_CORE_FIRST, "Suggest loaded core first:") MSG_HASH(MENU_ENUM_LABEL_VALUE_QT_ZOOM, "Zoom") MSG_HASH(MENU_ENUM_LABEL_VALUE_QT_VIEW, "View") MSG_HASH(MENU_ENUM_LABEL_VALUE_QT_VIEW_TYPE_ICONS, "Icons") MSG_HASH(MENU_ENUM_LABEL_VALUE_QT_VIEW_TYPE_LIST, "List") MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_OVERRIDE_OPTIONS, "Overrides") MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_OVERRIDE_OPTIONS, "Options for overriding the global configuration.") MSG_HASH(MENU_ENUM_SUBLABEL_MIXER_ACTION_PLAY, "Will start playback of the audio stream. Once finished, it will remove the current audio stream from memory.") MSG_HASH(MENU_ENUM_SUBLABEL_MIXER_ACTION_PLAY_LOOPED, "Will start playback of the audio stream. Once finished, it will loop and play the track again from the beginning.") MSG_HASH(MENU_ENUM_SUBLABEL_MIXER_ACTION_PLAY_SEQUENTIAL, "Will start playback of the audio stream. Once finished, it will jump to the next audio stream in sequential order and repeat this behavior. Useful as an album playback mode.") MSG_HASH(MENU_ENUM_SUBLABEL_MIXER_ACTION_STOP, "This will stop playback of the audio stream, but not remove it from memory. You can start playing it again by selecting 'Play'.") MSG_HASH(MENU_ENUM_SUBLABEL_MIXER_ACTION_REMOVE, "This will stop playback of the audio stream and remove it entirely from memory.") MSG_HASH(MENU_ENUM_SUBLABEL_MIXER_ACTION_VOLUME, "Adjust the volume of the audio stream.") MSG_HASH(MENU_ENUM_SUBLABEL_ADD_TO_MIXER, "Add this audio track to an available audio stream slot. If no slots are currently available, it will be ignored.") MSG_HASH(MENU_ENUM_SUBLABEL_ADD_TO_MIXER_AND_PLAY, "Add this audio track to an available audio stream slot and play it. If no slots are currently available, it will be ignored.") MSG_HASH(MENU_ENUM_LABEL_VALUE_MIXER_ACTION_PLAY, "Αναπαραγωγή") MSG_HASH(MENU_ENUM_LABEL_VALUE_MIXER_ACTION_PLAY_LOOPED, "Αναπαραγωγή (Looped)") MSG_HASH(MENU_ENUM_LABEL_VALUE_MIXER_ACTION_PLAY_SEQUENTIAL, "Αναπαραγωγή (Sequential)") MSG_HASH(MENU_ENUM_LABEL_VALUE_MIXER_ACTION_STOP, "Στοπ") MSG_HASH(MENU_ENUM_LABEL_VALUE_MIXER_ACTION_REMOVE, "Κατάργηση") MSG_HASH(MENU_ENUM_LABEL_VALUE_MIXER_ACTION_VOLUME, "Ένταση") MSG_HASH(MENU_ENUM_LABEL_VALUE_DETECT_CORE_LIST_OK_CURRENT_CORE, "Τρέχων πυρήνας") MSG_HASH(MENU_ENUM_LABEL_VALUE_QT_MENU_SEARCH_CLEAR, "Clear") MSG_HASH(MENU_ENUM_SUBLABEL_ACHIEVEMENT_PAUSE, "Pause achievements for current session (This action will enable savestates, cheats, rewind, pause, and slow-motion).") MSG_HASH(MENU_ENUM_SUBLABEL_ACHIEVEMENT_RESUME, "Resume achievements for current session (This action will disable savestates, cheats, rewind, pause, and slow-motion and reset the current game).") MSG_HASH(MENU_ENUM_LABEL_VALUE_DISCORD_IN_MENU, "In-Menu") MSG_HASH(MENU_ENUM_LABEL_VALUE_DISCORD_IN_GAME, "In-Game") MSG_HASH(MENU_ENUM_LABEL_VALUE_DISCORD_IN_GAME_PAUSED, "In-Game (Paused)") MSG_HASH(MENU_ENUM_LABEL_VALUE_DISCORD_STATUS_PLAYING, "Playing") MSG_HASH(MENU_ENUM_LABEL_VALUE_DISCORD_STATUS_PAUSED, "Paused") MSG_HASH(MENU_ENUM_LABEL_VALUE_DISCORD_ALLOW, "Ενεργοποίηση Discord Rich Presence") MSG_HASH(MENU_ENUM_SUBLABEL_DISCORD_ALLOW, "Ενεργοποίηση ή απενεργοποίηση υποστήριξης Discord Rich Presence.\n" "ΣΗΜΕΙΩΣΗ: Δεν θα δουλέψει με την έκδοση του περιηγητή, μόνο με την τοπικά εγκατεστημένη.") MSG_HASH(MENU_ENUM_LABEL_VALUE_MIDI_INPUT, "Είσοδος") MSG_HASH(MENU_ENUM_SUBLABEL_MIDI_INPUT, "Επιλογή συσκευής εισόδου.") MSG_HASH(MENU_ENUM_LABEL_VALUE_MIDI_OUTPUT, "Έξοδος") MSG_HASH(MENU_ENUM_SUBLABEL_MIDI_OUTPUT, "Επιλογή συσκευής εξόδου.") MSG_HASH(MENU_ENUM_LABEL_VALUE_MIDI_VOLUME, "Ένταση") MSG_HASH(MENU_ENUM_SUBLABEL_MIDI_VOLUME, "Ορισμός έντασης εξόδου (%).") MSG_HASH(MENU_ENUM_LABEL_VALUE_POWER_MANAGEMENT_SETTINGS, "Διαχείριση Ενέργειας") MSG_HASH(MENU_ENUM_SUBLABEL_POWER_MANAGEMENT_SETTINGS, "Αλλαγή ρυθμίσεων διαχείρισης ενέργειας.") MSG_HASH(MENU_ENUM_LABEL_VALUE_SUSTAINED_PERFORMANCE_MODE, "Κατάσταση Συνεχούς Επίδοσης") MSG_HASH(MENU_ENUM_LABEL_VALUE_SYSTEM_INFO_MPV_SUPPORT, "Υποστήριξη mpv") MSG_HASH(MENU_ENUM_LABEL_VALUE_CHEAT_IDX, "Index") MSG_HASH(MENU_ENUM_LABEL_VALUE_CHEAT_MATCH_IDX, "View Match #") MSG_HASH(MENU_ENUM_LABEL_VALUE_CHEAT_MATCH, "Match Address: %08X Mask: %02X") MSG_HASH(MENU_ENUM_LABEL_VALUE_CHEAT_COPY_MATCH, "Create Code Match #") MSG_HASH(MENU_ENUM_LABEL_VALUE_CHEAT_DELETE_MATCH, "Delete Match #") MSG_HASH(MENU_ENUM_LABEL_VALUE_CHEAT_BROWSE_MEMORY, "Browse Address: %08X") MSG_HASH(MENU_ENUM_LABEL_VALUE_CHEAT_DESC, "Πληροφορίες") MSG_HASH(MENU_ENUM_LABEL_VALUE_CHEAT_STATE, "Ενεργοποιημένο") MSG_HASH(MENU_ENUM_LABEL_VALUE_CHEAT_CODE, "Κωδικός") MSG_HASH(MENU_ENUM_LABEL_VALUE_CHEAT_HANDLER, "Handler") MSG_HASH(MENU_ENUM_LABEL_VALUE_CHEAT_MEMORY_SEARCH_SIZE, "Memory Search Size") MSG_HASH(MENU_ENUM_LABEL_VALUE_CHEAT_TYPE, "Τύπος") MSG_HASH(MENU_ENUM_LABEL_VALUE_CHEAT_VALUE, "Τιμή") MSG_HASH(MENU_ENUM_LABEL_VALUE_CHEAT_ADDRESS, "Memory Address") MSG_HASH(MENU_ENUM_LABEL_VALUE_CHEAT_ADDRESS_BIT_POSITION, "Memory Address Mask") MSG_HASH(MENU_ENUM_LABEL_VALUE_CHEAT_RUMBLE_TYPE, "Rumble When Memory") MSG_HASH(MENU_ENUM_LABEL_VALUE_CHEAT_RUMBLE_VALUE, "Rumble Value") MSG_HASH(MENU_ENUM_LABEL_VALUE_CHEAT_RUMBLE_PORT, "Rumble Port") MSG_HASH(MENU_ENUM_LABEL_VALUE_CHEAT_RUMBLE_PRIMARY_STRENGTH, "Rumble Primary Strength") MSG_HASH(MENU_ENUM_LABEL_VALUE_CHEAT_RUMBLE_PRIMARY_DURATION, "Rumble Primary Duration (ms)") MSG_HASH(MENU_ENUM_LABEL_VALUE_CHEAT_RUMBLE_SECONDARY_STRENGTH, "Rumble Secondary Strength") MSG_HASH(MENU_ENUM_LABEL_VALUE_CHEAT_RUMBLE_SECONDARY_DURATION, "Rumble Secondary Duration (ms)") MSG_HASH(MENU_ENUM_LABEL_VALUE_CHEAT_REPEAT_COUNT, "Number of Iterations") MSG_HASH(MENU_ENUM_LABEL_VALUE_CHEAT_REPEAT_ADD_TO_VALUE, "Value Increase Each Iteration") MSG_HASH(MENU_ENUM_LABEL_VALUE_CHEAT_REPEAT_ADD_TO_ADDRESS, "Address Increase Each Iteration") MSG_HASH(MENU_ENUM_LABEL_VALUE_CHEAT_ADD_NEW_AFTER, "Add New Cheat After This One") MSG_HASH(MENU_ENUM_LABEL_VALUE_CHEAT_ADD_NEW_BEFORE, "Add New Cheat Before This One") MSG_HASH(MENU_ENUM_LABEL_VALUE_CHEAT_COPY_AFTER, "Copy This Cheat After") MSG_HASH(MENU_ENUM_LABEL_VALUE_CHEAT_COPY_BEFORE, "Copy This Cheat Before") MSG_HASH(MENU_ENUM_LABEL_VALUE_CHEAT_DELETE, "Delete This Cheat") MSG_HASH(MENU_ENUM_LABEL_CHEAT_HANDLER_TYPE_EMU, "Emulator") MSG_HASH(MENU_ENUM_LABEL_CHEAT_HANDLER_TYPE_RETRO, "RetroArch") MSG_HASH(MENU_ENUM_LABEL_CHEAT_TYPE_DISABLED, "<Disabled>") MSG_HASH(MENU_ENUM_LABEL_CHEAT_TYPE_SET_TO_VALUE, "Set To Value") MSG_HASH(MENU_ENUM_LABEL_CHEAT_TYPE_INCREASE_VALUE, "Increase By Value") MSG_HASH(MENU_ENUM_LABEL_CHEAT_TYPE_DECREASE_VALUE, "Decrease By Value") MSG_HASH(MENU_ENUM_LABEL_CHEAT_TYPE_RUN_NEXT_IF_EQ, "Run next cheat if value = memory") MSG_HASH(MENU_ENUM_LABEL_CHEAT_TYPE_RUN_NEXT_IF_NEQ, "Run next cheat if value != memory") MSG_HASH(MENU_ENUM_LABEL_CHEAT_TYPE_RUN_NEXT_IF_LT, "Run next cheat if value < memory") MSG_HASH(MENU_ENUM_LABEL_CHEAT_TYPE_RUN_NEXT_IF_GT, "Run next cheat if value > memory") MSG_HASH(MENU_ENUM_LABEL_RUMBLE_TYPE_DISABLED, "<Disabled>") MSG_HASH(MENU_ENUM_LABEL_RUMBLE_TYPE_CHANGES, "Changes") MSG_HASH(MENU_ENUM_LABEL_RUMBLE_TYPE_DOES_NOT_CHANGE, "Does Not Change") MSG_HASH(MENU_ENUM_LABEL_RUMBLE_TYPE_INCREASE, "Increases") MSG_HASH(MENU_ENUM_LABEL_RUMBLE_TYPE_DECREASE, "Decreases") MSG_HASH(MENU_ENUM_LABEL_RUMBLE_TYPE_EQ_VALUE, "= Rumble Value") MSG_HASH(MENU_ENUM_LABEL_RUMBLE_TYPE_NEQ_VALUE, "!= Rumble Value") MSG_HASH(MENU_ENUM_LABEL_RUMBLE_TYPE_LT_VALUE, "< Rumble Value") MSG_HASH(MENU_ENUM_LABEL_RUMBLE_TYPE_GT_VALUE, "> Rumble Value") MSG_HASH(MENU_ENUM_LABEL_RUMBLE_TYPE_INCREASE_BY_VALUE, "Increases by Rumble Value") MSG_HASH(MENU_ENUM_LABEL_RUMBLE_TYPE_DECREASE_BY_VALUE, "Decreases by Rumble Value") MSG_HASH(MENU_ENUM_LABEL_CHEAT_MEMORY_SIZE_1, "1-bit, max value = 0x01") MSG_HASH(MENU_ENUM_LABEL_CHEAT_MEMORY_SIZE_2, "2-bit, max value = 0x03") MSG_HASH(MENU_ENUM_LABEL_CHEAT_MEMORY_SIZE_4, "4-bit, max value = 0x0F") MSG_HASH(MENU_ENUM_LABEL_CHEAT_MEMORY_SIZE_8, "8-bit, max value = 0xFF") MSG_HASH(MENU_ENUM_LABEL_CHEAT_MEMORY_SIZE_16, "16-bit, max value = 0xFFFF") MSG_HASH(MENU_ENUM_LABEL_CHEAT_MEMORY_SIZE_32, "32-bit, max value = 0xFFFFFFFF") MSG_HASH(MENU_ENUM_LABEL_RUMBLE_PORT_0, "1") MSG_HASH(MENU_ENUM_LABEL_RUMBLE_PORT_1, "2") MSG_HASH(MENU_ENUM_LABEL_RUMBLE_PORT_2, "3") MSG_HASH(MENU_ENUM_LABEL_RUMBLE_PORT_3, "4") MSG_HASH(MENU_ENUM_LABEL_RUMBLE_PORT_4, "5") MSG_HASH(MENU_ENUM_LABEL_RUMBLE_PORT_5, "6") MSG_HASH(MENU_ENUM_LABEL_RUMBLE_PORT_6, "7") MSG_HASH(MENU_ENUM_LABEL_RUMBLE_PORT_7, "8") MSG_HASH(MENU_ENUM_LABEL_RUMBLE_PORT_8, "9") MSG_HASH(MENU_ENUM_LABEL_RUMBLE_PORT_9, "10") MSG_HASH(MENU_ENUM_LABEL_RUMBLE_PORT_10, "11") MSG_HASH(MENU_ENUM_LABEL_RUMBLE_PORT_11, "12") MSG_HASH(MENU_ENUM_LABEL_RUMBLE_PORT_12, "13") MSG_HASH(MENU_ENUM_LABEL_RUMBLE_PORT_13, "14") MSG_HASH(MENU_ENUM_LABEL_RUMBLE_PORT_14, "15") MSG_HASH(MENU_ENUM_LABEL_RUMBLE_PORT_15, "16") MSG_HASH(MENU_ENUM_LABEL_RUMBLE_PORT_16, "All") MSG_HASH(MENU_ENUM_LABEL_VALUE_CHEAT_START_OR_CONT, "Start or Continue Cheat Search") MSG_HASH(MENU_ENUM_LABEL_VALUE_CHEAT_START_OR_RESTART, "Start or Restart Cheat Search") MSG_HASH(MENU_ENUM_LABEL_VALUE_CHEAT_SEARCH_EXACT, "Search Memory For Values") MSG_HASH(MENU_ENUM_LABEL_VALUE_CHEAT_SEARCH_LT, "Search Memory For Values") MSG_HASH(MENU_ENUM_LABEL_VALUE_CHEAT_SEARCH_GT, "Search Memory For Values") MSG_HASH(MENU_ENUM_LABEL_VALUE_CHEAT_SEARCH_EQ, "Search Memory For Values") MSG_HASH(MENU_ENUM_LABEL_VALUE_CHEAT_SEARCH_GTE, "Search Memory For Values") MSG_HASH(MENU_ENUM_LABEL_VALUE_CHEAT_SEARCH_LTE, "Search Memory For Values") MSG_HASH(MENU_ENUM_LABEL_VALUE_CHEAT_SEARCH_NEQ, "Search Memory For Values") MSG_HASH(MENU_ENUM_LABEL_VALUE_CHEAT_SEARCH_EQPLUS, "Search Memory For Values") MSG_HASH(MENU_ENUM_LABEL_VALUE_CHEAT_SEARCH_EQMINUS, "Search Memory For Values") MSG_HASH(MENU_ENUM_LABEL_VALUE_CHEAT_ADD_MATCHES, "Add the %u Matches to Your List") MSG_HASH(MENU_ENUM_LABEL_VALUE_CHEAT_VIEW_MATCHES, "View the List of %u Matches") MSG_HASH(MENU_ENUM_LABEL_VALUE_CHEAT_CREATE_OPTION, "Create Code From This Match") MSG_HASH(MENU_ENUM_LABEL_VALUE_CHEAT_DELETE_OPTION, "Delete This Match") MSG_HASH(MENU_ENUM_LABEL_VALUE_CHEAT_ADD_NEW_TOP, "Add New Code to Top") MSG_HASH(MENU_ENUM_LABEL_VALUE_CHEAT_ADD_NEW_BOTTOM, "Add New Code to Bottom") MSG_HASH(MENU_ENUM_LABEL_VALUE_CHEAT_DELETE_ALL, "Delete All Codes") MSG_HASH(MENU_ENUM_LABEL_VALUE_CHEAT_RELOAD_CHEATS, "Reload Game-Specific Cheats") MSG_HASH(MENU_ENUM_LABEL_CHEAT_SEARCH_EXACT_VAL, "Equal to %u (%X)") MSG_HASH(MENU_ENUM_LABEL_CHEAT_SEARCH_LT_VAL, "Less Than Before") MSG_HASH(MENU_ENUM_LABEL_CHEAT_SEARCH_GT_VAL, "Greater Than Before") MSG_HASH(MENU_ENUM_LABEL_CHEAT_SEARCH_LTE_VAL, "Less Than or Equal To Before") MSG_HASH(MENU_ENUM_LABEL_CHEAT_SEARCH_GTE_VAL, "Greater Than or Equal To Before") MSG_HASH(MENU_ENUM_LABEL_CHEAT_SEARCH_EQ_VAL, "Equal to Before") MSG_HASH(MENU_ENUM_LABEL_CHEAT_SEARCH_NEQ_VAL, "Not Equal to Before") MSG_HASH(MENU_ENUM_LABEL_CHEAT_SEARCH_EQPLUS_VAL, "Equal to Before+%u (%X)") MSG_HASH(MENU_ENUM_LABEL_CHEAT_SEARCH_EQMINUS_VAL, "Equal to Before-%u (%X)") MSG_HASH(MENU_ENUM_LABEL_CHEAT_SEARCH_SETTINGS, "Start or Continue Cheat Search") MSG_HASH(MSG_CHEAT_INIT_SUCCESS, "Successfully started cheat search") MSG_HASH(MSG_CHEAT_INIT_FAIL, "Failed to start cheat search") MSG_HASH(MSG_CHEAT_SEARCH_NOT_INITIALIZED, "Searching has not been initialized/started") MSG_HASH(MSG_CHEAT_SEARCH_FOUND_MATCHES, "New match count = %u") MSG_HASH(MENU_ENUM_LABEL_VALUE_CHEAT_BIG_ENDIAN, "Big Endian") MSG_HASH(MSG_CHEAT_SEARCH_ADDED_MATCHES_SUCCESS, "Added %u matches") MSG_HASH(MSG_CHEAT_SEARCH_ADDED_MATCHES_FAIL, "Failed to add matches") MSG_HASH(MSG_CHEAT_SEARCH_ADD_MATCH_SUCCESS, "Created code from match") MSG_HASH(MSG_CHEAT_SEARCH_ADD_MATCH_FAIL, "Failed to create code") MSG_HASH(MSG_CHEAT_SEARCH_DELETE_MATCH_SUCCESS, "Deleted match") MSG_HASH(MSG_CHEAT_SEARCH_ADDED_MATCHES_TOO_MANY, "Not enough room. The total number of cheats you can have is 100.") MSG_HASH(MSG_CHEAT_ADD_TOP_SUCCESS, "New cheat added to top of list.") MSG_HASH(MSG_CHEAT_ADD_BOTTOM_SUCCESS, "New cheat added to bottom of list.") MSG_HASH(MSG_CHEAT_DELETE_ALL_INSTRUCTIONS, "Press right five times to delete all cheats.") MSG_HASH(MSG_CHEAT_DELETE_ALL_SUCCESS, "All cheats deleted.") MSG_HASH(MSG_CHEAT_ADD_BEFORE_SUCCESS, "New cheat added before this one.") MSG_HASH(MSG_CHEAT_ADD_AFTER_SUCCESS, "New cheat added after this one.") MSG_HASH(MSG_CHEAT_COPY_BEFORE_SUCCESS, "Cheat copied before this one.") MSG_HASH(MSG_CHEAT_COPY_AFTER_SUCCESS, "Cheat copied after this one.") MSG_HASH(MSG_CHEAT_DELETE_SUCCESS, "Cheat deleted.") MSG_HASH(MENU_ENUM_LABEL_VALUE_QT_PROGRESS, "Progress:") MSG_HASH(MENU_ENUM_LABEL_VALUE_QT_MENU_VIEW_OPTIONS_ALL_PLAYLISTS_LIST_MAX_COUNT, "\"All Playlists\" max list entries:") MSG_HASH(MENU_ENUM_LABEL_VALUE_QT_MENU_VIEW_OPTIONS_ALL_PLAYLISTS_GRID_MAX_COUNT, "\"All Playlists\" max grid entries:") MSG_HASH(MENU_ENUM_LABEL_VALUE_QT_MENU_VIEW_OPTIONS_SHOW_HIDDEN_FILES, "Εμφάνιση κρυφών αρχείων και φακέλων:") MSG_HASH(MENU_ENUM_LABEL_VALUE_QT_NEW_PLAYLIST, "Νέα Λίστα Αναπαραγωγής") MSG_HASH(MENU_ENUM_LABEL_VALUE_QT_ENTER_NEW_PLAYLIST_NAME, "Please enter the new playlist name:") MSG_HASH(MENU_ENUM_LABEL_VALUE_QT_DELETE_PLAYLIST, "Διαγραφή Λίστας Αναπαραγωγής") MSG_HASH(MENU_ENUM_LABEL_VALUE_QT_RENAME_PLAYLIST, "Μετονομασία Λίστας Αναπαραγωγής") MSG_HASH(MENU_ENUM_LABEL_VALUE_QT_CONFIRM_DELETE_PLAYLIST, "Are you sure you want to delete the playlist \"%1\"?") MSG_HASH(MENU_ENUM_LABEL_VALUE_QT_QUESTION, "Question") MSG_HASH(MENU_ENUM_LABEL_VALUE_QT_COULD_NOT_DELETE_FILE, "Could not delete file.") MSG_HASH(MENU_ENUM_LABEL_VALUE_QT_COULD_NOT_RENAME_FILE, "Could not rename file.") MSG_HASH(MENU_ENUM_LABEL_VALUE_QT_GATHERING_LIST_OF_FILES, "Gathering list of files...") MSG_HASH(MENU_ENUM_LABEL_VALUE_QT_ADDING_FILES_TO_PLAYLIST, "Adding files to playlist...") MSG_HASH(MENU_ENUM_LABEL_VALUE_QT_PLAYLIST_ENTRY, "Playlist Entry") MSG_HASH(MENU_ENUM_LABEL_VALUE_QT_PLAYLIST_ENTRY_NAME, "Όνομα:") MSG_HASH(MENU_ENUM_LABEL_VALUE_QT_PLAYLIST_ENTRY_PATH, "Path:") MSG_HASH(MENU_ENUM_LABEL_VALUE_QT_PLAYLIST_ENTRY_CORE, "Πυρήνας:") MSG_HASH(MENU_ENUM_LABEL_VALUE_QT_PLAYLIST_ENTRY_DATABASE, "Database:") MSG_HASH(MENU_ENUM_LABEL_VALUE_QT_PLAYLIST_ENTRY_EXTENSIONS, "Extensions:") MSG_HASH(MENU_ENUM_LABEL_VALUE_QT_PLAYLIST_ENTRY_EXTENSIONS_PLACEHOLDER, "(space-separated content
Definition: msg_hash_el.h:7404
nk_uint nk_rune
Definition: nuklear.h:406
NK_API float nk_widget_height(struct nk_context *)
void(* draw_begin)(struct nk_command_buffer *, nk_handle)
Definition: nuklear.h:3443
struct nk_vec2 prev
Definition: nuklear.h:3174
float border
Definition: nuklear.h:3606
struct nk_style_item active
Definition: nuklear.h:3551
nk_edit_events
Definition: nuklear.h:2020
NK_UINT32 nk_uint
Definition: nuklear.h:400
struct nk_config_stack_style_item style_items
Definition: nuklear.h:4081
nk_hash name
Definition: nuklear.h:3966
NK_API int nk_str_insert_at_char(struct nk_str *, int pos, const char *, int)
struct nk_vec2 touch_padding
Definition: nuklear.h:3473
struct nk_color label_active
Definition: nuklear.h:3624
float max_x
Definition: nuklear.h:3895
short y
Definition: nuklear.h:3041
NK_API void nk_textedit_init(struct nk_text_edit *, struct nk_allocator *, nk_size size)
struct nk_style_item active
Definition: nuklear.h:3486
NK_API int nk_style_pop_color(struct nk_context *)
struct nk_color border_color
Definition: nuklear.h:3585
NK_API void nk_menubar_end(struct nk_context *)
struct nk_style_item pressed_active
Definition: nuklear.h:3456
Definition: nuklear.h:2143
int cursor
Definition: nuklear.h:3963
GLenum GLuint texture
Definition: glext.h:6935
float y
Definition: nuklear.h:3844
NK_API int nk_style_push_color(struct nk_context *, struct nk_color *, struct nk_color)
nk_plugin_paste paste
Definition: nuklear.h:2816
void(* draw_begin)(struct nk_command_buffer *, nk_handle)
Definition: nuklear.h:3543
Definition: nuklear.h:496
struct nk_style_item normal
Definition: nuklear.h:3484
unsigned short line_thickness
Definition: nuklear.h:2988
#define NK_UNUSED(x)
Definition: nuklear.h:4181
Definition: nuklear.h:3855
GLenum type
Definition: glext.h:6233
struct nk_style_item cursor_normal
Definition: nuklear.h:3496
set set set set set set set macro pixldst1 abits if abits op else op endif endm macro pixldst2 abits if abits op else op endif endm macro pixldst4 abits if abits op else op endif endm macro pixldst0 abits op endm macro pixldst3 mem_operand op endm macro pixldst30 mem_operand op endm macro pixldst abits if abits elseif abits elseif abits elseif abits elseif abits pixldst0 abits else pixldst0 abits pixldst0 abits pixldst0 abits pixldst0 abits endif elseif abits else pixldst0 abits pixldst0 abits endif elseif abits else error unsupported bpp *numpix else pixst endif endm macro pixld1_s mem_operand if asr adds SRC_WIDTH_FIXED bpl add asl mov asr adds SRC_WIDTH_FIXED bpl add asl mov asr adds SRC_WIDTH_FIXED bpl add asl mov asr adds SRC_WIDTH_FIXED bpl add asl elseif asr adds SRC_WIDTH_FIXED bpl add asl mov asr adds SRC_WIDTH_FIXED bpl add asl else error unsupported endif endm macro pixld2_s mem_operand if mov asr add asl add asl mov asr sub UNIT_X add asl mov asr add asl add asl mov asr add UNIT_X add asl else pixld1_s mem_operand pixld1_s mem_operand endif endm macro pixld0_s mem_operand if asr adds SRC_WIDTH_FIXED bpl add asl elseif asr adds SRC_WIDTH_FIXED bpl add asl endif endm macro pixld_s_internal mem_operand if mem_operand pixld2_s mem_operand pixdeinterleave basereg elseif mem_operand elseif mem_operand elseif mem_operand elseif mem_operand pixld0_s mem_operand else pixld0_s mem_operand pixld0_s mem_operand pixld0_s mem_operand pixld0_s mem_operand endif elseif mem_operand else pixld0_s mem_operand pixld0_s mem_operand endif elseif mem_operand else error unsupported mem_operand if bpp mem_operand endif endm macro vuzp8 reg2 vuzp d d ®2 endm macro vzip8 reg2 vzip d d ®2 endm macro pixdeinterleave basereg basereg basereg basereg basereg endif endm macro pixinterleave basereg basereg basereg basereg basereg endif endm macro PF boost_increment endif if endif PF tst PF addne PF subne PF cmp ORIG_W if endif if endif if endif PF subge ORIG_W PF subges if endif if endif if endif endif endm macro cache_preload_simple endif if dst_r_bpp pld [DST_R, #(PREFETCH_DISTANCE_SIMPLE *dst_r_bpp/8)] endif if mask_bpp pld if[MASK, #(PREFETCH_DISTANCE_SIMPLE *mask_bpp/8)] endif endif endm macro fetch_mask_pixblock pixld mask_basereg pixblock_size MASK endm macro ensure_destination_ptr_alignment process_pixblock_tail_head if beq irp local skip1(dst_w_bpp<=(lowbit *8)) &&((lowbit *8)<(pixblock_size *dst_w_bpp)) .if lowbit< 16 tst DST_R
Definition: pixman-arm-neon-asm.h:469
float border
Definition: nuklear.h:3536
#define nk_vec2_add(a, b)
Definition: nuklear.h:4194
NK_API int nk_group_scrolled_begin(struct nk_context *, struct nk_scroll *, const char *title, nk_flags)
NK_API void nk_style_default(struct nk_context *)
short y
Definition: nuklear.h:2974
#define fclose
Definition: file_stream_transforms.h:53
NK_API struct nk_rect nk_layout_space_rect_to_screen(struct nk_context *, struct nk_rect)
NK_API int nk_button_image(struct nk_context *, struct nk_image img)
NK_API void nk_stroke_polygon(struct nk_command_buffer *, float *, int point_count, float line_thickness, struct nk_color)
void(* draw_end)(struct nk_command_buffer *, nk_handle)
Definition: nuklear.h:3518
struct nk_color text_pressed
Definition: nuklear.h:3461
unsigned short region[4]
Definition: nuklear.h:461
bool l
Definition: connect_wiiupro.c:37
struct nk_style_edit edit
Definition: nuklear.h:3635
NK_API int nk_combo_separator(struct nk_context *, const char *items_separated_by_separator, int separator, int selected, int count, int item_height, struct nk_vec2 size)
NK_API int nk_combo_item_text(struct nk_context *, const char *, int, nk_flags alignment)
float grow_factor
Definition: nuklear.h:2694
Definition: nuklear.h:3819
struct nk_vec2 label_padding
Definition: nuklear.h:3736
Definition: nuklear.h:3521
nk_uint values[NK_VALUE_PAGE_CAPACITY]
Definition: nuklear.h:4100
struct nk_color border_color
Definition: nuklear.h:3692
Definition: nuklear.h:2156
Definition: nuklear.h:3022
bool plus
Definition: connect_wiiupro.c:42
struct nk_vec2 group_padding
Definition: nuklear.h:3769
NK_API struct nk_vec2 nk_window_get_content_region_max(struct nk_context *)
Definition: nuklear.h:460
struct nk_vec2i begin
Definition: nuklear.h:2981
NK_API void nk_input_button(struct nk_context *, enum nk_buttons, int x, int y, int down)
Definition: nuklear.h:490
NK_API int nk_select_text(struct nk_context *, const char *, int, nk_flags align, int value)
ubyte cmd
Definition: wiiuse_internal.h:319
Definition: nuklear.h:2178
int text_len
Definition: nuklear.h:3189
struct nk_table tbl
Definition: nuklear.h:4105
Definition: nuklear.h:1843
unsigned int size
Definition: nuklear.h:4117
enum nk_symbol_type sym_normal
Definition: nuklear.h:3677
Definition: nuklear.h:4122
short y
Definition: nuklear.h:3014
NK_API float nk_layout_ratio_from_pixel(struct nk_context *, float pixel_width)
NK_UINT8 nk_byte
Definition: nuklear.h:396
unsigned arc_segment_count
Definition: nuklear.h:986
nk_size allocated
Definition: nuklear.h:2696
NK_API int nk_button_symbol_text_styled(struct nk_context *, const struct nk_style_button *, enum nk_symbol_type, const char *, int, nk_flags alignment)
NK_API struct nk_rect nk_layout_space_bounds(struct nk_context *)
NK_API void nk_clear(struct nk_context *)
#define NK_FLAG(x)
Definition: nuklear.h:290
const void * data
Definition: libretro.h:2285
Definition: nuklear.h:3922
Definition: nuklear.h:2164
short undo_point
Definition: nuklear.h:2830
float header_height
Definition: nuklear.h:3897
nk_allocation_type
Definition: nuklear.h:2668
struct nk_style_item hover
Definition: nuklear.h:3450
short x
Definition: nuklear.h:3007
nk_size next
Definition: nuklear.h:2966
unsigned char grabbed
Definition: nuklear.h:3178
Definition: nuklear.h:3849
Definition: nuklear.h:969
NK_API int nk_button_image_label(struct nk_context *, struct nk_image img, const char *, nk_flags text_alignment)
AVFormatContext * ctx
Definition: record_ffmpeg.c:247
struct nk_color text_background
Definition: nuklear.h:3432
struct nk_color text_hover
Definition: nuklear.h:3400
unsigned short r
Definition: nuklear.h:3057
struct nk_style_item cursor_normal
Definition: nuklear.h:3425
NK_API void nk_color_hsva_bv(nk_byte *hsva_out, struct nk_color)
struct nk_rect clip
Definition: nuklear.h:3900
struct nk_image img
Definition: nuklear.h:462
Definition: nuklear.h:2146
struct nk_window * win
Definition: nuklear.h:3935
struct nk_command header
Definition: nuklear.h:3005
#define SEEK_SET
Definition: zconf.h:438
float at_x
Definition: nuklear.h:3895
struct nk_style_property property
Definition: nuklear.h:3793
Definition: nuklear.h:3917
short x
Definition: nuklear.h:456
Definition: nuklear.h:2144
enum nk_panel_row_layout_type type
Definition: nuklear.h:3861
static unsigned max_height
Definition: gx_gfx.c:278
NK_API void nk_textedit_select_all(struct nk_text_edit *)
char buffer[NK_MAX_NUMBER_BUFFER]
Definition: nuklear.h:3961
nk_size begin
Definition: nuklear.h:3134
NK_API int nk_strmatch_fuzzy_string(char const *str, char const *pattern, int *out_score)
NK_API void nk_color_hsv_iv(int *hsv_out, struct nk_color)
std::shared_ptr< Ope > dot()
Definition: peglib.h:1603
Definition: nuklear.h:2166
static uint32_t cmd_size
Definition: ranetplayer.c:87
enum nk_anti_aliasing line_AA
Definition: nuklear.h:983
NK_API int nk_str_insert_text_utf8(struct nk_str *, int pos, const char *, int)
NK_API int nk_button_label(struct nk_context *, const char *title)
struct nk_clipboard clip
Definition: nuklear.h:2848
#define NK_ALIGN_PTR(x, mask)
Definition: nuklear.h:4220
struct nk_style_button contextual_button
Definition: nuklear.h:3786
Definition: nuklear.h:1174
struct nk_vec2 scrollbar_size
Definition: nuklear.h:3609
NK_API float nk_strtof(const char *str, const char **endptr)
NK_API struct nk_style_item nk_style_item_color(struct nk_color)
Definition: nuklear.h:3920
GLint GLint i2
Definition: nx_glsym.h:308
Definition: nuklear.h:1846
Definition: nuklear.h:2023
struct nk_style_text text
Definition: nuklear.h:3784
struct nk_config_stack_user_font fonts
Definition: nuklear.h:4086
enum nk_symbol_type maximize_symbol
Definition: nuklear.h:3726
Definition: nuklear.h:683
NK_API void nk_color_hex_rgb(char *output, struct nk_color)
NK_API int nk_widget_is_hovered(struct nk_context *)
struct nk_style_progress progress
Definition: nuklear.h:3792
Definition: nuklear.h:668
NK_API void nk_buffer_clear(struct nk_buffer *)
NK_API char * nk_str_at_char(struct nk_str *, int pos)
Definition: nuklear.h:3371
NK_API unsigned nk_check_flags_text(struct nk_context *, const char *, int, unsigned int flags, unsigned int value)
NK_API void nk_stroke_line(struct nk_command_buffer *b, float x0, float y0, float x1, float y1, float line_thickness, struct nk_color)
struct nk_color symbol_active
Definition: nuklear.h:3673
NK_API void nk_edit_unfocus(struct nk_context *)
int end
Definition: nuklear.h:1804
unsigned int old
Definition: nuklear.h:3968
nk_size end
Definition: nuklear.h:3134
nk_handle userdata
Definition: nuklear.h:2485
nk_uint * scroll_pointer
Definition: nuklear.h:1808
struct nk_vec2 contextual_padding
Definition: nuklear.h:3772
nk_text_align
Definition: nuklear.h:1864
enum nk_symbol_type sym_maximize
Definition: nuklear.h:3701
NK_API nk_flags nk_edit_string_zero_terminated(struct nk_context *, nk_flags, char *buffer, int max, nk_plugin_filter)
NK_API float nk_window_get_width(const struct nk_context *)
Definition: nuklear.h:2021
int show_buttons
Definition: nuklear.h:3509
NK_API int nk_str_append_text_runes(struct nk_str *, const nk_rune *, int)
const struct nk_user_font * font
Definition: nuklear.h:3778
#define NK_INT8
Definition: nuklear.h:337
NK_API int nk_input_is_mouse_click_down_in_rect(const struct nk_input *i, enum nk_buttons id, struct nk_rect b, int down)
GLsizei const GLfloat * points
Definition: glext.h:9015
NK_API int nk_input_has_mouse_click_down_in_rect(const struct nk_input *, enum nk_buttons, struct nk_rect, int down)
NK_API struct nk_color nk_rgba_iv(const int *rgba)
NK_API void nk_style_set_font(struct nk_context *, const struct nk_user_font *)
int index
Definition: nuklear.h:3839
Definition: nuklear.h:474
Definition: nuklear.h:2843
struct nk_color popup_border_color
Definition: nuklear.h:3746
NK_API int nk_image_is_subimage(const struct nk_image *img)
struct nk_style_slider slider
Definition: nuklear.h:3791
GLdouble u1
Definition: glext.h:9211
Definition: nuklear.h:2012
#define NK_INTERSECT(x0, y0, w0, h0, x1, y1, w1, h1)
Definition: nuklear.h:4188
NK_API void nk_style_from_table(struct nk_context *, const struct nk_color *)
Definition: nuklear.h:502
struct nk_panel * layout
Definition: nuklear.h:3981
Definition: nuklear.h:2669
NK_API void nk_tree_pop(struct nk_context *)
float templates[NK_MAX_LAYOUT_ROW_TEMPLATE_COLUMNS]
Definition: nuklear.h:3873
struct nk_vec2 cursor_size
Definition: nuklear.h:3506
struct nk_command header
Definition: nuklear.h:3095
NK_API int nk_init_custom(struct nk_context *, struct nk_buffer *cmds, struct nk_buffer *pool, const struct nk_user_font *)
int active
Definition: nuklear.h:3881
Definition: nuklear.h:681
NK_API void nk_buffer_reset(struct nk_buffer *, enum nk_buffer_allocation_type type)
struct nk_style_item normal
Definition: nuklear.h:3582
NK_API int nk_checkbox_flags_text(struct nk_context *, const char *, int, unsigned int *flags, unsigned int value)
struct nk_color text_background
Definition: nuklear.h:3467
Definition: nuklear.h:2152
void(* draw_end)(struct nk_command_buffer *, nk_handle)
Definition: nuklear.h:3444
Definition: nuklear.h:685
struct nk_vec2 spacing
Definition: nuklear.h:3686
int total_height
Definition: nuklear.h:1806
nk_plugin_copy copy
Definition: nuklear.h:2817
Definition: nuklear.h:2943
NK_API void nk_style_hide_cursor(struct nk_context *)
nk_modify
Definition: nuklear.h:467
NK_API int nk_input_is_mouse_click_in_rect(const struct nk_input *, enum nk_buttons, struct nk_rect)
struct nk_vec2 content_padding
Definition: nuklear.h:3684
GLfloat v0
Definition: glext.h:6701
short h
Definition: nuklear.h:458
struct nk_style_button node_maximize_button
Definition: nuklear.h:3698
NK_INT8 nk_char
Definition: nuklear.h:394
unsigned short w
Definition: nuklear.h:3008
float rounding
Definition: nuklear.h:3535
Definition: nuklear.h:3658
enum nk_panel_type type
Definition: nuklear.h:3890
struct nk_command header
Definition: nuklear.h:2973
NK_API const char * nk_str_get_const(const struct nk_str *)
NK_API struct nk_window * nk_window_find(struct nk_context *ctx, const char *name)
float b
Definition: nuklear.h:454
Definition: nuklear.h:3063
struct nk_vec2 spacing
Definition: nuklear.h:3505
Definition: nuklear.h:3926
struct nk_str string
Definition: nuklear.h:2849
NK_API void nk_menu_close(struct nk_context *)
Definition: nuklear.h:977
struct nk_style_button node_minimize_button
Definition: nuklear.h:3699
NK_API int nk_radio_label(struct nk_context *, const char *, int *active)
struct nk_color text_active
Definition: nuklear.h:3597
#define NK_POINTER_TYPE
Definition: nuklear.h:389
struct nk_style_item normal
Definition: nuklear.h:3449
static l_noret error(LoadState *S, const char *why)
Definition: lundump.c:39
struct nk_vec2i begin
Definition: nuklear.h:2989
struct nk_color border_color
Definition: nuklear.h:3745
float4 p1
Definition: notHere.h:1
short w
Definition: nuklear.h:458
GLenum GLsizei GLenum GLenum const GLvoid * image
Definition: glext.h:6305
NK_API int nk_combo_begin_text(struct nk_context *, const char *selected, int, struct nk_vec2 size)
f32 a0
Definition: gx_regdef.h:5094
NK_API void nk_fill_circle(struct nk_command_buffer *, struct nk_rect, struct nk_color)
#define NK_SATURATE(x)
Definition: nuklear.h:4182
GLfixed y1
Definition: glsym_gl.h:1051
short y
Definition: nuklear.h:3049
Definition: nuklear.h:2837
NK_API struct nk_color nk_rgb_hex(const char *rgb)
NK_API int nk_button_color(struct nk_context *, struct nk_color)
float(* nk_text_width_f)(nk_handle, float h, const char *, int len)
Definition: nuklear.h:2466
NK_API void nk_str_clear(struct nk_str *)
union nk_page_data data
Definition: nuklear.h:4111
float r
Definition: nuklear.h:454
nk_widget_states
Definition: nuklear.h:1838
struct nk_context * ctx
Definition: nuklear.h:1807
int(* nk_plugin_filter)(const struct nk_text_edit *, nk_rune unicode)
Definition: nuklear.h:480
Definition: nuklear.h:1834
struct nk_chart_slot slots[NK_CHART_MAX_SLOT]
Definition: nuklear.h:3845
float item_offset
Definition: nuklear.h:3869
nk_size size
Definition: nuklear.h:4129
static uint64_t state[MAX_PADS]
Definition: xenon360_input.c:33
#define NK_CONFIG_STACK(type, size)
Definition: nuklear.h:4057
NK_API void nk_fill_triangle(struct nk_command_buffer *, float x0, float y0, float x1, float y1, float x2, float y2, struct nk_color)
#define NK_INTERN
Definition: nuklear.h:286
struct nk_command header
Definition: nuklear.h:3023
nk_hash name
Definition: nuklear.h:3947
GLint GLint GLint GLint GLint GLint y
Definition: glext.h:6295
NK_API void nk_window_collapse(struct nk_context *, const char *name, enum nk_collapse_states state)
Definition: nuklear.h:680
NK_API void nk_window_set_size(struct nk_context *, const char *name, struct nk_vec2)
NK_API int nk_textedit_paste(struct nk_text_edit *, char const *, int len)
struct nk_vec2 padding
Definition: nuklear.h:3633
NK_API void nk_input_begin(struct nk_context *)
int tree_depth
Definition: nuklear.h:3872
Definition: nuklear.h:2017
struct nk_window * current
Definition: nuklear.h:4168
NK_API void nk_str_delete_runes(struct nk_str *, int pos, int len)
Definition: nuklear.h:670
GLenum src
Definition: glext.h:6980
NK_API struct nk_vec2 nk_vec2iv(const int *xy)
Definition: nuklear.h:2159
unsigned combo_count
Definition: nuklear.h:3940
Definition: nuklear.h:1176
GLdouble GLdouble GLint GLint GLdouble GLdouble GLint GLint GLdouble w1
Definition: glext.h:9211
#define NK_CONFIGURATION_STACK_TYPE(prefix, name, type)
Definition: nuklear.h:4052
NK_API int nk_style_set_cursor(struct nk_context *, enum nk_style_cursor)
Definition: nuklear.h:2160
float rounding
Definition: nuklear.h:3632
NK_API void nk_input_char(struct nk_context *, char)
union nk_style_item_data data
Definition: nuklear.h:3382
unsigned int seq
Definition: nuklear.h:3973
struct nk_command header
Definition: nuklear.h:3072
NK_API int nk_button_symbol_label(struct nk_context *, enum nk_symbol_type, const char *, nk_flags text_alignment)
GLint GLint GLint GLint GLint x
Definition: glext.h:6295
Definition: nuklear.h:1177
Definition: nuklear.h:691
GLuint in
Definition: glext.h:10523
nk_chart_event
Definition: nuklear.h:472
#define S(x)
Definition: luac.c:394
Definition: nuklear.h:2942
GLuint64EXT * result
Definition: glext.h:12211
GLdouble GLdouble GLdouble GLdouble q
Definition: glext.h:6414
int select_end
Definition: nuklear.h:3965
NK_API int nk_input_is_key_down(const struct nk_input *, enum nk_keys)
#define NK_FONT_STACK_SIZE
Definition: nuklear.h:4029
GLenum GLenum GLvoid * row
Definition: glext.h:6316
struct nk_color border_color
Definition: nuklear.h:3552
struct nk_style_item normal
Definition: nuklear.h:3616
Definition: nuklear.h:1865
NK_API int nk_button_symbol_label_styled(struct nk_context *ctx, const struct nk_style_button *style, enum nk_symbol_type symbol, const char *title, nk_flags align)
NK_API void nk_stroke_triangle(struct nk_command_buffer *, float, float, float, float, float, float, float line_thichness, struct nk_color)
Definition: nuklear.h:2960
NK_API void nk_buffer_free(struct nk_buffer *)
NK_API int nk_style_push_style_item(struct nk_context *, struct nk_style_item *, struct nk_style_item)
Definition: deflate.c:120
NK_API void nk_layout_row_begin(struct nk_context *ctx, enum nk_layout_format fmt, float row_height, int cols)
dictionary args
Definition: test_shaders.py:20
Definition: nuklear.h:969
Definition: nuklear.h:1868
struct nk_vec2 padding
Definition: nuklear.h:3565
f32 a2
Definition: gx_regdef.h:5096
float rounding
Definition: nuklear.h:3705
Definition: nuklear.h:2009
struct nk_style_selectable selectable
Definition: nuklear.h:3790
NK_API void nk_str_init(struct nk_str *, const struct nk_allocator *, nk_size size)
NK_API struct nk_vec2 nk_window_get_position(const struct nk_context *ctx)
#define NK_CLAMP(i, v, x)
Definition: nuklear.h:317
NK_API void nk_draw_image(struct nk_command_buffer *, struct nk_rect, const struct nk_image *, struct nk_color)
NK_API int nk_menu_begin_symbol_label(struct nk_context *, const char *, nk_flags align, enum nk_symbol_type, struct nk_vec2 size)
struct nk_window * begin
Definition: nuklear.h:4165
unsigned int size
Definition: nuklear.h:4098
nk_convert_result
Definition: nuklear.h:970
struct nk_text_edit text_edit
Definition: nuklear.h:4157
NK_API void nk_label_colored(struct nk_context *, const char *, nk_flags align, struct nk_color)
int cursor_visible
Definition: nuklear.h:3782
NK_API int nk_combo_string(struct nk_context *, const char *items_separated_by_zeros, int selected, int count, int item_height, struct nk_vec2 size)
NK_API int nk_begin_titled(struct nk_context *ctx, const char *name, const char *title, struct nk_rect bounds, nk_flags flags)
struct nk_color bar_hover
Definition: nuklear.h:3491
unsigned char mode
Definition: nuklear.h:2856
NK_API void nk_contextual_close(struct nk_context *)
enum nk_style_item_type type
Definition: nuklear.h:3381
NK_API int nk_window_is_any_hovered(struct nk_context *)
NK_API void nk_color_hex_rgba(char *output, struct nk_color)
struct nk_page_element * freelist
Definition: nuklear.h:4127
float rounding
Definition: nuklear.h:3654
unsigned short point_count
Definition: nuklear.h:3090
NK_API int nk_str_insert_at_rune(struct nk_str *, int pos, const char *, int)
NK_API int nk_menu_item_image_text(struct nk_context *, struct nk_image, const char *, int len, nk_flags alignment)
Definition: nuklear.h:692
struct nk_vec2 padding
Definition: nuklear.h:3539
Definition: nuklear.h:663
NK_API struct nk_color nk_hsv_fv(const float *hsv)
enum nk_button_behavior button_behavior
Definition: nuklear.h:4140
struct nk_buffer buffer
Definition: nuklear.h:2732
struct nk_vec2 delta
Definition: nuklear.h:3175
float border
Definition: nuklear.h:3682
short redo_point
Definition: nuklear.h:2831
GLfloat GLfloat p
Definition: glext.h:9809
NK_API nk_handle nk_handle_id(int)
#define NK_STORAGE
Definition: nuklear.h:287
NK_API struct nk_color nk_rgb_iv(const int *rgb)
unsigned int old
Definition: nuklear.h:3949
Definition: nuklear.h:3832
set set set set set set set macro pixldst1 abits if abits op else op endif endm macro pixldst2 abits if abits op else op endif endm macro pixldst4 abits if abits op else op endif endm macro pixldst0 idx
Definition: pixman-arm-neon-asm.h:96
NK_API int nk_contextual_item_symbol_label(struct nk_context *, enum nk_symbol_type, const char *, nk_flags alignment)
NK_API void nk_style_load_all_cursors(struct nk_context *, struct nk_cursor *)
int active
Definition: nuklear.h:3939
Definition: nuklear.h:3104
nk_flags flags
Definition: nuklear.h:3976
NK_API void nk_property_int(struct nk_context *, const char *name, int min, int *val, int max, int step, float inc_per_pixel)
NK_API nk_handle nk_handle_ptr(void *)
Definition: nuklear.h:2679
struct nk_text_undo_state undo
Definition: nuklear.h:2864
struct nk_vec2 image_padding
Definition: nuklear.h:3474
Definition: nuklear.h:671
int state
Definition: nuklear.h:3969
#define NK_ALIGNOF(t)
Definition: nuklear.h:4243
struct nk_vec2 padding
Definition: nuklear.h:3504
struct nk_style_item cursor_active
Definition: nuklear.h:3557
NK_API struct nk_image nk_subimage_handle(nk_handle, unsigned short w, unsigned short h, struct nk_rect sub_region)
float cursor_rounding
Definition: nuklear.h:3538
NK_API int nk_option_text(struct nk_context *, const char *, int, int active)
float h
Definition: nuklear.h:457
enum nk_symbol_type sym_hover
Definition: nuklear.h:3678
NK_API float nk_slide_float(struct nk_context *, float min, float val, float max, float step)
nk_size allocated
Definition: nuklear.h:2663
NK_API void nk_color_hsva_fv(float *hsva_out, struct nk_color)
struct nk_window * end
Definition: nuklear.h:4166
struct nk_style_window window
Definition: nuklear.h:3800
NK_API float nk_propertyf(struct nk_context *, const char *name, float min, float val, float max, float step, float inc_per_pixel)
NK_API void nk_combobox_separator(struct nk_context *, const char *items_separated_by_separator, int separator, int *selected, int count, int item_height, struct nk_vec2 size)
Definition: nuklear.h:2002
nk_size offset
Definition: nuklear.h:2681
void(* draw_end)(struct nk_command_buffer *, nk_handle userdata)
Definition: nuklear.h:3414
Definition: nuklear.h:1183
NK_API void nk_textedit_text(struct nk_text_edit *, const char *, int total_len)
Definition: nuklear.h:2676
unsigned int seq
Definition: nuklear.h:4171
struct nk_style_item normal
Definition: nuklear.h:3549
Definition: nuklear.h:1836
enum nk_command_type type
Definition: nuklear.h:2965
Definition: nuklear.h:470
struct nk_rect item
Definition: nuklear.h:3871
NK_API int nk_tree_state_push(struct nk_context *, enum nk_tree_type, const char *title, enum nk_collapse_states *state)
unsigned short line_thickness
Definition: nuklear.h:3089
short cx
Definition: nuklear.h:3065
float tooltip_border
Definition: nuklear.h:3759
struct nk_color color
Definition: nuklear.h:3834
GLfixed GLfixed GLfixed y2
Definition: glsym_gl.h:1051
static s32 hex(char ch)
Definition: debug.c:111
int index
Definition: nuklear.h:3862
NK_API int nk_strtoi(const char *str, const char **endptr)
void(* nk_plugin_free)(nk_handle, void *old)
Definition: nuklear.h:479
GLfloat GLfloat GLfloat alpha
Definition: glext.h:6290
struct nk_style_item hover
Definition: nuklear.h:3583
NK_API struct nk_color nk_rgb_bv(const nk_byte *rgb)
Definition: nuklear.h:3125
Definition: nuklear.h:2949
NK_API void nk_color_hsv_i(int *out_h, int *out_s, int *out_v, struct nk_color)
#define nk_ptr_add(t, p, i)
Definition: nuklear.h:4198
NK_INT32 nk_int
Definition: nuklear.h:399
NK_API int nk_menu_begin_text(struct nk_context *, const char *title, int title_len, nk_flags align, struct nk_vec2 size)
ssize_t offset
Definition: query.c:47
float a
Definition: nuklear.h:454
struct nk_command header
Definition: nuklear.h:3048
Definition: nuklear.h:2003
NK_API int nk_input_is_key_released(const struct nk_input *, enum nk_keys)
struct nk_vec2 padding
Definition: nuklear.h:3707
float border
Definition: nuklear.h:3754
struct nk_color foreground
Definition: nuklear.h:3116
struct nk_vec2i ctrl[2]
Definition: nuklear.h:2991
GLbyte by
Definition: glext.h:9673
GLuint index
Definition: glext.h:6671
#define FILE
Definition: file_stream_transforms.h:35
Definition: nuklear.h:2838
NK_API nk_flags nk_edit_string(struct nk_context *, nk_flags, char *buffer, int *len, int max, nk_plugin_filter)
struct nk_style_button close_button
Definition: nuklear.h:3722
f32 a1
Definition: gx_regdef.h:5095
Definition: nuklear.h:472
nk_uint nk_hash
Definition: nuklear.h:404
NK_API void nk_str_remove_runes(struct nk_str *str, int len)
#define NK_ABS(a)
Definition: nuklear.h:4184
struct nk_style_combo combo
Definition: nuklear.h:3799
int count
Definition: nuklear.h:1804
NK_API int nk_tree_state_image_push(struct nk_context *, enum nk_tree_type, struct nk_image, const char *title, enum nk_collapse_states *state)
NK_API int nk_checkbox_label(struct nk_context *, const char *, int *active)
NK_API int nk_menu_begin_image(struct nk_context *, const char *, struct nk_image, struct nk_vec2 size)
int begin
Definition: nuklear.h:1804
Definition: nuklear.h:2954
Definition: nuklear.h:667
int slot
Definition: nuklear.h:3843
NK_API enum nk_widget_layout_states nk_widget(struct nk_rect *, const struct nk_context *)
Definition: nuklear.h:2674
Definition: nuklear.h:3827
struct nk_mouse mouse
Definition: nuklear.h:3194
Definition: nuklear.h:2946
NK_API void nk_window_show(struct nk_context *, const char *name, enum nk_show_states)
float x
Definition: nuklear.h:455
NK_API void nk_window_close(struct nk_context *ctx, const char *name)
Definition: nuklear.h:3823
NK_API struct nk_rect nk_layout_widget_bounds(struct nk_context *)
#define NK_COLOR_STACK_SIZE
Definition: nuklear.h:4049
#define pow(x, y)
Definition: math.h:22
NK_API int nk_combo_item_symbol_text(struct nk_context *, enum nk_symbol_type, const char *, int, nk_flags alignment)
float delta_time_seconds
Definition: nuklear.h:4142
nk_text_alignment
Definition: nuklear.h:1872
struct nk_style_item cursor_hover
Definition: nuklear.h:3426
NK_API void nk_tooltip_end(struct nk_context *)
Definition: nuklear.h:2024
struct nk_style_item cursor_hover
Definition: nuklear.h:3497
enum nk_symbol_type minimize_symbol
Definition: nuklear.h:3725
Definition: nuklear.h:3822
Definition: nuklear.h:2150
nk_panel_row_layout_type
Definition: nuklear.h:3848
float menu_border
Definition: nuklear.h:3757
const GLdouble * v
Definition: glext.h:6391
unsigned short w
Definition: nuklear.h:3118
NK_API nk_flags nk_chart_push(struct nk_context *, float)
NK_API struct nk_color nk_rgb_fv(const float *rgb)
Definition: nuklear.h:3580
NK_API int nk_style_push_vec2(struct nk_context *, struct nk_vec2 *, struct nk_vec2)
NK_API float nk_widget_width(struct nk_context *)
Definition: nuklear.h:3039
struct nk_style_item hover
Definition: nuklear.h:3485
Definition: nuklear.h:462
struct nk_style_item normal
Definition: nuklear.h:3419
Definition: nuklear.h:475
Definition: nuklear.h:499
short y
Definition: nuklear.h:3106
NK_API int nk_button_image_label_styled(struct nk_context *, const struct nk_style_button *, struct nk_image img, const char *, nk_flags text_alignment)
Definition: nuklear.h:2141
NK_API struct nk_rect nk_layout_space_rect_to_local(struct nk_context *, struct nk_rect)
NK_API double nk_strtod(const char *str, const char **endptr)
float min_row_height_padding
Definition: nuklear.h:3761
struct nk_color label_active
Definition: nuklear.h:3668
struct nk_color border_color
Definition: nuklear.h:3487
NK_API void nk_stroke_arc(struct nk_command_buffer *, float cx, float cy, float radius, float a_min, float a_max, float line_thickness, struct nk_color)
Definition: nuklear.h:1874
nk_size parent
Definition: nuklear.h:3878
Definition: nuklear.h:2149
int select(int nfds, fd_set *readfds, fd_set *writefds, fd_set *exceptfds, struct timeval *timeout)
#define NK_MAX_NUMBER_BUFFER
Definition: nuklear.h:260
Definition: nuklear.h:3889
struct nk_style_item active
Definition: nuklear.h:3719
Definition: nuklear.h:492
Definition: nuklear.h:3182
int cursor
Definition: nuklear.h:2853
Definition: nuklear.h:2145
short x
Definition: nuklear.h:3014
NK_API int nk_chart_begin(struct nk_context *, enum nk_chart_type, int num, float min, float max)
struct nk_style_item active
Definition: nuklear.h:3584
Definition: nuklear.h:2820
short y
Definition: nuklear.h:458
struct nk_style_toggle checkbox
Definition: nuklear.h:3789
const struct nk_cursor * cursors[NK_CURSOR_COUNT]
Definition: nuklear.h:3779
Definition: nuklear.h:3482
struct nk_vec2 padding
Definition: nuklear.h:3655
NK_API struct nk_image nk_image_id(int)
std::string output
Definition: Config.FromFile.cpp:44
Definition: nuklear.h:3012
struct nk_style_item normal
Definition: nuklear.h:3523
Definition: nuklear.h:2947
int active
Definition: nuklear.h:3960
struct nk_command header
Definition: nuklear.h:3113
Definition: nuklear.h:458
NK_API const char * nk_utf_at(const char *buffer, int length, int index, nk_rune *unicode, int *len)
#define NK_INBOX(px, py, x, y, w, h)
Definition: nuklear.h:4186
NK_API void nk_color_hsv_f(float *out_h, float *out_s, float *out_v, struct nk_color)
u32 col
Definition: gx_regdef.h:5093
NK_API void nk_input_end(struct nk_context *)
nk_chart_type
Definition: nuklear.h:471
short x
Definition: nuklear.h:458
struct nk_style_item cursor_normal
Definition: nuklear.h:3555
nk_flags text_alignment
Definition: nuklear.h:3402
short y
Definition: nuklear.h:3007
struct nk_style_item cursor_normal
Definition: nuklear.h:3529
Definition: nuklear.h:4116
GLboolean GLboolean g
Definition: glext.h:6844
nk_panel_set
Definition: nuklear.h:3826
#define NK_BETWEEN(x, a, b)
Definition: nuklear.h:4185
Definition: nuklear.h:2955
static int digit(int c)
Definition: lstrlib.c:1180
Definition: nuklear.h:2844
#define nk_foreach(c, ctx)
Definition: nuklear.h:1011
Definition: nuklear.h:696
GLuint color
Definition: glext.h:6883
unsigned short h
Definition: nuklear.h:2975
NK_API void nk_window_collapse_if(struct nk_context *, const char *name, enum nk_collapse_states, int cond)
GLint j
Definition: nx_glsym.h:307
void * memory
Definition: nuklear.h:2660
unsigned short line_thickness
Definition: nuklear.h:3042
struct nk_color selected_text_hover
Definition: nuklear.h:3603
nk_collapse_states
Definition: nuklear.h:469
nk_rune undo_char[NK_TEXTEDIT_UNDOCHARCOUNT]
Definition: nuklear.h:2829
vu8 tail
Definition: keyboard.c:427
nk_handle userdata
Definition: nuklear.h:3575
NK_API const char * nk_str_at_char_const(const struct nk_str *, int pos)
NK_API void nk_text_wrap_colored(struct nk_context *, const char *, int, struct nk_color)
NK_API int nk_style_push_flags(struct nk_context *, nk_flags *, nk_flags)
NK_API int nk_button_symbol_text(struct nk_context *, enum nk_symbol_type, const char *, int, nk_flags alignment)
float4 p2
Definition: local.h:1
GLint GLint GLsizei GLsizei GLsizei GLint GLenum format
Definition: glext.h:6293
struct nk_color label_active
Definition: nuklear.h:3731
Definition: input_overlay.h:98
void(* nk_query_font_glyph_f)(nk_handle handle, float font_height, struct nk_user_font_glyph *glyph, nk_rune codepoint, nk_rune next_codepoint)
Definition: nuklear.h:2467
struct nk_color contextual_border_color
Definition: nuklear.h:3748
NK_API void nk_layout_reset_min_row_height(struct nk_context *)
float global_alpha
Definition: nuklear.h:982
NK_API int nk_combo_item_symbol_label(struct nk_context *, enum nk_symbol_type, const char *, nk_flags alignment)
NK_API struct nk_rect nk_get_null_rect(void)
GLint GLint GLint GLint GLint GLint GLint GLbitfield GLenum filter
Definition: glext.h:7672
struct nk_style_item active
Definition: nuklear.h:3525
NK_API int nk_menu_item_symbol_label(struct nk_context *, enum nk_symbol_type, const char *, nk_flags alignment)
int prev
Definition: nuklear.h:3950
short delete_length
Definition: nuklear.h:2823
NK_API int nk_input_mouse_clicked(const struct nk_input *, enum nk_buttons, struct nk_rect)
struct nk_command header
Definition: nuklear.h:3055
#define NK_PI
Definition: nuklear.h:4177
struct nk_style style
Definition: nuklear.h:4136
NK_API int nk_selectable_image_text(struct nk_context *, struct nk_image, const char *, int, nk_flags align, int *value)
nk_byte r
Definition: nuklear.h:453
float g
Definition: nuklear.h:454
void * ptr
Definition: nuklear.h:460
GLint GLint GLsizei width
Definition: glext.h:6293
struct nk_style_item hover
Definition: nuklear.h:3524
Definition: nuklear.h:2167
Definition: nuklear.h:3713
NK_API int nk_strmatch_fuzzy_text(const char *txt, int txt_len, const char *pattern, int *out_score)
struct nk_config_stack_float floats
Definition: nuklear.h:4082
float border
Definition: nuklear.h:3561
NK_API void nk_textedit_delete(struct nk_text_edit *, int where, int len)
struct nk_vec2 touch_padding
Definition: nuklear.h:3409
struct nk_command_buffer buffer
Definition: nuklear.h:3980
nk_command_type
Definition: nuklear.h:2941
float row_padding
Definition: nuklear.h:3611
NK_API int nk_utf_encode(nk_rune, char *, int)
struct nk_color selected_text_normal
Definition: nuklear.h:3602
struct nk_color text_hover
Definition: nuklear.h:3596
#define NK_UTF_SIZE
Definition: nuklear.h:255
Definition: nuklear.h:2000
void(* draw_begin)(struct nk_command_buffer *, nk_handle)
Definition: nuklear.h:3576
Definition: nuklear.h:699
NK_API int nk_select_image_text(struct nk_context *, struct nk_image, const char *, int, nk_flags align, int value)
NK_API void nk_popup_close(struct nk_context *)
def sign()
Definition: build.py:201
Definition: nuklear.h:3126
struct nk_vec2 pos
Definition: nuklear.h:3173
struct nk_text_undo_record undo_rec[NK_TEXTEDIT_UNDOSTATECOUNT]
Definition: nuklear.h:2828
struct nk_style_item normal
Definition: nuklear.h:3717
NK_API int nk_slide_int(struct nk_context *, int min, int val, int max, int step)
Definition: nuklear.h:1867
NK_API int nk_widget_has_mouse_click_down(struct nk_context *, enum nk_buttons, int down)
nk_command_clipping
Definition: nuklear.h:3124
#define NK_UTF_INVALID
Definition: nuklear.h:4178
nk_uint y
Definition: nuklear.h:463
short char_storage
Definition: nuklear.h:2824
struct nk_command header
Definition: nuklear.h:3087
Definition: ffmpeg_fft.c:36
nk_handle userdata
Definition: nuklear.h:2815
struct nk_vec2 padding
Definition: nuklear.h:3387
struct nk_rect bounds
Definition: nuklear.h:3978
Definition: nuklear.h:466
#define X(a, b)
Definition: bba.c:185
static const char * default_font
Definition: coretext.c:335
struct nk_color text_normal
Definition: nuklear.h:3459
NK_API void nk_spacing(struct nk_context *, int cols)
Definition: nuklear.h:2173
Definition: nuklear.h:3715
NK_API int nk_selectable_text(struct nk_context *, const char *, int, nk_flags align, int *value)
NK_API struct nk_color nk_hsva(int h, int s, int v, int a)
Unknown compiler Device disconnected from port File already exists Saving to backup buffer Got connection Public address Setting disk in tray You have left the game You have joined with input devices *s *s has joined as player u A netplay connection attempt failed because the peer is not running or is running an old version of RetroArch use the same version use the same version This core does not support inter architecture netplay Incorrect password A netplay client has disconnected You do not have permission to play The input devices requested are not available Netplay peer s paused Give hardware rendered cores their own private context Avoids having to assume hardware state changes inbetween frames Adjusts menu screen appearance settings Improves performance at the cost of latency and more video stuttering Use only if you cannot obtain full speed otherwise Autodetect Capabilities Connecting to port Password Username Accounts List Endpoint Achievements Scan Content Import content Ask Block Frames نظام تشغيل الصوت Audio Enable Turbo Deadzone Audio Maximum Timing Skew Audio Output Dynamic Audio Rate Control الصوت Audio Volume WASAPI Exclusive Mode WASAPI Shared Buffer Length Load Override Files Automatically Load Shader Presets Automatically Confirm Quit Scroll Up Toggle Keyboard Basic menu controls Info Scroll Up Toggle Keyboard Don t overwrite SaveRAM on loading savestate Buildbot Assets URL Allow Camera Cheat Cheat File Load Cheat File Cheat Passes Hardcore Mode Achievement Badges Locked Test Unofficial Achievements Unlocked Verbose Mode Config ملفات التكوين Collections Content Allow to remove entries Downloads Cheats Show core name Authors Core label Permissions System manufacturer Controls Options Start a Core Automatically Buildbot Cores URL Updater CPU Cursor Custom Ratio Database Selection Start directory< Default > Directory not found Disk Cycle Tray Status Disk Index Don t care Download Core DPI Override Enable أنظمة التشغيل Check for Missing Firmware Before Loading Dynamic Backgrounds Menu entry hover color False Favorites Limit Maximum Run Speed Frontend Counters Create game options file مساعدة Changing Virtual Gamepad Overlay مساعدة Scanning For Content History List Enable Horizontal Menu معلومات Analog To Digital Type Left Analog X Left analog Left Analog Y Left analog Right Analog X Right analog Right Analog Y Right analog Gun Trigger Gun Aux A Gun Aux C Gun Select Gun D pad Down Gun D pad Right Analog Stick Deadzone Bind All Bind Timeout Hide Unbound Core Input Descriptors Device Index Mouse Index Duty Cycle Keyboard Gamepad Mapping Enable B button(down)") MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_JOYPAD_DOWN
short y
Definition: nuklear.h:3117
NK_API int nk_menu_begin_image_text(struct nk_context *, const char *, int, nk_flags align, struct nk_image, struct nk_vec2 size)
Definition: nuklear.h:3079
Definition: nuklear.h:666
Definition: nuklear.h:1802
struct nk_style_item background
Definition: nuklear.h:3691
struct nk_style_scrollbar scrollh
Definition: nuklear.h:3796
Definition: nuklear.h:2177
nk_style_colors
Definition: nuklear.h:2139
GLboolean invert
Definition: glext.h:6381
float min_height
Definition: nuklear.h:3864
Definition: nuklear.h:1869
NK_API void nk_button_set_behavior(struct nk_context *, enum nk_button_behavior)
Definition: nuklear.h:679
int select_end
Definition: nuklear.h:2855
struct nk_vec2 last
Definition: nuklear.h:3838
struct nk_color col
Definition: nuklear.h:3099
struct nk_window * prev
Definition: nuklear.h:3995
struct nk_color text_hover
Definition: nuklear.h:3430
unsigned int seq
Definition: nuklear.h:3967
NK_API struct nk_command_buffer * nk_window_get_canvas(struct nk_context *)
Definition: nuklear.h:2957
Definition: nuklear.h:669
enum nk_symbol_type dec_symbol
Definition: nuklear.h:3513
NK_API int nk_str_append_text_utf8(struct nk_str *, const char *, int)
unsigned char single_line
Definition: nuklear.h:3956
struct nk_style_button button
Definition: nuklear.h:3785
unsigned short h
Definition: nuklear.h:3107
struct nk_buffer * base
Definition: nuklear.h:3130
GLdouble GLdouble GLint GLint GLdouble GLdouble GLint GLint GLdouble GLdouble w2
Definition: glext.h:9211
NK_API nk_flags nk_edit_buffer(struct nk_context *, nk_flags, struct nk_text_edit *, nk_plugin_filter)
Definition: nuklear.h:4080
struct nk_rect header
Definition: nuklear.h:3943
int active
Definition: nuklear.h:3950
Definition: nuklear.h:3385
float height
Definition: nuklear.h:2487
NK_API void nk_free(struct nk_context *)
struct nk_command header
Definition: nuklear.h:2996
NK_API void nk_property_float(struct nk_context *, const char *name, float min, float *val, float max, float step, float inc_per_pixel)
Definition: nuklear.h:2978
unsigned char has_preferred_x
Definition: nuklear.h:2859
NK_API int nk_combo_begin_image_label(struct nk_context *, const char *selected, struct nk_image, struct nk_vec2 size)
Definition: nuklear.h:2001
Definition: nuklear.h:454
NK_API void nk_plot(struct nk_context *, enum nk_chart_type, const float *values, int count, int offset)
Definition: nuklear.h:3645
NK_API const char * nk_str_at_const(const struct nk_str *, int pos, nk_rune *unicode, int *len)
NK_API void nk_layout_space_end(struct nk_context *)
Definition: nuklear.h:3054
Definition: nuklear.h:3818
float x
Definition: nuklear.h:3844
nk_buttons
Definition: nuklear.h:695
Definition: nuklear.h:484
struct nk_color text_normal
Definition: nuklear.h:3595
unsigned short line_thickness
Definition: nuklear.h:3074
static char * skip(char **buf, const char *delimiters)
Definition: civetweb.c:2018
Definition: nuklear.h:467
NK_API struct nk_rect nk_window_get_bounds(const struct nk_context *ctx)
NK_API struct nk_style_item nk_style_item_image(struct nk_image img)
#define NK_VALUE_PAGE_CAPACITY
Definition: nuklear.h:4093
struct nk_color selected_color
Definition: nuklear.h:3649
NK_API int nk_combo_begin_symbol_text(struct nk_context *, const char *selected, int, enum nk_symbol_type, struct nk_vec2 size)
float indent
Definition: nuklear.h:3706
NK_INT16 nk_short
Definition: nuklear.h:397
NK_API nk_flags nk_chart_push_slot(struct nk_context *, float, int)
NK_API int nk_button_pop_behavior(struct nk_context *)
struct nk_cursor * cursor_last
Definition: nuklear.h:3781
NK_API struct nk_vec2 nk_vec2i(int x, int y)
Definition: nuklear.h:497
float border
Definition: nuklear.h:3631
GLsizei const GLfloat * value
Definition: glext.h:6709
Definition: metal_common.m:516
NK_API void nk_edit_focus(struct nk_context *, nk_flags flags)
int cursor
Definition: nuklear.h:3951
NK_API int nk_window_is_active(struct nk_context *, const char *)
struct nk_style_item hover
Definition: nuklear.h:3550
Definition: nuklear.h:2165
NK_API struct nk_color nk_hsv_iv(const int *hsv)
struct nk_color border_color
Definition: nuklear.h:3526
#define fread
Definition: file_stream_transforms.h:56
NK_API struct nk_color nk_rgba_bv(const nk_byte *rgba)
Definition: nuklear.h:3547
NK_API int nk_init(struct nk_context *, struct nk_allocator *, const struct nk_user_font *)
nk_byte a
Definition: nuklear.h:453
struct nk_command header
Definition: nuklear.h:3032
Definition: nuklear.h:3031
struct nk_scroll scrollbar
Definition: nuklear.h:3954
nk_size needed
Definition: nuklear.h:2698
Definition: nuklear.h:461
#define NK_GLOBAL
Definition: nuklear.h:288
NK_API void nk_combobox_string(struct nk_context *, const char *items_separated_by_zeros, int *selected, int count, int item_height, struct nk_vec2 size)
Definition: nuklear.h:3928
float at_y
Definition: nuklear.h:3895
NK_API void nk_label_wrap(struct nk_context *, const char *)
Definition: nuklear.h:1180
unsigned short h
Definition: nuklear.h:3008
Definition: nuklear.h:4133
struct nk_style_item cursor_active
Definition: nuklear.h:3531
const GLchar * marker
Definition: glsym_es2.h:111
Definition: netplay_private.h:956
unsigned int has_scrolling
Definition: nuklear.h:3899
Definition: nuklear.h:3850
nk_edit_types
Definition: nuklear.h:2014
NK_API int nk_menu_begin_symbol(struct nk_context *, const char *, enum nk_symbol_type, struct nk_vec2 size)
float item_height
Definition: nuklear.h:3868
struct nk_style_button dec_button
Definition: nuklear.h:3511
nk_orientation
Definition: nuklear.h:468
struct nk_color border_color
Definition: nuklear.h:3648
NK_API int nk_list_view_begin(struct nk_context *, struct nk_list_view *out, const char *id, nk_flags, int row_height, int row_count)
unsigned short rounding
Definition: nuklear.h:2997
struct nk_popup_buffer buf
Definition: nuklear.h:3937
NK_API int nk_begin(struct nk_context *ctx, const char *title, struct nk_rect bounds, nk_flags flags)
GLsizei stride
Definition: glext.h:6488
struct nk_style_button dec_button
Definition: nuklear.h:3570
GLenum GLenum dst
Definition: glext.h:6980
Definition: nuklear.h:3447
Definition: nuklear.h:664
Definition: nuklear.h:470
#define NK_FLAGS_STACK_SIZE
Definition: nuklear.h:4045
#define fopen
Definition: file_stream_transforms.h:52
NK_API void nk_fill_rect_multi_color(struct nk_command_buffer *, struct nk_rect, struct nk_color left, struct nk_color top, struct nk_color right, struct nk_color bottom)
Definition: nuklear.h:3004
NK_API void nk_draw_text(struct nk_command_buffer *, struct nk_rect, const char *text, int len, const struct nk_user_font *, struct nk_color, struct nk_color)
NK_API struct nk_color nk_rgba_hex(const char *rgb)
Definition: nuklear.h:457
nk_text_width_f width
Definition: nuklear.h:2489
NK_API void nk_layout_row_push(struct nk_context *, float value)
NK_API double nk_propertyd(struct nk_context *, const char *name, double min, double val, double max, double step, float inc_per_pixel)
NK_API int nk_input_is_mouse_pressed(const struct nk_input *, enum nk_buttons)
NK_API struct nk_panel * nk_window_get_panel(struct nk_context *)
NK_API int nk_textedit_cut(struct nk_text_edit *)
nk_uint * offset_y
Definition: nuklear.h:3894
Definition: nuklear.h:3854
short redo_char_point
Definition: nuklear.h:2833
#define nk_vec2_muls(a, t)
Definition: nuklear.h:4196
unsigned int clicked
Definition: nuklear.h:3184
nk_plugin_alloc alloc
Definition: nuklear.h:486
#define NK_MAX_FLOAT_PRECISION
Definition: nuklear.h:4179
Definition: nuklear.h:2163
struct nk_image img
Definition: nuklear.h:3098
Definition: nuklear.h:2015
vu8 head
Definition: keyboard.c:426
Definition: nuklear.h:4110
struct nk_color selected_hover
Definition: nuklear.h:3601
NK_API int nk_input_is_key_pressed(const struct nk_input *, enum nk_keys)
GLuint GLuint end
Definition: glext.h:6292
int select_start
Definition: nuklear.h:2854
Definition: nuklear.h:665
NK_API void nk_property_double(struct nk_context *, const char *name, double min, double *val, double max, double step, float inc_per_pixel)
Definition: nuklear.h:1835
NK_API struct nk_vec2 nk_rect_pos(struct nk_rect)
struct nk_color text_background
Definition: nuklear.h:3398
GLubyte GLubyte GLubyte GLubyte w
Definition: glext.h:6742
unsigned short rounding
Definition: nuklear.h:3006
NK_API void nk_group_scrolled_end(struct nk_context *)
nk_byte b
Definition: nuklear.h:453
#define nk_ptr_add_const(t, p, i)
Definition: nuklear.h:4199
const struct nk_cursor * cursor_active
Definition: nuklear.h:3780
nk_size last
Definition: nuklear.h:3879
Definition: nuklear.h:468
unsigned char ungrab
Definition: nuklear.h:3179
Definition: nuklear.h:468
struct nk_style_item background
Definition: nuklear.h:3647
char name_string[NK_WINDOW_MAX_NAME]
Definition: nuklear.h:3975
Definition: nuklear.h:687
Definition: nuklear.h:693
NK_API int nk_style_pop_float(struct nk_context *)
Definition: nuklear.h:689
Definition: nuklear.h:452
nk_size end
Definition: nuklear.h:3880
nk_size vertex_size
Definition: nuklear.h:990
#define NK_INT32
Definition: nuklear.h:352
nk_uint scroll_value
Definition: nuklear.h:1809
NK_API int nk_combo_begin_color(struct nk_context *, struct nk_color color, struct nk_vec2 size)
nk_heading
Definition: nuklear.h:465
struct nk_color cursor_border_color
Definition: nuklear.h:3558
int show_buttons
Definition: nuklear.h:3568
char text[NK_INPUT_MAX]
Definition: nuklear.h:3188
Definition: nuklear.h:2140
Definition: nuklear.h:500
int len
Definition: nuklear.h:2733
NK_UINT16 nk_ushort
Definition: nuklear.h:398
Definition: nuklear.h:466
NK_API void nk_color_hsva_f(float *out_h, float *out_s, float *out_v, float *out_a, struct nk_color)
Definition: nuklear.h:682
GLfloat GLfloat GLfloat GLfloat h
Definition: glext.h:8390
NK_API void nk_input_motion(struct nk_context *, int x, int y)
float w
Definition: nuklear.h:3885
int length
Definition: nuklear.h:3962
nk_style_cursor
Definition: nuklear.h:2170
Definition: nuklear.h:3860
nk_hash name
Definition: nuklear.h:3938
struct nk_vec2 button_padding
Definition: nuklear.h:3685
float max
Definition: nuklear.h:3836
unsigned int clicked
Definition: nuklear.h:3168
nk_handle userdata
Definition: nuklear.h:485
Definition: nuklear.h:3129
struct nk_rect bounds
Definition: nuklear.h:3892
NK_API int nk_stricmpn(const char *s1, const char *s2, int n)
Definition: nuklear.h:2685
NK_API struct nk_rect nk_rectv(const float *xywh)
Definition: video4linux2.c:51
NK_API int nk_button_image_styled(struct nk_context *, const struct nk_style_button *, struct nk_image img)
Definition: nuklear.h:3820
unsigned short w
Definition: nuklear.h:3097
GLintptr offset
Definition: glext.h:6560
NK_API void nk_color_hsv_b(nk_byte *out_h, nk_byte *out_s, nk_byte *out_v, struct nk_color)
NK_API struct nk_vec2 nk_layout_space_to_screen(struct nk_context *, struct nk_vec2)
NK_API int nk_button_symbol_styled(struct nk_context *, const struct nk_style_button *, enum nk_symbol_type)
Definition: nuklear.h:3851
struct nk_color bar_normal
Definition: nuklear.h:3490
NK_API void nk_color_fv(float *rgba_out, struct nk_color)
#define NK_VECTOR_STACK_SIZE
Definition: nuklear.h:4041
GLint left
Definition: glext.h:8393
unsigned int count
Definition: nuklear.h:4170
unsigned char active
Definition: nuklear.h:2861
NK_API int nk_menu_item_text(struct nk_context *, const char *, int, nk_flags align)
nk_handle userdata
Definition: nuklear.h:3477
nk_style_item_type
Definition: nuklear.h:3370
nk_flags text_alignment
Definition: nuklear.h:3468
unsigned short line_thickness
Definition: nuklear.h:2980
Definition: nuklear.h:698
GLbitfield flags
Definition: glext.h:7828
NK_API struct nk_color nk_hsv_bv(const nk_byte *hsv)
GLfloat GLfloat v1
Definition: glext.h:6702
#define NK_STATIC_ASSERT(exp)
Definition: nuklear.h:304
NK_API int nk_contextual_item_text(struct nk_context *, const char *, int, nk_flags align)
nk_flags flags
Definition: nuklear.h:3891
struct nk_color label_normal
Definition: nuklear.h:3666
static char old_mode[250]
Definition: dispserv_x11.c:37
NK_API void nk_layout_row(struct nk_context *, enum nk_layout_format, float height, int cols, const float *ratio)
NK_API int nk_input_is_mouse_hovering_rect(const struct nk_input *, struct nk_rect)
unsigned short w
Definition: nuklear.h:3107
Definition: nuklear.h:3777
NK_API int nk_str_append_text_char(struct nk_str *, const char *, int)
NK_API int nk_input_is_mouse_released(const struct nk_input *, enum nk_buttons)
struct nk_style_item hover
Definition: nuklear.h:3393
Definition: nuklear.h:973
Definition: nuklear.h:3094
Definition: nuklear.h:2659
struct nk_clipboard clip
Definition: nuklear.h:4138
NK_API int nk_contextual_item_image_text(struct nk_context *, struct nk_image, const char *, int len, nk_flags alignment)
Definition: nuklear.h:1184
Definition: nuklear.h:971
nk_size last
Definition: nuklear.h:3134
float rounding
Definition: nuklear.h:3607
unsigned short h
Definition: nuklear.h:3050
nk_handle userdata
Definition: nuklear.h:3542
Definition: nuklear.h:473
struct nk_color cursor_hover
Definition: nuklear.h:3590
enum nk_symbol_type sym_right
Definition: nuklear.h:3628
struct nk_vec2 uv
Definition: nuklear.h:979
float h
Definition: nuklear.h:3885
struct nk_vec2 padding
Definition: nuklear.h:3735
Definition: nuklear.h:1845
Definition: nuklear.h:501
struct nk_style_item active
Definition: nuklear.h:3394
struct nk_window * active
Definition: nuklear.h:4167
Definition: nuklear.h:3689
NK_API void nk_buffer_info(struct nk_memory_status *, struct nk_buffer *)
nk_widget_layout_states
Definition: nuklear.h:1833
Definition: nuklear.h:677
Definition: nuklear.h:3071
Definition: nuklear.h:981
float group_border
Definition: nuklear.h:3758
#define NK_CONTAINER_OF(ptr, type, member)
Definition: nuklear.h:4226
NK_API int nk_style_pop_font(struct nk_context *)
nk_uint nk_flags
Definition: nuklear.h:405
NK_API void nk_contextual_end(struct nk_context *)
NK_API void nk_combobox_callback(struct nk_context *, void(*item_getter)(void *, int, const char **), void *, int *selected, int count, int item_height, struct nk_vec2 size)
bool down
Definition: connect_wiiupro.c:51
NK_API struct nk_color nk_hsv_f(float h, float s, float v)
float range
Definition: nuklear.h:3836
NK_API void nk_fill_polygon(struct nk_command_buffer *, float *, int point_count, struct nk_color)
Definition: nuklear.h:674
nk_size size
Definition: nuklear.h:2662
struct nk_vec2 padding
Definition: nuklear.h:3407
NK_API struct nk_color nk_color_picker(struct nk_context *, struct nk_color, enum nk_color_format)
Definition: nuklear.h:684
int build
Definition: nuklear.h:4162
GLenum GLuint GLenum GLsizei length
Definition: glext.h:6233
float rounding
Definition: nuklear.h:3502
static uint8_t body[]
Definition: remotepad.h:4
float x
Definition: nuklear.h:3885
GLdouble n
Definition: glext.h:8396
struct nk_edit_state edit
Definition: nuklear.h:3987
struct nk_table * tables
Definition: nuklear.h:3990
float border
Definition: nuklear.h:3704
nk_size size
Definition: nuklear.h:2684
NK_API void nk_plot_function(struct nk_context *, enum nk_chart_type, void *userdata, float(*value_getter)(void *user, int index), int count, int offset)
GLsizei const GLint * box
Definition: glsym_es2.h:225
float spacing
Definition: nuklear.h:3438
NK_API void nk_window_show_if(struct nk_context *, const char *name, enum nk_show_states, int cond)
struct nk_color color
Definition: nuklear.h:3377
unsigned short w
Definition: nuklear.h:461
Definition: nuklear.h:3614
Definition: nuklear.h:3047
nk_size calls
Definition: nuklear.h:2665
const GLfloat * m
Definition: glext.h:11755
Definition: nuklear.h:463
nk_handle userdata
Definition: nuklear.h:3442
NK_API nk_size nk_buffer_total(struct nk_buffer *)
NK_API void nk_group_end(struct nk_context *)
static struct _xy xy[2][12]
#define in_range(c, lo, up)
Definition: network_common.c:6
Definition: nuklear.h:3824
nk_flags text_alignment
Definition: nuklear.h:3433
struct nk_color label_hover
Definition: nuklear.h:3667
NK_API struct nk_image nk_subimage_id(int, unsigned short w, unsigned short h, struct nk_rect sub_region)
float cursor_size
Definition: nuklear.h:3608
NK_API int nk_style_pop_flags(struct nk_context *)
float footer_height
Definition: nuklear.h:3896
NK_API nk_uint nk_color_u32(struct nk_color)
void(* draw_end)(struct nk_command_buffer *, nk_handle)
Definition: nuklear.h:3642
NK_API void nk_str_init_fixed(struct nk_str *, void *memory, nk_size size)
Definition: nuklear.h:2958
unsigned int page_count
Definition: nuklear.h:4125
Definition: nuklear.h:498
struct nk_font_atlas atlas
Definition: nk_common.c:41
NK_API struct nk_color nk_rgb_f(float r, float g, float b)
const char *const str
Definition: portlistingparse.c:18
NK_API void nk_tooltip(struct nk_context *, const char *)
struct nk_key keys[NK_KEY_MAX]
Definition: nuklear.h:3187
NK_API struct nk_vec2 nk_window_get_size(const struct nk_context *)
Definition: nuklear.h:1179
struct nk_vec2 spacing
Definition: nuklear.h:3708
struct nk_style_item cursor_hover
Definition: nuklear.h:3530
Definition: nuklear.h:476
int id
Definition: nuklear.h:460
NK_API int nk_menu_begin_label(struct nk_context *, const char *, nk_flags align, struct nk_vec2 size)
NK_API void nk_textedit_undo(struct nk_text_edit *)
unsigned int type
Definition: nuklear.h:2661
enum nk_allocation_type type
Definition: nuklear.h:4124
unsigned short w
Definition: nuklear.h:3043
NK_API void nk_color_dv(double *rgba_out, struct nk_color)
GLboolean GLboolean GLboolean GLboolean a
Definition: glext.h:6844
NK_API void nk_str_free(struct nk_str *)
struct nk_panel pan
Definition: nuklear.h:4106
float scrollbar_hiding_timer
Definition: nuklear.h:3982
NK_API void nk_push_scissor(struct nk_command_buffer *, struct nk_rect)
NK_API void nk_stroke_circle(struct nk_command_buffer *, struct nk_rect, float line_thickness, struct nk_color)
struct nk_config_stack_button_behavior button_behaviors
Definition: nuklear.h:4087
nk_command_custom_callback callback
Definition: nuklear.h:3109
NK_API void nk_stroke_polyline(struct nk_command_buffer *, float *points, int point_count, float line_thickness, struct nk_color col)
struct nk_command_buffer * buffer
Definition: nuklear.h:3904
struct nk_style_tab tab
Definition: nuklear.h:3798
#define fseek
Definition: file_stream_transforms.h:55
struct nk_style_button dec_button
Definition: nuklear.h:3637
short y
Definition: nuklear.h:456
Definition: nuklear.h:471
struct nk_memory memory
Definition: nuklear.h:2692
GLint GLint GLsizei GLsizei height
Definition: glext.h:6293
NK_API void nk_push_custom(struct nk_command_buffer *, struct nk_rect, nk_command_custom_callback, nk_handle usr)
nk_hash keys[NK_VALUE_PAGE_CAPACITY]
Definition: nuklear.h:4099
float popup_border
Definition: nuklear.h:3760
Definition: nuklear.h:1870
Definition: nuklear.h:3946
Definition: nuklear.h:2011
struct nk_style_item hover_active
Definition: nuklear.h:3455
nk_flags last_widget_state
Definition: nuklear.h:4139
#define NK_UINT16
Definition: nuklear.h:346
Definition: nuklear.h:3192
nk_handle texture
Definition: nuklear.h:978
NK_API void nk_layout_set_min_row_height(struct nk_context *, float height)
enum nk_panel_type type
Definition: nuklear.h:3936
struct nk_color highlight
Definition: nuklear.h:3835
#define NK_TEXTEDIT_UNDOCHARCOUNT
Definition: nuklear.h:2810
struct nk_property_state property
Definition: nuklear.h:3985
Definition: nuklear.h:2847
NK_API int nk_button_push_behavior(struct nk_context *, enum nk_button_behavior)
Definition: nuklear.h:1840
struct nk_vec2 combo_padding
Definition: nuklear.h:3771
struct nk_mouse_button buttons[NK_BUTTON_MAX]
Definition: nuklear.h:3172
struct nk_config_stack_color colors
Definition: nuklear.h:4085
NK_API struct nk_color nk_hsv(int h, int s, int v)
NK_API struct nk_image nk_subimage_ptr(void *, unsigned short w, unsigned short h, struct nk_rect sub_region)
NK_API int nk_combo_begin_label(struct nk_context *, const char *selected, struct nk_vec2 size)
NK_API int nk_window_has_focus(const struct nk_context *)
nk_text_edit_type
Definition: nuklear.h:2836
struct nk_command header
Definition: nuklear.h:3013
Definition: nuklear.h:469
NK_API struct nk_vec2 nk_widget_size(struct nk_context *)
NK_API int nk_contextual_item_label(struct nk_context *, const char *, nk_flags align)
int prev
Definition: nuklear.h:3960
float rounding_cursor
Definition: nuklear.h:3564
nk_size vertex_alignment
Definition: nuklear.h:991
#define nk_vec2_sub(a, b)
Definition: nuklear.h:4193
float border_cursor
Definition: nuklear.h:3563
set set set set set set set macro pixldst1 elem_size
Definition: pixman-arm-neon-asm.h:54
NK_API struct nk_color nk_hsva_f(float h, float s, float v, float a)
NK_API int nk_combo(struct nk_context *, const char **items, int count, int selected, int item_height, struct nk_vec2 size)
NK_API struct nk_image nk_image_handle(nk_handle)
struct nk_keyboard keyboard
Definition: nuklear.h:3193
float rounding
Definition: nuklear.h:3763
unsigned short h
Definition: nuklear.h:3097
NK_API int nk_popup_begin(struct nk_context *, enum nk_popup_type, const char *, nk_flags, struct nk_rect bounds)
unsigned con_count
Definition: nuklear.h:3941
Definition: nuklear.h:1842