示例#1
0
 public void backSpace() {
   if (save.name.length() > 0) {
     save.name = save.name.substring(0, save.name.length() - 1);
     text = (save.tag.hasNoTags() ? "Save " : "Load ") + save.name;
     updatePosition();
   }
 }
示例#2
0
 public void keyTyped(char c, int key) {
   if (key == Keyboard.KEY_BACK) {
     backSpace();
   }
   if (Character.isDigit(c) || Character.isLetter(c)) {
     save.name += c;
     text = (save.tag.hasNoTags() ? "Save " : "Load ") + save.name;
     updatePosition();
   }
 }
示例#3
0
 public void reset() {
   xVisible = false;
   save.tag = new NBTTagCompound();
   text = "Save " + save.name;
   updatePosition();
 }