@Override public void dispatchCUIEvent(CUIEvent event) { cuiActor.dispatchCUIEvent(event); }
/** * Dispatch a CUI event but only if the actor has CUI support. * * @param actor the actor * @param event the event */ public void dispatchCUIEvent(Actor actor, CUIEvent event) { checkNotNull(actor); checkNotNull(event); if (hasCUISupport) { actor.dispatchCUIEvent(event); } else if (useServerCUI) { updateServerCUI(actor); } }
/** * Send the selection information. * * @param actor the actor */ public void dispatchCUISelection(Actor actor) { checkNotNull(actor); if (!hasCUISupport && useServerCUI) { updateServerCUI(actor); return; } if (selector instanceof CUIRegion) { CUIRegion tempSel = (CUIRegion) selector; if (tempSel.getProtocolVersion() > cuiVersion) { actor.dispatchCUIEvent(new SelectionShapeEvent(tempSel.getLegacyTypeID())); tempSel.describeLegacyCUI(this, actor); } else { actor.dispatchCUIEvent(new SelectionShapeEvent(tempSel.getTypeID())); tempSel.describeCUI(this, actor); } } }