oddgames / UIToolkit

Single draw call UI solution for Unity with multi resolution support and more.
518 stars 153 forks source link

scroller with buttons goes haywire #122

Open PapaWhiskey65 opened 12 years ago

PapaWhiskey65 commented 12 years ago

create a horizontal scroller add some sprites add some buttons to the sprites add some sprites to the 2nd set of sprites create a 2nd scroller with same sets creaete onTouchUpInside routines that hide the scrollers and show a new screen quickly click with mouse on buttons new screen will show up but scrollers will randomly not be hidden, wont scroll but the buttons are clickable

PapaWhiskey65 commented 12 years ago

something to do with timing and content_delay_touch in abstracttouchablecontainer.cs set time.timescale to something like 0.0001f to see the issue I've tried checking for timescale <1 and doing content_touch_delay/timescale, but that doesnt seem to help it

PapaWhiskey65 commented 12 years ago

timing problem but i think due to coroutines adding this to UIAbstractTouchableContainer.cs fixes it

protected override void layoutChildren()
{
    //dont layout our children if we're hidden
    //layout children will unhide them
    if (!hidden)
    {
        base.layoutChildren();
        clipToBounds();
    }
}