use of com.lilithsthrone.controller.eventListeners.TooltipResponseDescriptionEventListener in project liliths-throne-public by Innoxia.
the class MainController method setResponseEventListeners.
public void setResponseEventListeners() {
if (Main.game.getCurrentDialogueNode().getResponseTabTitle(0) != null && !Main.game.getCurrentDialogueNode().getResponseTabTitle(0).isEmpty()) {
int responsePageCounter = 0;
while (Main.game.getCurrentDialogueNode().getResponseTabTitle(responsePageCounter) != null) {
setResponseTabListeners(responsePageCounter);
responsePageCounter++;
}
}
// Responses:
for (int i = 0; i < RESPONSE_COUNT; i++) {
String id = "option_" + i;
if (((EventTarget) document.getElementById(id)) != null) {
SetContentEventListener el = new SetContentEventListener().setIndex(i);
((EventTarget) document.getElementById(id)).addEventListener("click", el, false);
addEventListener(document, id, "mousemove", responseTooltipListener, false);
addEventListener(document, id, "mouseleave", hideTooltipListener, false);
TooltipResponseDescriptionEventListener el2 = new TooltipResponseDescriptionEventListener().setIndex(i);
addEventListener(document, id, "mouseenter", el2, false);
}
}
if (((EventTarget) document.getElementById("switch_right")) != null) {
addEventListener(document, "switch_right", "click", nextResponsePageListener, false);
}
if (((EventTarget) document.getElementById("switch_left")) != null) {
addEventListener(document, "switch_left", "click", previousResponsePageListener, false);
}
}
Aggregations