GuiNewControls.java 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509
  1. package us.getfluxed.controlsearch.client.gui;
  2. import net.minecraft.client.Minecraft;
  3. import net.minecraft.client.gui.*;
  4. import net.minecraft.client.resources.I18n;
  5. import net.minecraft.client.settings.*;
  6. import net.minecraftforge.client.settings.KeyModifier;
  7. import net.minecraftforge.fml.client.config.GuiCheckBox;
  8. import org.lwjgl.input.*;
  9. import java.io.IOException;
  10. import java.util.*;
  11. public class GuiNewControls extends GuiControls {
  12. private static final GameSettings.Options[] OPTIONS_ARR = new GameSettings.Options[]{GameSettings.Options.INVERT_MOUSE, GameSettings.Options.SENSITIVITY, GameSettings.Options.TOUCHSCREEN, GameSettings.Options.AUTO_JUMP};
  13. /**
  14. * A reference to the screen object that created this. Used for navigating between screens.
  15. */
  16. private final GuiScreen parentScreen;
  17. /**
  18. * Reference to the GameSettings object.
  19. */
  20. private final GameSettings options;
  21. /**
  22. * The ID of the button that has been pressed.
  23. */
  24. private GuiButton buttonReset;
  25. private GuiTextField search;
  26. private String lastFilterText = "";
  27. private boolean conflicts = false;
  28. private boolean none = false;
  29. private boolean toggleFreeKeys = false;
  30. private EnumSortingType sortingType = EnumSortingType.DEFAULT;
  31. public GuiButton buttonConflict;
  32. public GuiButton buttonNone;
  33. public GuiButton buttonSorting;
  34. public GuiButton buttonToggleKeys;
  35. public GuiCheckBox boxSearchCategory;
  36. public GuiCheckBox boxSearchKey;
  37. public GuiNewControls(GuiScreen screen, GameSettings settings) {
  38. super(screen, settings);
  39. this.parentScreen = screen;
  40. this.options = settings;
  41. }
  42. /**
  43. * Adds the buttons (and other controls) to the screen in question. Called when the GUI is displayed and when the
  44. * window resizes, the buttonList is cleared beforehand.
  45. */
  46. public void initGui() {
  47. this.conflicts = false;
  48. this.none = false;
  49. this.sortingType = EnumSortingType.DEFAULT;
  50. this.keyBindingList = new GuiNewKeyBindingList(this, this.mc);
  51. this.buttonList.add(new GuiButton(200, this.width / 2 - 155, this.height - 29, 150, 20, translate("gui.done")));
  52. this.buttonReset = this.addButton(new GuiButton(201, this.width / 2 - 155 + 160, this.height - 29, 155, 20, translate("controls.resetAll")));
  53. this.screenTitle = translate("controls.title");
  54. int i = 0;
  55. for(GameSettings.Options gamesettings$options : OPTIONS_ARR) {
  56. if(gamesettings$options.getEnumFloat()) {
  57. this.buttonList.add(new GuiOptionSlider(gamesettings$options.returnEnumOrdinal(), this.width / 2 - 155 + i % 2 * 160, 18 + 24 * (i >> 1), gamesettings$options));
  58. } else {
  59. this.buttonList.add(new GuiOptionButton(gamesettings$options.returnEnumOrdinal(), this.width / 2 - 155 + i % 2 * 160, 18 + 24 * (i >> 1), gamesettings$options, this.options.getKeyBinding(gamesettings$options)));
  60. }
  61. ++i;
  62. }
  63. search = new GuiTextField(0, mc.fontRendererObj, this.width / 2 - 154, this.height - 29 - 23, 148, 18);
  64. search.setCanLoseFocus(true);
  65. buttonConflict = new GuiButton(2906, this.width / 2 - 155 + 160, this.height - 29 - 24, 150 / 2, 20, translate("options.showConflicts"));
  66. buttonNone = new GuiButton(2907, this.width / 2 - 155 + 160 + 80, this.height - 29 - 24, 150 / 2, 20, translate("options.showNone"));
  67. buttonSorting = new GuiButton(2908, this.width / 2 - 155 + 160 + 80, this.height - 29 - 24 - 24, 150 / 2, 20, translate("options.sort") + ": " + sortingType.getName());
  68. boxSearchCategory = new GuiCheckBox(2909, this.width / 2 - (155 / 2) + 20, this.height - 29 - 37, translate("options.category"), false);
  69. boxSearchKey = new GuiCheckBox(2910, this.width / 2 - (155 / 2) + 20, this.height - 29 - 50, translate("options.key"), false);
  70. buttonToggleKeys = new GuiButton(2911, this.width / 2 - 155 + 160, this.height - 29 - 24 - 24, 150 / 2, 20, translate("options.toggleFree"));
  71. this.buttonList.add(buttonConflict);
  72. this.buttonList.add(buttonNone);
  73. this.buttonList.add(buttonSorting);
  74. this.buttonList.add(boxSearchCategory);
  75. this.buttonList.add(boxSearchKey);
  76. this.buttonList.add(buttonToggleKeys);
  77. }
  78. @Override
  79. public void updateScreen() {
  80. search.updateCursorCounter();
  81. if(!search.getText().equals(lastFilterText)) {
  82. refreshKeys();
  83. }
  84. }
  85. public void refreshKeys() {
  86. LinkedList<GuiListExtended.IGuiListEntry> workingList = getAllEntries();
  87. LinkedList<GuiListExtended.IGuiListEntry> newList = getEmptyList();
  88. if(none) {
  89. LinkedList<GuiListExtended.IGuiListEntry> unbound = new LinkedList<>();
  90. for(GuiListExtended.IGuiListEntry entry : workingList) {
  91. if(entry instanceof GuiNewKeyBindingList.KeyEntry) {
  92. GuiNewKeyBindingList.KeyEntry ent = (GuiNewKeyBindingList.KeyEntry) entry;
  93. if(ent.getKeybinding().getKeyCode() == 0) {
  94. unbound.add(ent);
  95. }
  96. }
  97. }
  98. workingList = unbound;
  99. } else if(conflicts) {
  100. LinkedList<GuiListExtended.IGuiListEntry> conflicts = new LinkedList<>();
  101. for(GuiListExtended.IGuiListEntry entry : workingList) {
  102. if(entry instanceof GuiNewKeyBindingList.KeyEntry) {
  103. GuiNewKeyBindingList.KeyEntry ent = (GuiNewKeyBindingList.KeyEntry) entry;
  104. if(ent.getKeybinding().getKeyCode() == 0) {
  105. continue;
  106. }
  107. for(GuiListExtended.IGuiListEntry entry1 : ((GuiNewKeyBindingList) keyBindingList).getListEntriesAll()) {
  108. if(!entry.equals(entry1))
  109. if(entry1 instanceof GuiNewKeyBindingList.KeyEntry) {
  110. GuiNewKeyBindingList.KeyEntry ent1 = (GuiNewKeyBindingList.KeyEntry) entry1;
  111. if(ent1.getKeybinding().getKeyCode() == 0) {
  112. continue;
  113. }
  114. if(ent.getKeybinding().conflicts(ent1.getKeybinding())) {
  115. if(!conflicts.contains(ent))
  116. conflicts.add(ent);
  117. if(!conflicts.contains(ent1))
  118. conflicts.add(ent1);
  119. }
  120. }
  121. }
  122. }
  123. }
  124. workingList = conflicts;
  125. }
  126. boolean searched = false;
  127. if(!search.getText().isEmpty()) {
  128. for(GuiListExtended.IGuiListEntry entry : workingList) {
  129. if(!isKeyEntry(entry)) {
  130. continue;
  131. }
  132. GuiNewKeyBindingList.KeyEntry ent = (GuiNewKeyBindingList.KeyEntry) entry;
  133. String compareStr = translate(ent.getKeybinding().getKeyDescription()).toLowerCase();
  134. if(boxSearchCategory.isChecked()) {
  135. compareStr = translate(ent.getKeybinding().getKeyCategory()).toLowerCase();
  136. }
  137. if(boxSearchKey.isChecked()) {
  138. compareStr = translate(ent.getKeybinding().getDisplayName()).toLowerCase();
  139. }
  140. if(compareStr.contains(search.getText().toLowerCase())) {
  141. newList.add(entry);
  142. }
  143. }
  144. searched = true;
  145. }
  146. lastFilterText = search.getText();
  147. if(!searched) {
  148. newList = workingList;
  149. }
  150. newList = sort(newList, sortingType);
  151. setEntries(newList);
  152. }
  153. public LinkedList<GuiListExtended.IGuiListEntry> sort(LinkedList<GuiListExtended.IGuiListEntry> list, EnumSortingType type) {
  154. if(sortingType != EnumSortingType.DEFAULT) {
  155. LinkedList<GuiListExtended.IGuiListEntry> filteredList = getEmptyList();
  156. for(GuiListExtended.IGuiListEntry entry : list) {
  157. if(isKeyEntry(entry)) {
  158. filteredList.add(entry);
  159. }
  160. }
  161. filteredList.sort((o1, o2) -> {
  162. if(o1 instanceof GuiNewKeyBindingList.KeyEntry && o2 instanceof GuiNewKeyBindingList.KeyEntry) {
  163. GuiNewKeyBindingList.KeyEntry ent1 = (GuiNewKeyBindingList.KeyEntry) o1;
  164. GuiNewKeyBindingList.KeyEntry ent2 = (GuiNewKeyBindingList.KeyEntry) o2;
  165. if(type == EnumSortingType.AZ) {
  166. return translate(ent1.getKeybinding().getKeyDescription()).compareTo(translate(ent2.getKeybinding().getKeyDescription()));
  167. } else if(type == EnumSortingType.ZA) {
  168. return translate(ent2.getKeybinding().getKeyDescription()).compareTo(translate(ent1.getKeybinding().getKeyDescription()));
  169. }
  170. }
  171. return -1;
  172. });
  173. return filteredList;
  174. }
  175. return list;
  176. }
  177. public LinkedList<GuiListExtended.IGuiListEntry> getAllEntries() {
  178. return ((GuiNewKeyBindingList) keyBindingList).getListEntriesAll();
  179. }
  180. public LinkedList<GuiListExtended.IGuiListEntry> getEmptyList() {
  181. return new LinkedList<>();
  182. }
  183. public void setEntries(LinkedList<GuiListExtended.IGuiListEntry> entries) {
  184. ((GuiNewKeyBindingList) keyBindingList).setListEntries(entries);
  185. }
  186. public boolean isKeyEntry(GuiListExtended.IGuiListEntry entry) {
  187. return entry instanceof GuiNewKeyBindingList.KeyEntry;// || entry instanceof GuiKeyBindingList.KeyEntry; Vanilla class doesn't have the methods we need and reflection / AT would be tedious
  188. }
  189. public String translate(String text) {
  190. return I18n.format(text);
  191. }
  192. /**
  193. * Handles mouse input.
  194. */
  195. public void handleMouseInput() throws IOException {
  196. superSuperHandleMouseInput();
  197. this.keyBindingList.handleMouseInput();
  198. }
  199. /**
  200. * Handles mouse input.
  201. */
  202. public void superSuperHandleMouseInput() {
  203. int i = Mouse.getEventX() * this.width / this.mc.displayWidth;
  204. int j = this.height - Mouse.getEventY() * this.height / this.mc.displayHeight - 1;
  205. int k = Mouse.getEventButton();
  206. if(Mouse.getEventButtonState()) {
  207. if(this.mc.gameSettings.touchscreen && this.touchValue++ > 0) {
  208. return;
  209. }
  210. this.eventButton = k;
  211. this.lastMouseEvent = Minecraft.getSystemTime();
  212. this.mouseClicked(i, j, this.eventButton);
  213. } else if(k != -1) {
  214. if(this.mc.gameSettings.touchscreen && --this.touchValue > 0) {
  215. return;
  216. }
  217. this.eventButton = -1;
  218. this.mouseReleased(i, j, k);
  219. } else if(this.eventButton != -1 && this.lastMouseEvent > 0L) {
  220. long l = Minecraft.getSystemTime() - this.lastMouseEvent;
  221. this.mouseClickMove(i, j, this.eventButton, l);
  222. }
  223. }
  224. /**
  225. * Called by the controls from the buttonList when activated. (Mouse pressed for buttons)
  226. */
  227. protected void actionPerformed(GuiButton button) {
  228. if(button.id == 200) {
  229. this.mc.displayGuiScreen(this.parentScreen);
  230. } else if(button.id == 201) {
  231. for(KeyBinding keybinding : this.mc.gameSettings.keyBindings) {
  232. keybinding.setToDefault();
  233. }
  234. KeyBinding.resetKeyBindingArrayAndHash();
  235. toggleFreeKeys = false;
  236. } else if(button.id < 100 && button instanceof GuiOptionButton) {
  237. this.options.setOptionValue(((GuiOptionButton) button).returnEnumOptions(), 1);
  238. button.displayString = this.options.getKeyBinding(GameSettings.Options.getEnumOptions(button.id));
  239. } else if(button.id == 2906) {
  240. toggleFreeKeys = false;
  241. none = false;
  242. buttonNone.displayString = translate("options.showNone");
  243. if(!conflicts) {
  244. conflicts = true;
  245. buttonConflict.displayString = translate("options.showAll");
  246. refreshKeys();
  247. } else {
  248. conflicts = false;
  249. buttonConflict.displayString = translate("options.showConflicts");
  250. refreshKeys();
  251. }
  252. } else if(button.id == 2907) {
  253. toggleFreeKeys = false;
  254. conflicts = false;
  255. buttonConflict.displayString = translate("options.showConflicts");
  256. if(!none) {
  257. none = true;
  258. buttonNone.displayString = translate("options.showAll");
  259. refreshKeys();
  260. } else {
  261. none = false;
  262. buttonNone.displayString = translate("options.showNone");
  263. refreshKeys();
  264. }
  265. } else if(button.id == 2908) {
  266. toggleFreeKeys = false;
  267. sortingType = sortingType.cycle();
  268. buttonSorting.displayString = translate("options.sort") + ": " + sortingType.getName();
  269. refreshKeys();
  270. } else if(button.id == 2909) {
  271. toggleFreeKeys = false;
  272. boxSearchKey.setIsChecked(false);
  273. refreshKeys();
  274. } else if(button.id == 2910) {
  275. toggleFreeKeys = false;
  276. boxSearchCategory.setIsChecked(false);
  277. refreshKeys();
  278. } else if(button.id == 2911) {
  279. buttonToggleKeys.displayString = translate("options.toggleFree");
  280. toggleFreeKeys = !toggleFreeKeys;
  281. }
  282. }
  283. /**
  284. * Called when the mouse is clicked. Args : mouseX, mouseY, clickedButton
  285. */
  286. protected void mouseClicked(int mouseX, int mouseY, int mouseButton) {
  287. if(this.buttonId != null) {
  288. this.buttonId.setKeyModifierAndCode(net.minecraftforge.client.settings.KeyModifier.getActiveModifier(), -100 + mouseButton);
  289. this.options.setOptionKeyBinding(this.buttonId, -100 + mouseButton);
  290. this.buttonId = null;
  291. KeyBinding.resetKeyBindingArrayAndHash();
  292. } else if(mouseButton != 0 || !this.keyBindingList.mouseClicked(mouseX, mouseY, mouseButton)) {
  293. superSuperMouseClicked(mouseX, mouseY, mouseButton);
  294. }
  295. search.mouseClicked(mouseX, mouseY, mouseButton);
  296. if(mouseButton == 1 && mouseX >= search.xPosition && mouseX < search.xPosition + search.width && mouseY >= search.yPosition && mouseY < search.yPosition + search.height) {
  297. search.setText("");
  298. }
  299. }
  300. /**
  301. * Called when the mouse is clicked. Args : mouseX, mouseY, clickedButton
  302. */
  303. protected void superSuperMouseClicked(int mouseX, int mouseY, int mouseButton) {
  304. if(mouseButton == 0) {
  305. for(int i = 0; i < this.buttonList.size(); ++i) {
  306. GuiButton guibutton = this.buttonList.get(i);
  307. if(guibutton.mousePressed(this.mc, mouseX, mouseY)) {
  308. net.minecraftforge.client.event.GuiScreenEvent.ActionPerformedEvent.Pre event = new net.minecraftforge.client.event.GuiScreenEvent.ActionPerformedEvent.Pre(this, guibutton, this.buttonList);
  309. if(net.minecraftforge.common.MinecraftForge.EVENT_BUS.post(event))
  310. break;
  311. guibutton = event.getButton();
  312. this.selectedButton = guibutton;
  313. guibutton.playPressSound(this.mc.getSoundHandler());
  314. this.actionPerformed(guibutton);
  315. if(this.equals(this.mc.currentScreen))
  316. net.minecraftforge.common.MinecraftForge.EVENT_BUS.post(new net.minecraftforge.client.event.GuiScreenEvent.ActionPerformedEvent.Post(this, event.getButton(), this.buttonList));
  317. }
  318. }
  319. }
  320. }
  321. /**
  322. * Called when a mouse button is released.
  323. */
  324. protected void mouseReleased(int mouseX, int mouseY, int state) {
  325. if(state != 0 || !this.keyBindingList.mouseReleased(mouseX, mouseY, state)) {
  326. superSuperMouseReleased(mouseX, mouseY, state);
  327. }
  328. }
  329. protected void superSuperMouseReleased(int mouseX, int mouseY, int state) {
  330. if(this.selectedButton != null && state == 0) {
  331. this.selectedButton.mouseReleased(mouseX, mouseY);
  332. this.selectedButton = null;
  333. }
  334. }
  335. /**
  336. * Fired when a key is typed (except F11 which toggles full screen). This is the equivalent of
  337. * KeyListener.keyTyped(KeyEvent e). Args : character (character on the key), keyCode (lwjgl Keyboard key code)
  338. */
  339. protected void keyTyped(char typedChar, int keyCode) {
  340. if(this.buttonId != null) {
  341. if(keyCode == 1) {
  342. this.buttonId.setKeyModifierAndCode(net.minecraftforge.client.settings.KeyModifier.NONE, 0);
  343. this.options.setOptionKeyBinding(this.buttonId, 0);
  344. } else if(keyCode != 0) {
  345. this.buttonId.setKeyModifierAndCode(net.minecraftforge.client.settings.KeyModifier.getActiveModifier(), keyCode);
  346. this.options.setOptionKeyBinding(this.buttonId, keyCode);
  347. } else if(typedChar > 0) {
  348. this.buttonId.setKeyModifierAndCode(net.minecraftforge.client.settings.KeyModifier.getActiveModifier(), typedChar + 256);
  349. this.options.setOptionKeyBinding(this.buttonId, typedChar + 256);
  350. }
  351. if(!KeyModifier.isKeyCodeModifier(keyCode)) {
  352. this.buttonId = null;
  353. }
  354. this.time = Minecraft.getSystemTime();
  355. KeyBinding.resetKeyBindingArrayAndHash();
  356. } else {
  357. if(search.isFocused())
  358. search.textboxKeyTyped(typedChar, keyCode);
  359. else {
  360. superSuperKeyTyped(typedChar, keyCode);
  361. }
  362. }
  363. }
  364. protected void superSuperKeyTyped(char typedChar, int keyCode) {
  365. if(keyCode == 1) {
  366. this.mc.displayGuiScreen(null);
  367. if(this.mc.currentScreen == null) {
  368. this.mc.setIngameFocus();
  369. }
  370. }
  371. }
  372. /**
  373. * Draws the screen and all the components in it.
  374. */
  375. public void drawScreen(int mouseX, int mouseY, float partialTicks) {
  376. this.drawDefaultBackground();
  377. this.keyBindingList.drawScreen(mouseX, mouseY, partialTicks);
  378. this.drawCenteredString(this.fontRendererObj, this.screenTitle, this.width / 2, 8, 16777215);
  379. this.drawCenteredString(this.fontRendererObj, translate("options.search"), this.width / 2 - (155 / 2), this.height - 29 - 39, 16777215);
  380. boolean flag = false;
  381. for(KeyBinding keybinding : this.options.keyBindings) {
  382. if(!keybinding.isSetToDefaultValue()) {
  383. flag = true;
  384. break;
  385. }
  386. }
  387. this.buttonReset.enabled = flag;
  388. superSuperDrawScreen(mouseX, mouseY, partialTicks);
  389. search.drawTextBox();
  390. if(toggleFreeKeys) {
  391. drawRect(keyBindingList.left, keyBindingList.top, keyBindingList.right, keyBindingList.bottom , 0xFF000000);
  392. LinkedList<Integer> keyCodes = new LinkedList<>();
  393. for(int i = 2; i < 219; i++) {
  394. keyCodes.add(i);
  395. }
  396. keyCodes.add(-98);
  397. keyCodes.add(-99);
  398. keyCodes.add(-100);
  399. List<Integer> removed = new ArrayList<>();
  400. ((GuiNewKeyBindingList) keyBindingList).getListEntriesAll().forEach(i -> {
  401. if(i instanceof GuiNewKeyBindingList.KeyEntry) {
  402. removed.add(((GuiNewKeyBindingList.KeyEntry) i).getKeybinding().getKeyCode());
  403. }
  404. });
  405. int[] rem = new int[]{0xDB, 0x64, 0x65, 0x66, 0x67, 0x68, 0x69, 0x70, 0x71, 0x29, 0x79, 0x57, 0x7B, 0x7D, 0x8D, 0x90, 0x92, 0x93, 0x94, 0x95, 0x96, 0x97, 0x9C, 0xA7, 0xB3, 0xC5, 0x91, 0xC4, 0xDA};
  406. for(int i : rem) {
  407. removed.add(i);
  408. }
  409. keyCodes.forEach(i -> {
  410. if(i >= 0)
  411. if(Keyboard.getKeyName(i) == null || Keyboard.getKeyName(i).isEmpty()) {
  412. removed.add(i);
  413. }
  414. });
  415. keyCodes.removeAll(removed);
  416. Collections.sort(keyCodes);
  417. final int[] x = {0};
  418. final int[] y = {0};
  419. final int[] count = {0};
  420. fontRendererObj.drawString(translate("options.availableKeys") + ":", width / 2, keyBindingList.top + 2, 0xFFFFFF);
  421. keyCodes.forEach(key -> {
  422. if(key >= 0) {
  423. fontRendererObj.drawString(Keyboard.getKeyName(key), keyBindingList.left + (x[0] * 65), keyBindingList.top + 12 + (y[0]++ * fontRendererObj.FONT_HEIGHT), 0xFF55FF);
  424. } else {
  425. switch(key + 100) {
  426. case 0:
  427. fontRendererObj.drawString("Button 1", keyBindingList.left + (x[0] * 65), keyBindingList.top + 12 + (y[0]++ * fontRendererObj.FONT_HEIGHT), 0x55FF55);
  428. break;
  429. case 1:
  430. fontRendererObj.drawString("Button 2", keyBindingList.left + (x[0] * 65), keyBindingList.top + 12 + (y[0]++ * fontRendererObj.FONT_HEIGHT), 0x55FF55);
  431. break;
  432. case 2:
  433. fontRendererObj.drawString("Button 3", keyBindingList.left + (x[0] * 65), keyBindingList.top + 12 + (y[0]++ * fontRendererObj.FONT_HEIGHT), 0x55FF55);
  434. break;
  435. }
  436. }
  437. count[0]++;
  438. if(count[0] > keyBindingList.height / 30) {
  439. count[0] = 0;
  440. x[0]++;
  441. y[0] = 0;
  442. }
  443. });
  444. }
  445. }
  446. public void superSuperDrawScreen(int mouseX, int mouseY, float partialTicks) {
  447. for(GuiButton aButtonList : this.buttonList) {
  448. aButtonList.func_191745_a(this.mc, mouseX, mouseY, partialTicks);
  449. }
  450. for(GuiLabel aLabelList : this.labelList) {
  451. aLabelList.drawLabel(this.mc, mouseX, mouseY);
  452. }
  453. }
  454. }