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

Method AddressBook_MenuInit

client/src/main/java/jake2/client/Menu.java:3438–3461  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

3436 }
3437
3438 private static void AddressBook_MenuInit() {
3439 s_addressbook_menu.x = ClientGlobals.viddef.getWidth() / 2 - 142;
3440 s_addressbook_menu.y = ClientGlobals.viddef.getHeight() / 2 - 58;
3441 s_addressbook_menu.nitems = 0;
3442
3443 for (int i = 0; i < NUM_ADDRESSBOOK_ENTRIES; i++) {
3444 cvar_t adr = Cvar.getInstance().Get("adr" + i, "", CVAR_ARCHIVE);
3445
3446 s_addressbook_fields[i].type = MTYPE_FIELD;
3447 s_addressbook_fields[i].name = null;
3448 s_addressbook_fields[i].callback = null;
3449 s_addressbook_fields[i].x = 0;
3450 s_addressbook_fields[i].y = i * 18 + 0;
3451 s_addressbook_fields[i].localdata[0] = i;
3452 // put the cursor to the end of text for editing
3453 s_addressbook_fields[i].cursor = adr.string.length();
3454 s_addressbook_fields[i].length = 60;
3455 s_addressbook_fields[i].visible_length = 30;
3456
3457 s_addressbook_fields[i].buffer = new StringBuffer(adr.string);
3458
3459 Menu_AddItem(s_addressbook_menu, s_addressbook_fields[i]);
3460 }
3461 }
3462
3463 static keyfunc_t AddressBook_MenuKey = new keyfunc_t() {
3464 public String execute(int key) {

Callers 1

Menu_AddressBook_fMethod · 0.95

Calls 5

getInstanceMethod · 0.95
Menu_AddItemMethod · 0.95
getWidthMethod · 0.80
getHeightMethod · 0.80
GetMethod · 0.80

Tested by

no test coverage detected