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

Method LoadGame_MenuInit

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

Source from the content-addressed store, hash-verified

2131 }
2132
2133 private static void LoadGame_MenuInit() {
2134 int i;
2135
2136 s_loadgame_menu.x = ClientGlobals.viddef.getWidth() / 2 - 120;
2137 s_loadgame_menu.y = ClientGlobals.viddef.getHeight() / 2 - 58;
2138 s_loadgame_menu.nitems = 0;
2139
2140 Create_Savestrings();
2141
2142 for (i = 0; i < MAX_SAVEGAMES; i++) {
2143 s_loadgame_actions[i].name = m_savestrings[i];
2144 s_loadgame_actions[i].flags = QMF_LEFT_JUSTIFY;
2145 s_loadgame_actions[i].localdata[0] = i;
2146 s_loadgame_actions[i].callback = new mcallback() {
2147 public void execute(Object o) {
2148 LoadGameCallback(o);
2149 }
2150 };
2151
2152 s_loadgame_actions[i].x = 0;
2153 s_loadgame_actions[i].y = (i) * 10;
2154 if (i > 0) // separate from autosave
2155 s_loadgame_actions[i].y += 10;
2156
2157 s_loadgame_actions[i].type = MTYPE_ACTION;
2158
2159 Menu_AddItem(s_loadgame_menu, s_loadgame_actions[i]);
2160 }
2161 }
2162
2163 private static void LoadGame_MenuDraw() {
2164 Banner("m_banner_load_game");

Callers 1

Menu_LoadGame_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