Skip to content

Commit

Permalink
Support latest runelite changes
Browse files Browse the repository at this point in the history
  • Loading branch information
Arnuh committed Feb 1, 2024
1 parent f0b4f37 commit be2e575
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

<properties>
<jdk.version>11</jdk.version>
<runelite.version>1.10.13-SNAPSHOT</runelite.version>
<runelite.version>1.10.21</runelite.version>
<launcher.version>2.6.4-SNAPSHOT</launcher.version>
<lombok.version>1.18.22</lombok.version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,6 @@
import javax.swing.JScrollPane;
import javax.swing.JSpinner;
import javax.swing.JTextArea;
import javax.swing.ListCellRenderer;
import javax.swing.ListSelectionModel;
import javax.swing.ScrollPaneConstants;
import javax.swing.SpinnerModel;
Expand Down Expand Up @@ -100,7 +99,7 @@
import net.runelite.client.ui.FontManager;
import net.runelite.client.ui.PluginPanel;
import net.runelite.client.ui.components.ColorJButton;
import net.runelite.client.ui.components.ComboBoxListRenderer;
import net.runelite.client.ui.components.TitleCaseListCellRenderer;
import net.runelite.client.ui.components.colorpicker.ColorPickerManager;
import net.runelite.client.ui.components.colorpicker.RuneliteColorPicker;
import net.runelite.client.util.ColorUtil;
Expand All @@ -126,7 +125,7 @@ class ArnahConfigPanel extends PluginPanel{
private final JLabel title;
private final ArnahPluginToggleButton pluginToggle;

private final ListCellRenderer<Enum<?>> listCellRenderer = new ComboBoxListRenderer<>();
private final TitleCaseListCellRenderer listCellRenderer = new TitleCaseListCellRenderer();

@Inject
private ArnahPluginListPanel pluginList;
Expand Down Expand Up @@ -368,7 +367,9 @@ public void mouseClicked(MouseEvent e){

JButton resetButton = new JButton("Reset");
resetButton.addActionListener((e)->{
final int result = JOptionPane.showOptionDialog(resetButton, "Are you sure you want to reset this plugin's configuration?", "Are you sure?", JOptionPane.YES_NO_OPTION, JOptionPane.WARNING_MESSAGE, null, new String[]{"Yes", "No"}, "No");
final int result = JOptionPane.showOptionDialog(resetButton, "Are you sure you want to reset this plugin's configuration?", "Are you sure?", JOptionPane.YES_NO_OPTION, JOptionPane.WARNING_MESSAGE, null, new String[]{
"Yes",
"No"}, "No");

if(result == JOptionPane.YES_OPTION){
configManager.setDefaultConfiguration(pluginConfig.getConfig(), true);
Expand Down Expand Up @@ -602,7 +603,9 @@ private void changeConfiguration(Component component, ConfigDescriptor cd, Confi
final ConfigItem configItem = cid.getItem();

if(!Strings.isNullOrEmpty(configItem.warning())){
final int result = JOptionPane.showOptionDialog(component, configItem.warning(), "Are you sure?", JOptionPane.YES_NO_OPTION, JOptionPane.WARNING_MESSAGE, null, new String[]{"Yes", "No"}, "No");
final int result = JOptionPane.showOptionDialog(component, configItem.warning(), "Are you sure?", JOptionPane.YES_NO_OPTION, JOptionPane.WARNING_MESSAGE, null, new String[]{
"Yes",
"No"}, "No");

if(result != JOptionPane.YES_OPTION){
rebuild();
Expand Down

0 comments on commit be2e575

Please sign in to comment.