Commit 8bd887b3 authored by Hanspeter Portner's avatar Hanspeter Portner

nk: fix dial behavior with updated nuklear.

parent 52ef4198
Pipeline #13012359 passed with stages
in 5 minutes and 48 seconds
......@@ -1047,10 +1047,9 @@ _dial_bool(struct nk_context *ctx, int32_t *val, struct nk_color color, bool edi
if(layout_states != NK_WIDGET_INVALID)
{
enum nk_widget_states states = NK_WIDGET_STATE_INACTIVE;
struct nk_input *in = ( (layout_states == NK_WIDGET_ROM)
|| (ctx->current->layout->flags & NK_WINDOW_ROM) ) ? 0 : &ctx->input;
struct nk_input *in = (ctx->current->layout->flags & NK_WINDOW_ROM) ? 0 : &ctx->input;
if(in && editable && (layout_states == NK_WIDGET_VALID) )
if(in && editable)
{
bool mouse_has_scrolled = false;
......@@ -1220,10 +1219,9 @@ _dial_double(struct nk_context *ctx, double min, double *val, double max, float
{
enum nk_widget_states states = NK_WIDGET_STATE_INACTIVE;
const double range = max - min;
struct nk_input *in = ( (layout_states == NK_WIDGET_ROM)
|| (ctx->current->layout->flags & NK_WINDOW_ROM) ) ? 0 : &ctx->input;
struct nk_input *in = (ctx->current->layout->flags & NK_WINDOW_ROM) ? 0 : &ctx->input;
if(in && editable && (layout_states == NK_WIDGET_VALID) )
if(in && editable)
{
int divider = 1;
const float dd = _dial_numeric_behavior(ctx, bounds, &states, &divider, in);
......@@ -1256,10 +1254,9 @@ _dial_long(struct nk_context *ctx, int64_t min, int64_t *val, int64_t max, float
{
enum nk_widget_states states = NK_WIDGET_STATE_INACTIVE;
const int64_t range = max - min;
struct nk_input *in = ( (layout_states == NK_WIDGET_ROM)
|| (ctx->current->layout->flags & NK_WINDOW_ROM) ) ? 0 : &ctx->input;
struct nk_input *in = (ctx->current->layout->flags & NK_WINDOW_ROM) ? 0 : &ctx->input;
if(in && editable && (layout_states == NK_WIDGET_VALID) )
if(in && editable)
{
int divider = 1;
const float dd = _dial_numeric_behavior(ctx, bounds, &states, &divider, in);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment