MCPcopy Create free account
hub / github.com/codenameone/CodenameOne / ensureSorted

Method ensureSorted

CodenameOne/src/com/codename1/gaming/Scene.java:87–92  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

85 /// Sorts the sprites by z-order if the contents changed. Called by the renderer
86 /// before drawing.
87 void ensureSorted() {
88 if (sortDirty) {
89 Collections.sort(sprites, Z_ORDER);
90 sortDirty = false;
91 }
92 }
93
94 /// Forces a re-sort on the next frame. Call this after changing a sprite's
95 /// z-order so the new ordering takes effect.

Callers 3

zOrderSortingMethod · 0.95
onFrameMethod · 0.80

Calls 1

sortMethod · 0.95

Tested by 2

zOrderSortingMethod · 0.76