mc.displayGuiScreen(parentScreen);
return;
}
if (btn.equals(buttonAdd)) {
Shortcut sh = new Shortcut();
sh.setTitle("");
sh.setKey(Keyboard.KEY_UNKNOWN.getKeyCode());
editItem(sh);
return;
}
ControlsBasicItem item = model.getItem(view.getSelectedRow());
ShortcutBindingItem sh = null;
if (item != null && item instanceof ShortcutBindingItem) {
sh = (ShortcutBindingItem) item;
}
if (sh != null && btn.equals(buttonEdit)) {
editItem(sh.getShortcut());
} else if (btn.equals(buttonEdit) && item != null) {
model.setEditing(item);
}
}