removed option group widget
This commit is contained in:
parent
c4a59bfb57
commit
ddd8e41f37
|
@ -506,7 +506,7 @@ file_browser_run(struct file_browser *browser, int width, int height)
|
|||
zr_style_push_property(&browser->config, ZR_PROPERTY_ITEM_SPACING, zr_vec2(0, 4));
|
||||
|
||||
/* output special important directory list in own window */
|
||||
zr_group_begin(&context, &sub, NULL,0, browser->sel);
|
||||
zr_group_begin(&context, &sub, NULL, ZR_WINDOW_NO_SCROLLBAR, browser->sel);
|
||||
{
|
||||
struct zr_image home = icons->home.img;
|
||||
struct zr_image desktop = icons->desktop.img;
|
||||
|
|
23
zahnrad.c
23
zahnrad.c
|
@ -4082,7 +4082,7 @@ zr_widget_slider(struct zr_command_buffer *out, struct zr_rect slider,
|
|||
{
|
||||
const float d = in->mouse.pos.x - (cursor.x + cursor.w / 2.0f);
|
||||
const float pxstep = (slider.w - (2 * s->padding.x)) / slider_steps;
|
||||
/* only update value if the next slider step is reached*/
|
||||
/* only update value if the next slider step is reached */
|
||||
col = s->active;
|
||||
if (ZR_ABS(d) >= pxstep) {
|
||||
const zr_float steps = (zr_float)((zr_int)(ZR_ABS(d) / pxstep));
|
||||
|
@ -6315,7 +6315,7 @@ zr_spacing(struct zr_context *l, zr_size cols)
|
|||
index = (l->row.index + cols) % l->row.columns;
|
||||
n = index - l->row.index;
|
||||
|
||||
/* spacing over the row boundries */
|
||||
/* spacing over row boundries */
|
||||
if (l->row.index + cols > l->row.columns) {
|
||||
zr_size rows = (l->row.index + cols) / l->row.columns;
|
||||
for (i = 0; i < rows; ++i)
|
||||
|
@ -6719,20 +6719,6 @@ zr_option(struct zr_context *layout, const char *text, zr_bool is_active)
|
|||
return is_active;
|
||||
}
|
||||
|
||||
zr_size
|
||||
zr_option_group(struct zr_context *layout, const char **options,
|
||||
zr_size count, zr_size current)
|
||||
{
|
||||
zr_size i;
|
||||
ZR_ASSERT(layout && options && count);
|
||||
if (!layout || !options || !count) return current;
|
||||
for (i = 0; i < count; ++i) {
|
||||
if (zr_option(layout, options[i], i == current))
|
||||
current = i;
|
||||
}
|
||||
return current;
|
||||
}
|
||||
|
||||
zr_float
|
||||
zr_slider(struct zr_context *layout, zr_float min_value, zr_float value,
|
||||
zr_float max_value, zr_float value_step)
|
||||
|
@ -7436,6 +7422,7 @@ zr_shelf_begin(struct zr_context *parent, struct zr_context *shelf,
|
|||
if (!parent->valid)
|
||||
goto failed;
|
||||
|
||||
/* cache some config data */
|
||||
config = parent->style;
|
||||
out = parent->buffer;
|
||||
font = &config->font;
|
||||
|
@ -7509,7 +7496,7 @@ zr_shelf_begin(struct zr_context *parent, struct zr_context *shelf,
|
|||
bounds.y += header_h;
|
||||
bounds.h -= header_h;
|
||||
{
|
||||
/* setup fake panel to create a panel layout */
|
||||
/* setup fake window to create a context */
|
||||
zr_flags flags;
|
||||
flags = ZR_WINDOW_BORDER|ZR_WINDOW_TAB;
|
||||
if (parent->flags & ZR_WINDOW_ROM)
|
||||
|
@ -7599,7 +7586,7 @@ zr_popup_begin(struct zr_context *parent, struct zr_context *popup,
|
|||
rect.y += parent->clip.y;
|
||||
parent->flags |= ZR_WINDOW_ROM;
|
||||
|
||||
/* initialize a fake panel */
|
||||
/* initialize a fake window */
|
||||
flags |= ZR_WINDOW_BORDER|ZR_WINDOW_TAB;
|
||||
if (type == ZR_POPUP_DYNAMIC)
|
||||
flags |= ZR_WINDOW_DYNAMIC;
|
||||
|
|
14
zahnrad.h
14
zahnrad.h
|
@ -583,7 +583,7 @@ zr_size zr_buffer_total(struct zr_buffer*);
|
|||
zr_command_buffer_push_rect -- pushes a rectange into the command buffer
|
||||
zr_command_buffer_push_circle -- pushes a circle into the command buffer
|
||||
zr_command_buffer_push_triangle-- pushes a triangle command into the buffer
|
||||
zr_command_buffer_push_cruve -- pushes a bezier cruve command into the buffer
|
||||
zr_command_buffer_push_curve -- pushes a bezier cruve command into the buffer
|
||||
zr_command_buffer_push_image -- pushes a image draw command into the buffer
|
||||
zr_command_buffer_push_text -- pushes a text draw command into the buffer
|
||||
|
||||
|
@ -860,7 +860,7 @@ const struct zr_command *zr_command_buffer_next(struct zr_command_buffer*,
|
|||
queue in the `zr_window_init` with the `zr_command_queue_add` function
|
||||
but removing a window requires a manual call of `zr_command_queue_remove`.
|
||||
Internally the window calls the `zr_command_queue_start` and
|
||||
`zr_commanmd_queue_finish` function that setup and finilize a command buffer for
|
||||
`zr_command_queue_finish` function that setup and finilize a command buffer for
|
||||
command queuing. Finally to iterate over all commands in all command buffers
|
||||
the iterator API is provided. It allows to iterate over each command in a
|
||||
foreach loop.
|
||||
|
@ -3099,7 +3099,6 @@ void zr_layout_pop(struct zr_context*);
|
|||
zr_image -- image widget for outputing a image to a window
|
||||
zr_check -- add a checkbox widget
|
||||
zr_option -- radiobutton widget
|
||||
zr_option_group -- radiobutton group for automatic single selection
|
||||
zr_slider -- slider widget with min,max,step value
|
||||
zr_progress -- progressbar widget
|
||||
zr_edit -- edit textbox widget for text input
|
||||
|
@ -3182,15 +3181,6 @@ zr_bool zr_option(struct zr_context*, const char*, zr_bool active);
|
|||
Output:
|
||||
- from user input updated state of the radiobutton
|
||||
*/
|
||||
zr_size zr_option_group(struct zr_context*, const char**, zr_size cnt, zr_size cur);
|
||||
/* this function creates a radiobutton group widget with only one active radiobutton
|
||||
Input:
|
||||
- radiobutton label array describing the content of each radiobutton
|
||||
- number of radiobuttons
|
||||
- index of the current active radiobutton
|
||||
Output:
|
||||
- the from user input updated index of the active radiobutton
|
||||
*/
|
||||
zr_bool zr_button_text(struct zr_context*, const char*, enum zr_button_behavior);
|
||||
/* this function creates a text button
|
||||
Input:
|
||||
|
|
Loading…
Reference in New Issue