!7 cmodule MoveModulesEffect > DynSingleFunction { transient L entries; transient int steps = 15, stepsBack = 5; transient double sleepBetween = 2.0; sclass Entry { S module; Rect original; Pt destiny; } void doIt { entries = synchroList(); final int w = dm_desktopWidth(), mid = w/2, margin = 20; try { for (S module : dm_visibleModuleIDs()) { Rect r = dm_frameRect(module); if (r == null) continue; bool goRight = r.x >= mid; Pt destiny = pt(goRight ? w+margin : -margin-r.w, r.y); entries.add(nu(Entry.class, +module, original := r, +destiny)); } for i to steps: { moveThem(i, steps); sleep(50); } sleepSeconds(sleepBetween); for (int i = stepsBack-1; i > 0; i--) { moveThem(i, stepsBack); sleep(50); } } finally { for (Entry e : entries) dm_setBounds(e.module, e.original); } } void moveThem(final int i, final int steps) { swing { for (Entry e : entries) dm_setBounds(e.module, blend(e.original.x, e.destiny.x, doubleRatio(i, steps-1)), blend(e.original.y, e.destiny.y, doubleRatio(i, steps-1)), e.original.w, e.original.h); } } }