fix order of input layer processing
This commit is contained in:
parent
29aebd84b4
commit
54035374bd
@ -123,20 +123,24 @@ public class LayerManager extends AbstractList<Layer> implements OnGestureListen
|
|||||||
if (o instanceof InputLayer)
|
if (o instanceof InputLayer)
|
||||||
numInputLayers++;
|
numInputLayers++;
|
||||||
|
|
||||||
mLayers[n - i - 1] = o;
|
mLayers[i] = o;
|
||||||
}
|
}
|
||||||
|
|
||||||
mDrawLayers = new RenderOverlay[numRenderLayers];
|
mDrawLayers = new RenderOverlay[numRenderLayers];
|
||||||
mInputLayer = new InputLayer[numInputLayers];
|
mInputLayer = new InputLayer[numInputLayers];
|
||||||
|
|
||||||
for (int i = 0, cntR = 0, cntI = 0, n = mLayerList.size(); i < n; i++) {
|
for (int i = 0, cntR = 0, cntI = 1, n = mLayerList.size(); i < n; i++) {
|
||||||
Layer o = mLayerList.get(i);
|
Layer o = mLayerList.get(i);
|
||||||
RenderOverlay l = o.getLayer();
|
RenderOverlay l = o.getLayer();
|
||||||
if (l != null)
|
if (l != null)
|
||||||
mDrawLayers[cntR++] = l;
|
mDrawLayers[cntR++] = l;
|
||||||
|
|
||||||
if (o instanceof InputLayer)
|
if (o instanceof InputLayer) {
|
||||||
mInputLayer[cntI++] = (InputLayer)o;
|
// sort from top to bottom, so that highest layers
|
||||||
|
// process event first.
|
||||||
|
mInputLayer[numInputLayers - cntI] = (InputLayer) o;
|
||||||
|
cntI++;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
mDirtyLayers = false;
|
mDirtyLayers = false;
|
||||||
@ -320,12 +324,11 @@ public class LayerManager extends AbstractList<Layer> implements OnGestureListen
|
|||||||
if (mDirtyLayers)
|
if (mDirtyLayers)
|
||||||
updateLayers();
|
updateLayers();
|
||||||
|
|
||||||
for (Layer l : mLayers){
|
for (Layer l : mLayers) {
|
||||||
l.destroy();
|
l.destroy();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// /**
|
// /**
|
||||||
// * Gets the optional TilesLayer class.
|
// * Gets the optional TilesLayer class.
|
||||||
// *
|
// *
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user