MCPcopy Create free account
hub / github.com/demoth/jake2 / DrawKeyBindingFunc

Method DrawKeyBindingFunc

client/src/main/java/jake2/client/Menu.java:756–781  ·  view source on GitHub ↗
(Object self)

Source from the content-addressed store, hash-verified

754 }
755
756 private static void DrawKeyBindingFunc(Object self) {
757 int keys[] = { 0, 0 };
758 menuaction_s a = (menuaction_s) self;
759
760 FindKeysForCommand(bindnames[a.localdata[0]][0], keys);
761
762 if (keys[0] == -1) {
763 Menu_DrawString(a.x + a.parent.x + 16, a.y + a.parent.y, "???");
764 } else {
765 int x;
766 String name;
767
768 name = Key.KeynumToString(keys[0]);
769
770 Menu_DrawString(a.x + a.parent.x + 16, a.y + a.parent.y, name);
771
772 x = name.length() * 8;
773
774 if (keys[1] != -1) {
775 Menu_DrawString(a.x + a.parent.x + 24 + x, a.y + a.parent.y,
776 "or");
777 Menu_DrawString(a.x + a.parent.x + 48 + x, a.y + a.parent.y,
778 Key.KeynumToString(keys[1]));
779 }
780 }
781 }
782
783 private static void KeyBindingFunc(Object self) {
784 menuaction_s a = (menuaction_s) self;

Callers 1

executeMethod · 0.95

Calls 3

FindKeysForCommandMethod · 0.95
Menu_DrawStringMethod · 0.95
KeynumToStringMethod · 0.95

Tested by

no test coverage detected