Minion<IEvent> clicker = new Minion<IEvent>() {
@Override
public long run(Dispatcher<IEvent> dispatcher, String type, IEvent event) {
if (!(event instanceof HyperlinkEvent)) return Minion.CONTINUE;
HyperlinkEvent ev = (HyperlinkEvent) event;
for (Hyperlink h: fLinks) if (!h.equals(ev.hyperlink())) h.deselect();
boolean showLogics = false;
boolean showCursor = false;
if (fAniCursor != null) {
fAniCursor.cleanup();
fAniCursor = null;
}
// Create correct side bar
if (ev.href().equals("level")) {
LevelSideBar s = new LevelSideBar();
setSideContainer(s);
s.init();
showLogics = true;
} else if (ev.href().equals("tiles")) {
TilesSideBar s = new TilesSideBar();
setSideContainer(s);
s.init();
showCursor = true;
} else if (ev.href().equals("smarts")) {
SmartsSideBar s = new SmartsSideBar();
setSideContainer(s);
s.init();
showCursor = true;
} else if (ev.href().equals("logics")) {
ObjectSideBar s = new ObjectSideBar();
setSideContainer(s);
s.init();
if (fSelectedLogic != null) s.editLogic(fSelectedLogic);
showLogics = true;