+ cachepic_t *p;
+ const char* string;
+
+ M_DrawPic(16, 4, "gfx/qplaque.lmp");
+ p = Draw_CachePic("gfx/vidmodes.lmp");
+ M_DrawPic((320-p->width)/2, 4, "gfx/vidmodes.lmp");
+
+ // Resolution
+ M_Print(16, video_cursor_table[0], " Resolution");
+ string = va("%dx%d", video_resolutions[video_resolution][0], video_resolutions[video_resolution][1]);
+ M_Print (220, video_cursor_table[0], string);
+
+ // Bits per pixel
+ M_Print(16, video_cursor_table[1], " Bits per pixel");
+ M_Print (220, video_cursor_table[1], (vid_bitsperpixel.integer == 32) ? "32" : "16");
+
+ // Fullscreen
+ M_Print(16, video_cursor_table[2], " Fullscreen");
+ M_DrawCheckbox(220, video_cursor_table[2], vid_fullscreen.integer);
+
+ // Stencil
+ M_Print(16, video_cursor_table[3], " Stencil");
+ M_DrawCheckbox(220, video_cursor_table[3], vid_stencil.integer);
+
+ // "Apply" button
+ M_Print(220, video_cursor_table[4], "Apply");
+
+ // Cursor
+ M_DrawCharacter(200, video_cursor_table[video_cursor], 12+((int)(realtime*4)&1));
+}
+
+
+void M_Menu_Video_AdjustSliders (int dir)
+{
+ S_LocalSound ("misc/menu3.wav");
+
+ switch (video_cursor)
+ {
+ // Resolution
+ case 0:
+ {
+ int new_resolution = video_resolution + dir;
+ if (new_resolution < 0)
+ video_resolution = sizeof (video_resolutions) / sizeof (video_resolutions[0]) - 1;
+ else if (new_resolution > (int) (sizeof (video_resolutions) / sizeof (video_resolutions[0]) - 1))
+ video_resolution = 0;
+ else
+ video_resolution = new_resolution;
+
+ Cvar_SetValueQuick (&vid_width, video_resolutions[video_resolution][0]);
+ Cvar_SetValueQuick (&vid_height, video_resolutions[video_resolution][1]);
+ break;
+ }
+
+ // Bits per pixel
+ case 1:
+ Cvar_SetValueQuick (&vid_bitsperpixel, (vid_bitsperpixel.integer == 32) ? 16 : 32);
+ break;
+ case 2:
+ Cvar_SetValueQuick (&vid_fullscreen, !vid_fullscreen.integer);
+ break;
+ case 3:
+ Cvar_SetValueQuick (&vid_stencil, !vid_stencil.integer);
+ break;
+ }