The logic behind it. My GUI design is there, the logic part is what I am struggling with. Here is what I have so far that is not quite working:
Gui class variables
private boolean DropToggle;
private JCheckBox DropCheckBox;
Gui class Checkbox
//Dropping Check Box
DropCheckBox = new JCheckBox("Drop?");
DropCheckBox.setFont(new Font("Sans Serif", Font.BOLD, 15));
DropCheckBox.setBounds(53, 285, 150, 20);
settingsPanel.add(DropCheckBox);
DropCheckBox.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
DropCheckBox.setSelected(true);
DropToggle = true;
}
});
Gui Call method
public boolean isDropBoxChecked(){
return DropToggle;
}
Main class OnSstart
if(gui.isDropBoxChecked()){
tasks.add(new DropFish(this));
}
Drop task
public class DropFish extends Task{
private boolean dropItemsEnabled;
public DropFish(EioFisher script) {
super(script);
}
@Override
public boolean canProcess() throws InterruptedException {
return script.inventory.isFull();
}
@Override
public void process() throws InterruptedException {
script. currentState = Status.DROPPING;
script.inventory.dropAllExcept("Small fishing net");
}
}
When I check the box it does nothing.
And here is a visual of my GUI design
I still have to work on the other sections, but I was starting with figuring out the dropping and banking first before I even tried the Type, Tool, and Location.