From b607049c8d8bc63cdbfe6b154db534ff57e788a4 Mon Sep 17 00:00:00 2001 From: div0 Date: Sat, 6 Jun 2009 10:44:57 +0000 Subject: [PATCH] menu: add saturation slider, fix warning about fteqcc miscompiling menu tolltip code git-svn-id: svn://svn.icculus.org/nexuiz/trunk@6880 f962a42d-fe04-0410-a3ab-8c8b0445ebaa --- data/qcsrc/menu/menu.qc | 22 ++++++++----------- .../qcsrc/menu/nexuiz/dialog_settings_video.c | 5 +++++ data/tooltips.db | 1 + 3 files changed, 15 insertions(+), 13 deletions(-) diff --git a/data/qcsrc/menu/menu.qc b/data/qcsrc/menu/menu.qc index 2bb4d6b00..4465d8ace 100644 --- a/data/qcsrc/menu/menu.qc +++ b/data/qcsrc/menu/menu.qc @@ -297,21 +297,17 @@ entity m_findtooltipitem(entity root, vector pos) while(it.instanceOfContainer) { + while(it.instanceOfNexposee && it.focusedChild) + { + it = it.focusedChild; + pos = globalToBox(pos, it.Container_origin, it.Container_size); + } if(it.instanceOfNexposee) { - if(it.focusedChild) - { - it = it.focusedChild; - pos = globalToBox(pos, it.Container_origin, it.Container_size); - continue; // don't show dialog tooltips when the dialog is open - } - else - { - it = it.itemFromPoint(it, pos); - if(it.tooltip) - best = it; - break; - } + it = it.itemFromPoint(it, pos); + if(it.tooltip) + best = it; + it = world; } else if(it.instanceOfModalController) it = it.focusedChild; diff --git a/data/qcsrc/menu/nexuiz/dialog_settings_video.c b/data/qcsrc/menu/nexuiz/dialog_settings_video.c index 5e93c723b..304f0e3db 100644 --- a/data/qcsrc/menu/nexuiz/dialog_settings_video.c +++ b/data/qcsrc/menu/nexuiz/dialog_settings_video.c @@ -79,6 +79,11 @@ void fillNexuizVideoSettingsTab(entity me) me.TR(me); me.TD(me, 1, 1, e = makeNexuizTextLabel(0, "Contrast boost:")); me.TD(me, 1, 2, e = makeNexuizSlider(1.0, 5.0, 0.1, "v_contrastboost")); + me.TR(me); + me.TD(me, 1, 1, e = makeNexuizTextLabel(0, "Saturation:")); + setDependent(e, "r_glsl", 1, 1); + me.TD(me, 1, 2, e = makeNexuizSlider(0.0, 2.0, 0.1, "r_glsl_saturation")); + setDependent(e, "r_glsl", 1, 1); me.TR(me); me.TD(me, 1, 3, e = makeNexuizCheckBox(0, "v_glslgamma", "Use GLSL to handle color control")); setDependent(e, "r_glsl", 1, 1); diff --git a/data/tooltips.db b/data/tooltips.db index 0fc2f98d7..424b606ab 100644 --- a/data/tooltips.db +++ b/data/tooltips.db @@ -115,6 +115,7 @@ \v_contrast\Brightness of white \v_gamma\Inverse gamma correction value, a brightness effect that does not affect white or black \v_contrastboost\By how much to multiply the contrast in dark areas +\r_glsl_saturation\Saturation adjustment (0 = gray, 1 = normal, 2 = oversaturated), note that it might decrease performance by a lot to set this to anything other than 1 \v_glslgamma\Enable use of GLSL to apply gamma correction, note that it might decrease performance by a lot (default: disabled) \r_ambient\Ambient lighting, if set too high it tends to make light on maps look dull and flat (default: 4) \r_hdr_scenebrightness\Global rendering brightness (default: 1) -- 2.39.2