Add TooltipManager method to add tooltip to front of list, and always

add mouse highlight tooltip to front
This commit is contained in:
Charlie Waters
2018-03-15 16:48:29 -04:00
committed by Adam
parent df540aa7b8
commit 649c491f92
2 changed files with 6 additions and 3 deletions

View File

@@ -89,7 +89,7 @@ class MouseHighlightOverlay extends Overlay
}
}
tooltipManager.add(new Tooltip(option + (Strings.isNullOrEmpty(target) ? "" : " " + target)));
tooltipManager.addFront(new Tooltip(option + (Strings.isNullOrEmpty(target) ? "" : " " + target)));
return null;
}
}

View File

@@ -28,10 +28,8 @@ import java.util.ArrayList;
import java.util.List;
import javax.inject.Singleton;
import lombok.Getter;
import lombok.extern.slf4j.Slf4j;
@Singleton
@Slf4j
public class TooltipManager
{
@Getter
@@ -42,6 +40,11 @@ public class TooltipManager
tooltips.add(tooltip);
}
public void addFront(Tooltip tooltip)
{
tooltips.add(0, tooltip);
}
public void clear()
{
tooltips.clear();