2 CLASS(XonoticVideoSettingsTab) EXTENDS(XonoticTab)
3 METHOD(XonoticVideoSettingsTab, fill, void(entity))
4 ATTRIB(XonoticVideoSettingsTab, title, string, _("Video"))
5 ATTRIB(XonoticVideoSettingsTab, intendedWidth, float, 0.9)
6 ATTRIB(XonoticVideoSettingsTab, rows, float, 17)
7 ATTRIB(XonoticVideoSettingsTab, columns, float, 6.2) // added extra .2 for center space
8 ATTRIB(XonoticVideoSettingsTab, name, string, "videosettings")
9 ENDCLASS(XonoticVideoSettingsTab)
10 entity makeXonoticVideoSettingsTab();
14 entity makeXonoticVideoSettingsTab()
17 me = spawnXonoticVideoSettingsTab();
18 me.configureDialog(me);
21 void XonoticVideoSettingsTab_fill(entity me)
26 me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Resolution:")));
27 me.TD(me, 1, 2, e = makeXonoticResolutionSlider());
29 me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Font/UI size:")));
30 me.TD(me, 1, 2, e = makeXonoticTextSlider("menu_vid_scale"));
31 e.addValue(e, ZCTX(_("SZ^Unreadable")), "-1");
32 e.addValue(e, ZCTX(_("SZ^Tiny")), "-0.75");
33 e.addValue(e, ZCTX(_("SZ^Little")), "-0.5");
34 e.addValue(e, ZCTX(_("SZ^Small")), "-0.25");
35 e.addValue(e, ZCTX(_("SZ^Medium")), "0");
36 e.addValue(e, ZCTX(_("SZ^Large")), "0.25");
37 e.addValue(e, ZCTX(_("SZ^Huge")), "0.5");
38 e.addValue(e, ZCTX(_("SZ^Gigantic")), "0.75");
39 e.addValue(e, ZCTX(_("SZ^Colossal")), "1");
40 e.configureXonoticTextSliderValues(e);
42 me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Color depth:")));
43 me.TD(me, 1, 2, e = makeXonoticTextSlider("vid_bitsperpixel"));
44 e.addValue(e, _("16bit"), "16");
45 e.addValue(e, _("32bit"), "32");
46 e.configureXonoticTextSliderValues(e);
48 me.TD(me, 1, 1, e = makeXonoticCheckBox(0, "vid_fullscreen", _("Full screen")));
49 me.TD(me, 1, 2, e = makeXonoticCheckBox(0, "vid_vsync", _("Vertical Synchronization")));
53 me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Anisotropy:")));
54 me.TD(me, 1, 2, e = makeXonoticTextSlider("gl_texture_anisotropy"));
55 e.addValue(e, ZCTX(_("ANISO^Disabled")), "1");
56 e.addValue(e, _("2x"), "2");
57 e.addValue(e, _("4x"), "4");
58 e.addValue(e, _("8x"), "8");
59 e.addValue(e, _("16x"), "16");
60 e.configureXonoticTextSliderValues(e);
62 me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Antialiasing:")));
63 setDependent(e, "r_viewfbo", 0, 0);
64 me.TD(me, 1, 2, e = makeXonoticTextSlider("vid_samples"));
65 e.addValue(e, ZCTX(_("AA^Disabled")), "1");
66 e.addValue(e, _("2x"), "2");
67 e.addValue(e, _("4x"), "4");
68 e.configureXonoticTextSliderValues(e);
69 setDependent(e, "r_viewfbo", 0, 0);
71 me.TD(me, 1, 3, e = makeXonoticCheckBoxEx(2, 0, "r_viewfbo", _("High-quality frame buffer")));
72 setDependent(e, "vid_samples", 1, 1);
76 me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Depth first:")));
77 me.TD(me, 1, 2, e = makeXonoticTextSlider("r_depthfirst"));
78 e.addValue(e, ZCTX(_("DF^Disabled")), "0");
79 e.addValue(e, ZCTX(_("DF^World")), "1");
80 e.addValue(e, ZCTX(_("DF^All")), "2");
81 e.configureXonoticTextSliderValues(e);
83 me.TD(me, 1, 3, e = makeXonoticTextLabel(0, _("Vertex Buffer Objects (VBOs)")));
86 me.TD(me, 1, 0.9, e = makeXonoticRadioButton(1, "gl_vbo", "0", ZCTX(_("VBO^Off"))));
87 me.TD(me, 1, 1.9, e = makeXonoticRadioButton(1, "gl_vbo", "3", _("Vertices, some Tris (compatible)")));
90 me.TD(me, 1, 0.9, e = makeXonoticRadioButton(1, "gl_vbo", "2", _("Vertices")));
91 me.TD(me, 1, 1.9, e = makeXonoticRadioButton(1, "gl_vbo", "1", _("Vertices and Triangles")));
93 me.gotoRC(me, 0, 3.2); me.setFirstColumn(me, me.currentColumn);
94 me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Brightness:")));
95 me.TD(me, 1, 2, e = makeXonoticSlider(0.0, 0.5, 0.02, "v_brightness"));
97 me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Contrast:")));
98 me.TD(me, 1, 2, e = makeXonoticSlider(1.0, 3.0, 0.05, "v_contrast"));
100 me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Gamma:")));
101 setDependentAND(e, "vid_gl20", 1, 1, "v_glslgamma", 1, 1);
102 me.TD(me, 1, 2, e = makeXonoticSlider(0.5, 2.0, 0.05, "v_gamma"));
103 setDependentAND(e, "vid_gl20", 1, 1, "v_glslgamma", 1, 1);
105 me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Contrast boost:")));
106 setDependentAND(e, "vid_gl20", 1, 1, "v_glslgamma", 1, 1);
107 me.TD(me, 1, 2, e = makeXonoticSlider(1.0, 5.0, 0.1, "v_contrastboost"));
108 setDependentAND(e, "vid_gl20", 1, 1, "v_glslgamma", 1, 1);
110 me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Saturation:")));
111 setDependent(e, "vid_gl20", 1, 1);
112 me.TD(me, 1, 2, e = makeXonoticSlider(0.5, 2.0, 0.05, "r_glsl_saturation"));
113 setDependent(e, "vid_gl20", 1, 1);
116 me.TD(me, 1, 1, e = makeXonoticTextLabel(0, ZCTX(_("LIT^Ambient:"))));
117 me.TD(me, 1, 2, e = makeXonoticSlider(0, 20.0, 0.25, "r_ambient"));
119 me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Intensity:")));
120 me.TD(me, 1, 2, e = makeXonoticSlider(0.5, 2.0, 0.05, "r_hdr_scenebrightness"));
123 me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "gl_finish", _("Wait for GPU to finish each frame")));
125 me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "vid_gl20", _("Use OpenGL 2.0 shaders (GLSL)")));
128 me.TD(me, 1, 2.8, e = makeXonoticCheckBox(0, "v_glslgamma", _("Use GLSL to handle color control")));
129 setDependent(e, "vid_gl20", 1, 1);
130 if(cvar("developer"))
133 me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "v_psycho", _("Psycho coloring (easter egg)")));
134 setDependent(e, "vid_gl20", 1, 1);
136 me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "r_trippy", _("Trippy vertices (easter egg)")));
137 setDependent(e, "vid_gl20", 1, 1);
139 me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "v_flipped", _("Flip view horizontally")));
142 me.gotoRC(me, me.rows - 1, 0);
143 me.TD(me, 1, me.columns, makeXonoticCommandButton(_("Apply immediately"), '0 0 0', "menu_cmd sync; vid_restart; menu_restart; togglemenu; defer 0.1 \"menu_cmd videosettings\"", COMMANDBUTTON_APPLY));