Add TooltipManager method to add tooltip to front of list, and always
add mouse highlight tooltip to front
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user