reworked texture loading. now favours shallower files over preferred extensions.
attempt to use wad/*.png for hud images too (ezquake compat). image_list can now be used to show the filename the texture loader actually picked (including which package its from). reworked loading screens a little. hopefully this should give qc a better chance of working with them. added invert mouse pitch option to menusys menus, a couple of other tweaks too. git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@5049 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
parent
e23267b295
commit
1fcba85e20
20 changed files with 278 additions and 122 deletions
|
@ -31,10 +31,35 @@ static string() skinopts =
|
|||
return opts;
|
||||
};
|
||||
|
||||
var float autocvar_m_pitch = 0.022;
|
||||
class options_basic : mitem_exmenu
|
||||
{
|
||||
virtual string(string key) get =
|
||||
{
|
||||
if (key == "m_pitchsign")
|
||||
return (autocvar_m_pitch<0)?"1":"0";
|
||||
return super::get(key);
|
||||
};
|
||||
virtual void(string key, string newval) set =
|
||||
{
|
||||
if (key == "m_pitchsign")
|
||||
{
|
||||
float invert;
|
||||
if (stof(newval))
|
||||
invert = autocvar_m_pitch > 0;
|
||||
else
|
||||
invert = autocvar_m_pitch < 0;
|
||||
if (invert)
|
||||
cvar_set("m_pitch", ftos(-autocvar_m_pitch));
|
||||
}
|
||||
else
|
||||
super::set(key, newval);
|
||||
};
|
||||
};
|
||||
nonstatic void(mitem_desktop desktop) M_Options_Basic =
|
||||
{
|
||||
mitem_exmenu m;
|
||||
m = spawn(mitem_exmenu, item_text:_("Basic Options"), item_flags:IF_SELECTABLE, item_command:"m_options");
|
||||
m = spawn(options_basic, item_text:_("Basic Options"), item_flags:IF_SELECTABLE, item_command:"m_options");
|
||||
desktop.add(m, RS_X_MIN_PARENT_MIN|RS_Y_MIN_PARENT_MIN | RS_X_MAX_PARENT_MAX|RS_Y_MAX_PARENT_MAX, '0 0', '0 0');
|
||||
desktop.item_focuschange(m, IF_KFOCUSED);
|
||||
m.totop();
|
||||
|
@ -60,9 +85,7 @@ nonstatic void(mitem_desktop desktop) M_Options_Basic =
|
|||
if (assumefalsecheckcommand("bottomcolor"))
|
||||
fr.add(menuitemcolour_spawn(_("Lower Colour"), "bottomcolor", '280 8'), fl, [0, pos], [0, 8]); pos += 8; /*aka: arse colour*/
|
||||
pos += 8;
|
||||
// it = spawn(mitem_check, item_text:_("Invert Mouse"), item_command:"m_pitch", item_scale:8, item_size:'280 8');
|
||||
// it.item_dynamicvalue = idv_cvar_invert;
|
||||
// fr.add(it, fr, [0, pos], [0, 8]); pos += 8;
|
||||
fr.add(menuitemcheck_spawn (_("Invert Mouse"), "m_pitchsign", '280 8'), fl, [0, pos], [0, 8]); pos += 8;
|
||||
fr.add(menuitemslider_spawn(_("Sensitivity"), "sensitivity", '3 20 1', '280 8'), fl, [0, pos], [0, 8]); pos += 8;
|
||||
fr.add(menuitemslider_spawn(_("Fov"), "fov", '80 130 5', '280 8'), fl, [0, pos], [0, 8]); pos += 8;
|
||||
fr.add(menuitemslider_spawn(_("Gamma"), dp("v_gamma", "gamma"), '0.4 1.3 0.1', '280 8'), fl, [0, pos], [0, 8]); pos += 8;
|
||||
|
|
|
@ -18,6 +18,10 @@ nonstatic void(mitem_desktop desktop) M_Options_Effects =
|
|||
|
||||
fr.add(menuitemcheck_spawn(_("Show Framerate"), dp("showfps", "show_fps"), '280 8'), fl, [0, pos], [0, 8]); pos += 8;
|
||||
fr.add(menuitemcheck_spawn(_("Bloom"), "r_bloom", '280 8'), fl, [0, pos], [0, 8]); pos += 8;
|
||||
if (assumefalsecheckcommand("r_drawflat"))
|
||||
fr.add(menuitemcheck_spawn(_("Simple Textures"), "r_drawflat", '280 8'), fl, [0, pos], [0, 8]); pos += 8;
|
||||
if (assumefalsecheckcommand("r_softwarebanding"))
|
||||
fr.add(menuitemcheck_spawn(_("Colourmapped Rendering"), "r_softwarebanding", '280 8'), fl, [0, pos], [0, 8]); pos += 8;
|
||||
fr.add(menuitemcheck_spawn(_("HDR"), "r_hdr_irisadaptation", '280 8'), fl, [0, pos], [0, 8]); pos += 8;
|
||||
fr.add(menuitemcheck_spawn(_("Coronas"), "r_coronas", '280 8'), fl, [0, pos], [0, 8]); pos += 8;
|
||||
fr.add(menuitemcheck_spawn(_("High Res Textures"), "gl_load24bit", '280 8'), fl, [0, pos], [0, 8]); pos += 8;
|
||||
|
|
|
@ -73,13 +73,13 @@ nonstatic void(mitem_desktop desktop) M_Options_Video =
|
|||
// "60 \"60\" "
|
||||
// "75 \"75\" "
|
||||
)), fl, [0, pos], [0, 8]); pos += 8;
|
||||
fr.add(menuitemcheck_spawn(_("VSync"), dp("vid_vsync", "vid_wait"), '280 8'), fl, [0, pos], [0, 8]); pos += 8;
|
||||
fr.add(menuitemcheck_spawn(_("Show Framerate"), dp("showfps", "show_fps"), '280 8'), fl, [0, pos], [0, 8]); pos += 8;
|
||||
fr.add(menuitemslider_spawn(_("View Size"), "viewsize", '50 120 10', '280 8'), fl, [0, pos], [0, 8]); pos += 8;
|
||||
fr.add(menuitemslider_spawn(_("Field Of View"), "fov", '50 140 5', '280 8'), fl, [0, pos], [0, 8]); pos += 8;
|
||||
fr.add(menuitemslider_spawn(_("Gamma"), "gamma", '1.3 0.5 -0.1', '280 8'), fl, [0, pos], [0, 8]); pos += 8;
|
||||
fr.add(menuitemslider_spawn(_("Contrast"), "contrast", '0.7 2 0.1', '280 8'), fl, [0, pos], [0, 8]); pos += 8;
|
||||
fr.add(menuitemslider_spawn(_("Brightness"), "brightness", '0 0.4 0.05', '280 8'), fl, [0, pos], [0, 8]); pos += 8;
|
||||
fr.add(menuitemcheck_spawn(_("VSync"), dp("vid_vsync", "vid_wait"), '280 8'), fl, [0, pos], [0, 8]); pos += 8;
|
||||
fr.add(menuitemcheck_spawn(_("Show Framerate"), dp("showfps", "show_fps"), '280 8'), fl, [0, pos], [0, 8]); pos += 8;
|
||||
|
||||
addmenuback(m);
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue