MCPcopy Create free account
hub / github.com/NetHack/NetHack / ghack_init_status_window

Function ghack_init_status_window

outdated/win/gnome/gnstatus.c:150–430  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

148}
149
150GtkWidget *
151ghack_init_status_window()
152{
153 GtkWidget *horizSep0, *horizSep1, *horizSep2, *horizSep3;
154 GtkWidget *statsHBox, *strVBox, *dexVBox, *intVBox, *statHBox;
155 GtkWidget *wisVBox, *conVBox, *chaVBox;
156 GtkWidget *alignVBox, *hungerVBox, *sickVBox, *blindVBox;
157 GtkWidget *stunVBox, *halluVBox, *confuVBox, *encumbVBox;
158
159 /* Set up a (ridiculous) initial state */
160 lastDepth = 9999;
161 lastStr = 9999;
162 lastInt = 9999;
163 lastWis = 9999;
164 lastDex = 9999;
165 lastCon = 9999;
166 lastCha = 9999;
167 lastAu = 9999;
168 lastHP = 9999;
169 lastMHP = 9999;
170 lastLevel = 9999;
171 lastPOW = 9999;
172 lastMPOW = 9999;
173 lastAC = 9999;
174 lastExp = 9999;
175 lastAlignment = A_NEUTRAL; /* start off guessing neutral */
176 lastHungr = 9999;
177 lastConf = 9999;
178 lastBlind = 9999;
179 lastStun = 9999;
180 lastHalu = 9999;
181 lastSick = 9999;
182 lastEncumb = 9999;
183
184 statTable = gtk_table_new(10, 8, FALSE);
185 gtk_table_set_row_spacings(GTK_TABLE(statTable), 1);
186 gtk_table_set_col_spacings(GTK_TABLE(statTable), 1);
187
188 /* Begin the first row of the table -- the title */
189 titleLabel = gtk_label_new(_("GnomeHack!"));
190 gtk_table_attach(GTK_TABLE(statTable), titleLabel, 0, 8, 0, 1, GTK_FILL,
191 0, 0, 0);
192 if (!normalStyle)
193 normalStyle =
194 gtk_style_copy(gtk_widget_get_style(GTK_WIDGET(titleLabel)));
195
196 /* Set up some styles to draw stuff with */
197 if (!redStyle) {
198 g_assert(greenStyle == NULL);
199 g_assert(bigStyle == NULL);
200 g_assert(bigRedStyle == NULL);
201 g_assert(bigGreenStyle == NULL);
202
203 greenStyle = gtk_style_copy(normalStyle);
204 redStyle = gtk_style_copy(normalStyle);
205 bigRedStyle = gtk_style_copy(normalStyle);
206 bigGreenStyle = gtk_style_copy(normalStyle);
207 bigStyle = gtk_style_copy(normalStyle);

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected