mirror of
https://github.com/2006-Scape/Parabot-317-API-Minified.git
synced 2026-07-07 16:49:11 +00:00
[BUGFIX] Solved problem where you could select multiple items
Solves issue #52
This commit is contained in:
@@ -65,19 +65,19 @@ public class BotMenu implements ActionListener {
|
|||||||
debug.add(players);
|
debug.add(players);
|
||||||
|
|
||||||
actions.addSeparator();
|
actions.addSeparator();
|
||||||
|
|
||||||
|
ButtonGroup group = new ButtonGroup();
|
||||||
for (int i = 0; i < MenuAction.getOutputs().length; i++){
|
for (int i = 0; i < MenuAction.getOutputs().length; i++){
|
||||||
final int index = i;
|
final int index = i;
|
||||||
JMenuItem debugOutput = new JCheckBoxMenuItem("Output: " + index);
|
JMenuItem debugOutput = new JRadioButtonMenuItem("Output: " + index);
|
||||||
debugOutput.setEnabled(false);
|
|
||||||
debugOutput.addActionListener(new ActionListener() {
|
debugOutput.addActionListener(new ActionListener() {
|
||||||
@Override
|
@Override
|
||||||
public void actionPerformed(ActionEvent e) {
|
public void actionPerformed(ActionEvent e) {
|
||||||
MenuAction.setCurrentOutputIndex(index);
|
MenuAction.setCurrentOutputIndex(index);
|
||||||
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
if (i == 0){
|
group.add(debugOutput);
|
||||||
debugOutput.setEnabled(true);
|
|
||||||
}
|
|
||||||
actions.add(debugOutput);
|
actions.add(debugOutput);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user