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

Method SaveGame_MenuInit

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

Source from the content-addressed store, hash-verified

2214 }
2215
2216 private static void SaveGame_MenuInit() {
2217 int i;
2218
2219 s_savegame_menu.x = ClientGlobals.viddef.getWidth() / 2 - 120;
2220 s_savegame_menu.y = ClientGlobals.viddef.getHeight() / 2 - 58;
2221 s_savegame_menu.nitems = 0;
2222
2223 Create_Savestrings();
2224
2225 // don't include the autosave slot
2226 for (i = 0; i < MAX_SAVEGAMES - 1; i++) {
2227 s_savegame_actions[i].name = m_savestrings[i + 1];
2228 s_savegame_actions[i].localdata[0] = i + 1;
2229 s_savegame_actions[i].flags = QMF_LEFT_JUSTIFY;
2230 s_savegame_actions[i].callback = new mcallback() {
2231 public void execute(Object o) {
2232 SaveGameCallback(o);
2233 }
2234 };
2235
2236 s_savegame_actions[i].x = 0;
2237 s_savegame_actions[i].y = (i) * 10;
2238
2239 s_savegame_actions[i].type = MTYPE_ACTION;
2240
2241 Menu_AddItem(s_savegame_menu, s_savegame_actions[i]);
2242 }
2243 }
2244
2245 private static String SaveGame_MenuKey(int key) {
2246 if (key == K_ENTER || key == K_ESCAPE) {

Callers 1

Menu_SaveGame_fMethod · 0.95

Calls 4

Create_SavestringsMethod · 0.95
Menu_AddItemMethod · 0.95
getWidthMethod · 0.80
getHeightMethod · 0.80

Tested by

no test coverage detected