Skip to content

Commit

Permalink
update priority
Browse files Browse the repository at this point in the history
  • Loading branch information
raiyni committed May 1, 2024
1 parent 763d68f commit 4927cd6
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
package net.runelite.client.plugins.devtools;

import com.formdev.flatlaf.extras.FlatUIDefaultsInspector;
import com.google.common.collect.Lists;
import com.google.inject.ProvisionException;
import java.awt.BorderLayout;
import java.awt.Dimension;
Expand All @@ -52,7 +53,6 @@
import net.runelite.client.ui.overlay.OverlayManager;
import net.runelite.client.ui.overlay.OverlayMenuEntry;
import net.runelite.client.ui.overlay.OverlayPanel;
import net.runelite.client.ui.overlay.OverlayPriority;
import net.runelite.client.ui.overlay.components.LineComponent;
import net.runelite.client.ui.overlay.infobox.Counter;
import net.runelite.client.ui.overlay.infobox.InfoBoxManager;
Expand Down Expand Up @@ -247,12 +247,12 @@ public String getName()
}

parent = overlay.addMenuEntry(MenuAction.RUNELITE_SUBMENU, "Change Priority", "");
for (var priority : OverlayPriority.values())
var priorities = Lists.newArrayList(-10f, -1f, 0f, 0.5f, 1f, 10f);
for (var priority : priorities)
{
overlay.addMenuEntry(MenuAction.RUNELITE_OVERLAY, priority.name(), "", (ev) -> overlay.setPriority(OverlayPriority.valueOf(ev.getOption()))).setParent(parent);
overlay.addMenuEntry(MenuAction.RUNELITE_OVERLAY, priority + "", "", (ev) -> overlay.setPriority(priority)).setParent(parent);
}


overlayManager.add(overlay);
});
container.add(newOverlayBtn);
Expand Down

0 comments on commit 4927cd6

Please sign in to comment.