fixed: unable to send touchPad widget to bottom in streamview
This commit is contained in:
1 parent
32ad5d2f8a
commit
2cf9fdfd40
1 file changed
+25
@@ -593,6 +593,31 @@ static const double X1_MOUSE_SPEED_DIVISOR = 2.5;
|
|||||||
[widgetView setupInertialScroller];
|
[widgetView setupInertialScroller];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
uint64_t buttonIndex = 9999999;
|
||||||
|
UIView* deepestButton;
|
||||||
|
for (UIView *subview in self->streamFrameTopLayerView.subviews) {
|
||||||
|
if ([subview isKindOfClass:[OnScreenWidgetView class]]) {
|
||||||
|
OnScreenWidgetView* widget = (OnScreenWidgetView* ) subview;
|
||||||
|
if(widget.widgetType == WidgetTypeEnumButton){
|
||||||
|
uint64_t index = [self->streamFrameTopLayerView.subviews indexOfObject:subview];
|
||||||
|
if (index<buttonIndex){
|
||||||
|
buttonIndex = index;
|
||||||
|
deepestButton = subview;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if(!deepestButton) return;
|
||||||
|
|
||||||
|
for (UIView *subview in self->streamFrameTopLayerView.subviews) {
|
||||||
|
if ([subview isKindOfClass:[OnScreenWidgetView class]]) {
|
||||||
|
OnScreenWidgetView* widget = (OnScreenWidgetView* ) subview;
|
||||||
|
if(widget.widgetType == WidgetTypeEnumTouchPad){
|
||||||
|
[self->streamFrameTopLayerView insertSubview:subview belowSubview:deepestButton];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user