diff options
Diffstat (limited to 'src/ui')
-rw-r--r-- | src/ui/widget.c | 10 | ||||
-rw-r--r-- | src/ui/widget.h | 1 |
2 files changed, 0 insertions, 11 deletions
diff --git a/src/ui/widget.c b/src/ui/widget.c index 1ab16b4f..61bbf43a 100644 --- a/src/ui/widget.c +++ b/src/ui/widget.c | |||
@@ -126,7 +126,6 @@ void init_Widget(iWidget *d) { | |||
126 | d->minSize = zero_I2(); | 126 | d->minSize = zero_I2(); |
127 | d->sizeRef = NULL; | 127 | d->sizeRef = NULL; |
128 | d->offsetRef = NULL; | 128 | d->offsetRef = NULL; |
129 | d->animOffsetRef = NULL; | ||
130 | d->bgColor = none_ColorId; | 129 | d->bgColor = none_ColorId; |
131 | d->frameColor = none_ColorId; | 130 | d->frameColor = none_ColorId; |
132 | init_Anim(&d->visualOffset, 0.0f); | 131 | init_Anim(&d->visualOffset, 0.0f); |
@@ -890,9 +889,6 @@ static void applyVisualOffset_Widget_(const iWidget *d, iInt2 *pos) { | |||
890 | pos->y += off; | 889 | pos->y += off; |
891 | } | 890 | } |
892 | } | 891 | } |
893 | if (d->animOffsetRef) { | ||
894 | pos->y -= value_Anim(d->animOffsetRef); | ||
895 | } | ||
896 | if (d->flags & refChildrenOffset_WidgetFlag) { | 892 | if (d->flags & refChildrenOffset_WidgetFlag) { |
897 | pos->x += visualOffsetByReference_Widget(d); | 893 | pos->x += visualOffsetByReference_Widget(d); |
898 | } | 894 | } |
@@ -955,12 +951,6 @@ iBool containsExpanded_Widget(const iWidget *d, iInt2 windowCoord, int expand) { | |||
955 | addY_I2(d->rect.size, | 951 | addY_I2(d->rect.size, |
956 | d->flags & drawBackgroundToBottom_WidgetFlag ? size_Root(d->root).y : 0) | 952 | d->flags & drawBackgroundToBottom_WidgetFlag ? size_Root(d->root).y : 0) |
957 | }; | 953 | }; |
958 | /* Apply the animated offset. (Visual offsets don't affect interaction.) */ | ||
959 | for (const iWidget *w = d; w; w = w->parent) { | ||
960 | if (w->animOffsetRef) { | ||
961 | windowCoord.y += value_Anim(w->animOffsetRef); | ||
962 | } | ||
963 | } | ||
964 | return contains_Rect(expand ? expanded_Rect(bounds, init1_I2(expand)) : bounds, | 954 | return contains_Rect(expand ? expanded_Rect(bounds, init1_I2(expand)) : bounds, |
965 | windowToInner_Widget(d, windowCoord)); | 955 | windowToInner_Widget(d, windowCoord)); |
966 | } | 956 | } |
diff --git a/src/ui/widget.h b/src/ui/widget.h index d93b0344..4025f5c5 100644 --- a/src/ui/widget.h +++ b/src/ui/widget.h | |||
@@ -143,7 +143,6 @@ struct Impl_Widget { | |||
143 | iInt2 minSize; | 143 | iInt2 minSize; |
144 | iWidget * sizeRef; | 144 | iWidget * sizeRef; |
145 | iWidget * offsetRef; | 145 | iWidget * offsetRef; |
146 | const iAnim *animOffsetRef; | ||
147 | int padding[4]; /* left, top, right, bottom */ | 146 | int padding[4]; /* left, top, right, bottom */ |
148 | iAnim visualOffset; | 147 | iAnim visualOffset; |
149 | int bgColor; | 148 | int bgColor; |