Skip to content

Commit

Permalink
Prevent tooltips from showing over the ColorPicker because of the del…
Browse files Browse the repository at this point in the history
…ay in ColorGraph.
  • Loading branch information
raeleus committed Jan 15, 2024
1 parent 12fa271 commit fbda4e9
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
3 changes: 3 additions & 0 deletions core/src/main/java/com/ray3k/gdxparticleeditor/Listeners.java
Original file line number Diff line number Diff line change
Expand Up @@ -230,6 +230,9 @@ private void showTable(Actor actor) {
if (((Disableable) actor).isDisabled()) return;
}

var inputProcessor = Gdx.input.getInputProcessor();
if (inputProcessor != actor.getStage()) return;

popTable.show(foreground ? foregroundStage : stage);
popTable.attachToActor(actor, edge, align);
if (popTableStyle == tooltipBottomRightArrowStyle) popTable.setAttachOffsetX(7);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,7 @@
import static com.badlogic.gdx.scenes.scene2d.actions.Actions.*;
import static com.ray3k.gdxparticleeditor.Core.foregroundStage;
import static com.ray3k.gdxparticleeditor.Core.stage;
import static com.ray3k.gdxparticleeditor.Listeners.handListener;
import static com.ray3k.gdxparticleeditor.Listeners.ibeamListener;
import static com.ray3k.gdxparticleeditor.Listeners.*;
import static com.ray3k.gdxparticleeditor.widgets.ColorGraph.ColorGraphEventType.*;
import static com.ray3k.gdxparticleeditor.widgets.styles.Styles.popColorPickerStyle;

Expand Down Expand Up @@ -295,6 +294,7 @@ public void cancelled(Color oldColor) {
cp.addListener(new TableShowHideListener() {
@Override
public void tableShown(Event event) {
hideAllTooltips();
}

@Override
Expand Down

0 comments on commit fbda4e9

Please sign in to comment.