v0.2.3e: refactored quick slot button, should now support multiple instances of itself tied to different quickslots, needs testing

This commit is contained in:
Evan Debenham
2015-01-20 17:26:53 -05:00
parent 18580f7f0b
commit 2b44154ac1
16 changed files with 86 additions and 82 deletions

View File

@@ -275,17 +275,19 @@ public class Toolbar extends Component {
private static class QuickslotTool extends Tool {
private QuickSlot slot;
private QuickSlotButton slot;
private int slotNum;
public QuickslotTool( int x, int y, int width, int height ) {
public QuickslotTool( int x, int y, int width, int height, int slotNum ) {
super( x, y, width, height );
this.slotNum = slotNum;
}
@Override
protected void createChildren() {
super.createChildren();
slot = new QuickSlot();
slot = new QuickSlotButton( slotNum );
add( slot );
}