Comfort Vignette (@MuadDib)

+ haptic intensity menu control
This commit is contained in:
Simon 2022-11-25 18:01:08 +00:00
parent 0d3d244157
commit b942a64fc2
12 changed files with 1196 additions and 805 deletions

View file

@ -818,6 +818,11 @@ void updateHMDOrientation()
{
VectorCopy(vr.weaponangles, vr.weaponangles_first);
}
// View yaw delta
float clientview_yaw = vr.clientviewangles[YAW] - vr.hmdorientation[YAW];
vr.clientview_yaw_delta = vr.clientview_yaw_last - clientview_yaw;
vr.clientview_yaw_last = clientview_yaw;
}
void setHMDPosition( float x, float y, float z )
@ -1345,6 +1350,7 @@ void JKVR_Init()
vr_irl_crouch_to_stand_ratio = Cvar_Get ("vr_irl_crouch_to_stand_ratio", "0.65", CVAR_ARCHIVE);
vr_saber_block_debounce_time = Cvar_Get ("vr_saber_block_debounce_time", "200", CVAR_ARCHIVE);
vr_haptic_intensity = Cvar_Get ("vr_haptic_intensity", "1.0", CVAR_ARCHIVE);
vr_comfort_vignette = Cvar_Get ("vr_comfort_vignette", "0.0", CVAR_ARCHIVE);
cvar_t *expanded_menu_enabled = Cvar_Get ("expanded_menu_enabled", "0", CVAR_ARCHIVE);
if (FS_FileExists("expanded_menu.pk3")) {

View file

@ -44,6 +44,8 @@ typedef struct {
vec3_t clientviewangles; //orientation in the client - we use this in the cgame
float snapTurn; // how much turn has been applied to the yaw by joystick
float clientview_yaw_last; // Don't use this, it is just for calculating delta!
float clientview_yaw_delta;
vec3_t weaponposition;
vec3_t weaponoffset;

View file

@ -18,4 +18,5 @@ extern cvar_t *vr_irl_crouch_enabled;
extern cvar_t *vr_irl_crouch_to_stand_ratio;
extern cvar_t *vr_saber_block_debounce_time;
extern cvar_t *vr_haptic_intensity;
extern cvar_t *vr_comfort_vignette;

View file

@ -38,6 +38,7 @@ cvar_t *vr_irl_crouch_enabled;
cvar_t *vr_irl_crouch_to_stand_ratio;
cvar_t *vr_saber_block_debounce_time;
cvar_t *vr_haptic_intensity;
cvar_t *vr_comfort_vignette;
ovrInputStateTrackedRemote leftTrackedRemoteState_old;
ovrInputStateTrackedRemote leftTrackedRemoteState_new;

View file

@ -2571,6 +2571,82 @@ static void CG_DrawZoomBorders( void )
CG_FillRect( 0, 480 - 80, 640, bar_height, modulate );
}
/*
==============
CG_DrawVignette
==============
*/
float currentComfortVignetteValue = 0.0f;
float filteredViewYawDelta = 0.0f;
static void CG_DrawVignette( void )
{
playerState_t *ps;
ps = &cg.snap->ps;
cvar_t *vr_comfort_vignette = gi.cvar("vr_comfort_vignette", "0.0", CVAR_ARCHIVE); // defined in VrCvars.h
if (vr_comfort_vignette->value <= 0.0f || vr_comfort_vignette->value > 1.0f || !cg.zoomMode == 0)
{
return;
}
bool isMoving = VectorLength(cg.predicted_player_state.velocity) > 30.0;
// When player is in the air, apply vignette (to prevent throbbing on top of jump)
bool isInAir = ps->groundEntityNum == ENTITYNUM_NONE;
cvar_t *vr_turn_mode = gi.cvar("vr_turn_mode", "0", CVAR_ARCHIVE); // defined in VrCvars.h
// Apply only for smooth turn
bool isTurning = (vr_turn_mode->integer == 2 || (vr_turn_mode->integer == 1 && vr->third_person));
if (isTurning) {
float yawDelta = fabsf(vr->clientview_yaw_delta);
if (yawDelta > 180)
{
yawDelta = fabs(yawDelta - 360);
}
filteredViewYawDelta = filteredViewYawDelta * 0.75f + yawDelta * 0.25f;
isTurning = filteredViewYawDelta > 1;
}
if (isMoving || isInAir || isTurning)
{
if (currentComfortVignetteValue < vr_comfort_vignette->value)
{
currentComfortVignetteValue += vr_comfort_vignette->value * 0.05;
if (currentComfortVignetteValue > 1.0f)
currentComfortVignetteValue = 1.0f;
}
} else{
if (currentComfortVignetteValue > 0.0f)
currentComfortVignetteValue -= vr_comfort_vignette->value * 0.05;
}
if (currentComfortVignetteValue > 0.0f && currentComfortVignetteValue <= 1.0f)
{
int screenWidth = 640; //cg.refdef.width;
int screenHeight = 480; //cg.refdef.height;
int x = (int)(0 + currentComfortVignetteValue * screenWidth / 3.5f);
int w = (int)(screenWidth - 2 * x);
int y = (int)(0 + currentComfortVignetteValue * screenHeight / 3.5f);
int h = (int)(screenHeight - 2 * y);
vec4_t black = {0.0, 0.0, 0.0, 1};
cgi_R_SetColor( black );
// sides
cgi_R_DrawStretchPic( 0, 0, x, screenHeight, 0, 0, 1, 1, cgs.media.whiteShader );
cgi_R_DrawStretchPic( screenWidth - x, 0, x, screenHeight, 0, 0, 1, 1, cgs.media.whiteShader );
// top/bottom
cgi_R_DrawStretchPic( x, 0, screenWidth - x, y, 0, 0, 1, 1, cgs.media.whiteShader );
cgi_R_DrawStretchPic( x, screenHeight - y, screenWidth - x, y, 0, 0, 1, 1, cgs.media.whiteShader );
// vignette
cgi_R_DrawStretchPic( x, y, w, h, 0, 0, 1, 1, cgs.media.vignetteShader );
cgi_R_SetColor( NULL );
}
}
/*
=================
CG_Draw2D
@ -2662,6 +2738,8 @@ static void CG_Draw2D( void )
// don't draw any status if dead
if ( cg.snap->ps.stats[STAT_HEALTH] > 0 )
{
CG_DrawVignette();
if ( !(cent->gent && cent->gent->s.eFlags & (EF_LOCKED_TO_WEAPON |EF_IN_ATST)))
{
CG_DrawIconBackground();

View file

@ -1313,6 +1313,8 @@ static void CG_RegisterGraphics( void ) {
cgs.media.reticleShader = cgi_R_RegisterShader( "gfx/weapon/scope" );
cgs.media.vignetteShader = cgi_R_RegisterShaderNoMip( "gfx/vignette" );
// FIXME: do these conditionally
cgi_R_RegisterShader( "gfx/2d/workingCamera" );

View file

@ -151,6 +151,8 @@ typedef struct {
qhandle_t reticleShader;
qhandle_t vignetteShader;
// Disruptor zoom graphics
qhandle_t disruptorMask;
qhandle_t disruptorInsert;

Binary file not shown.

Binary file not shown.

View file

@ -3,16 +3,16 @@ CONFIG W:\bin\striped.cfg
ID 100
REFERENCE MENUS_VR
DESCRIPTION "VR Menu Localizations"
COUNT 119
COUNT 123
INDEX 0
{
REFERENCE COMMON_CONTROLS_ITEM
TEXT_LANGUAGE1 "OBSOLETE Common"
TEXT_LANGUAGE1 "Common"
}
INDEX 1
{
REFERENCE COMMON_CONTROLS_DESC
TEXT_LANGUAGE1 "OBSOLETE Common controls configuration."
TEXT_LANGUAGE1 "Common controls configuration."
}
INDEX 2
{
@ -37,7 +37,7 @@ INDEX 5
INDEX 6
{
REFERENCE COMFORT_CONTROLS_DESC
TEXT_LANGUAGE1 "Configure common controls and comfort options."
TEXT_LANGUAGE1 "Configure comfort options."
}
INDEX 7
{
@ -599,3 +599,23 @@ INDEX 118
REFERENCE AUTO_USE_BACTA_DESC
TEXT_LANGUAGE1 "When enabled, automatically uses bacta canister before dying."
}
INDEX 119
{
REFERENCE HAPTIC_INTENSITY_ITEM
TEXT_LANGUAGE1 "Haptic Intensity:"
}
INDEX 120
{
REFERENCE HAPTIC_INTENSITY_DESC
TEXT_LANGUAGE1 "Adjust intensity of haptic feedback."
}
INDEX 121
{
REFERENCE COMFORT_VIGNETTE_ITEM
TEXT_LANGUAGE1 "Comfort Vignette:"
}
INDEX 122
{
REFERENCE COMFORT_VIGNETTE_DESC
TEXT_LANGUAGE1 "Adjust size of comfort vignette."
}

View file

@ -20,14 +20,16 @@
onOpen
{
show setup_background
show comfortcontrols
show commoncontrols
hide weaponcontrols
hide forcecontrols
hide invcontrols
setitemcolor comfortcontrolbutton forecolor 1 1 1 1
hide comfortcontrols
setitemcolor commoncontrolbutton forecolor 1 1 1 1
setitemcolor weaponscontrolbutton forecolor 0.64 0.65 1 1
setitemcolor forcecontrolbutton forecolor 0.64 0.65 1 1
setitemcolor inventorycontrolbutton forecolor 0.64 0.65 1 1
setitemcolor comfortcontrolbutton forecolor 0.64 0.65 1 1
}
onClose
@ -631,10 +633,10 @@
showCvar { 1 }
}
// Comfort button
// Common button
itemDef
{
name comfortbutton_glow
name commonbutton_glow
group mods
style WINDOW_STYLE_SHADER
rect 120 173 170 30
@ -646,9 +648,9 @@
itemDef
{
name comfortcontrolbutton
name commoncontrolbutton
group none
text @MENUS_VR_COMFORT_CONTROLS_ITEM
text @MENUS_VR_COMMON_CONTROLS_ITEM
type ITEM_TYPE_BUTTON
style WINDOW_STYLE_EMPTY
rect 120 173 170 30
@ -660,28 +662,30 @@
textstyle 3
forecolor 0.65 0.65 1 1
visible 1
descText @MENUS_VR_COMFORT_CONTROLS_DESC
descText @MENUS_VR_COMMON_CONTROLS_DESC
mouseEnter
{
show comfortbutton_glow
show commonbutton_glow
}
mouseExit
{
hide comfortbutton_glow
hide commonbutton_glow
}
action
{
play sound/interface/button1
show setup_background
show comfortcontrols
show commoncontrols
hide weaponcontrols
hide forcecontrols
hide invcontrols
setitemcolor comfortcontrolbutton forecolor 1 1 1 1
hide comfortcontrols
setitemcolor commoncontrolbutton forecolor 1 1 1 1
setitemcolor weaponscontrolbutton forecolor 0.64 0.65 1 1
setitemcolor forcecontrolbutton forecolor 0.64 0.65 1 1
setitemcolor inventorycontrolbutton forecolor 0.64 0.65 1 1
setitemcolor comfortcontrolbutton forecolor 0.64 0.65 1 1
}
}
@ -728,14 +732,16 @@
{
play sound/interface/button1
show setup_background
hide comfortcontrols
hide commoncontrols
show weaponcontrols
hide forcecontrols
hide invcontrols
setitemcolor comfortcontrolbutton forecolor 0.64 0.65 1 1
hide comfortcontrols
setitemcolor commoncontrolbutton forecolor 0.64 0.65 1 1
setitemcolor weaponscontrolbutton forecolor 1 1 1 1
setitemcolor forcecontrolbutton forecolor 0.64 0.65 1 1
setitemcolor inventorycontrolbutton forecolor 0.64 0.65 1 1
setitemcolor comfortcontrolbutton forecolor 0.64 0.65 1 1
}
}
@ -782,14 +788,16 @@
{
play sound/interface/button1
show setup_background
hide comfortcontrols
hide commoncontrols
hide weaponcontrols
show forcecontrols
hide invcontrols
setitemcolor comfortcontrolbutton forecolor 0.64 0.65 1 1
hide comfortcontrols
setitemcolor commoncontrolbutton forecolor 0.64 0.65 1 1
setitemcolor weaponscontrolbutton forecolor 0.64 0.65 1 1
setitemcolor forcecontrolbutton forecolor 1 1 1 1
setitemcolor inventorycontrolbutton forecolor 0.64 0.65 1 1
setitemcolor comfortcontrolbutton forecolor 0.64 0.65 1 1
}
}
@ -836,14 +844,72 @@
{
play sound/interface/button1
show setup_background
hide comfortcontrols
hide commoncontrols
hide weaponcontrols
hide forcecontrols
show invcontrols
setitemcolor comfortcontrolbutton forecolor 0.64 0.65 1 1
hide comfortcontrols
setitemcolor commoncontrolbutton forecolor 0.64 0.65 1 1
setitemcolor weaponscontrolbutton forecolor 0.64 0.65 1 1
setitemcolor forcecontrolbutton forecolor 0.64 0.65 1 1
setitemcolor inventorycontrolbutton forecolor 1 1 1 1
setitemcolor comfortcontrolbutton forecolor 0.64 0.65 1 1
}
}
// comfort button
itemDef
{
name comfortcontrolbutton_glow
group mods
style WINDOW_STYLE_SHADER
rect 120 293 170 30
background "gfx/menus/menu_blendbox2" // Frame around button
forecolor 1 1 1 1
visible 0
decoration
}
itemDef
{
name comfortcontrolbutton
group none
text @MENUS_VR_COMFORT_CONTROLS_ITEM
type ITEM_TYPE_BUTTON
style WINDOW_STYLE_EMPTY
rect 120 293 170 30
font 3
textscale 0.9
textalignx 170
textaligny 5
textalign ITEM_ALIGN_RIGHT
textstyle 3
forecolor 0.65 0.65 1 1
visible 1
descText @MENUS_VR_COMFORT_CONTROLS_DESC
mouseEnter
{
show comfortcontrolbutton_glow
}
mouseExit
{
hide comfortcontrolbutton_glow
}
action
{
play sound/interface/button1
show setup_background
hide commoncontrols
hide weaponcontrols
hide forcecontrols
hide invcontrols
show comfortcontrols
setitemcolor commoncontrolbutton forecolor 0.64 0.65 1 1
setitemcolor weaponscontrolbutton forecolor 0.64 0.65 1 1
setitemcolor forcecontrolbutton forecolor 0.64 0.65 1 1
setitemcolor inventorycontrolbutton forecolor 0.64 0.65 1 1
setitemcolor comfortcontrolbutton forecolor 1 1 1 1
}
}
@ -1041,17 +1107,17 @@
//----------------------------------------------------------------------------------------------
//
// COMFORT MENU
// COMMON MENU
//
//----------------------------------------------------------------------------------------------
itemDef
{
name none
group comfortcontrols
group commoncontrols
type ITEM_TYPE_SLIDER
text @MENUS_VR_MOVEMENT_SPEED_ITEM
cvarfloat "vr_movement_multiplier" 0 0.4 1.2
rect 305 171 300 20
rect 305 191 300 20
textalign ITEM_ALIGN_RIGHT
textalignx 151
textaligny -2
@ -1068,19 +1134,19 @@
mouseenter
{
show highlight1
show highlight2
}
mouseexit
{
hide highlight1
hide highlight2
}
}
itemDef
{
name none
group comfortcontrols
group commoncontrols
type ITEM_TYPE_MULTI
text @MENUS_VR_DIRECTION_MODE_ITEM
cvar "vr_walkdirection"
@ -1089,7 +1155,7 @@
@MENUS_VR_DIRECTION_MODE_CONTROLLER 0
@MENUS_VR_DIRECTION_MODE_HMD 1
}
rect 305 191 300 20
rect 305 211 300 20
textalign ITEM_ALIGN_RIGHT
textalignx 151
textaligny -2
@ -1106,12 +1172,12 @@
mouseenter
{
show highlight2
show highlight3
}
mouseexit
{
hide highlight2
hide highlight3
}
}
@ -1119,7 +1185,7 @@
itemDef
{
name none
group comfortcontrols
group commoncontrols
type ITEM_TYPE_MULTI
text @MENUS_VR_SMOOTH_TURN_ITEM
cvar "vr_turn_mode"
@ -1129,7 +1195,7 @@
@MENUS_VR_SMOOTH_TURN_3RD_PERSON 1
@MENUS0_YES 2
}
rect 305 211 300 20
rect 305 231 300 20
textalign ITEM_ALIGN_RIGHT
textalignx 151
textaligny -2
@ -1144,44 +1210,6 @@
play sound/interface/button1
}
mouseenter
{
show highlight3
}
mouseexit
{
hide highlight3
}
}
itemDef
{
name none
group comfortcontrols
type ITEM_TYPE_MULTI
text @MENUS_VR_TURN_ANGLE_ITEM
cvar "vr_turn_angle"
cvarFloatList
{
@MENUS_VR_TURN_ANGLE_30DEGREES 30
@MENUS_VR_TURN_ANGLE_45DEGREES 45
@MENUS_VR_TURN_ANGLE_90DEGREES 90
}
rect 305 231 300 20
textalign ITEM_ALIGN_RIGHT
textalignx 151
textaligny -2
font 2
textscale 0.8
forecolor 1 1 1 1
visible 0
// appearance_slot 4
descText @MENUS_VR_TURN_ANGLE_DESC
action
{
play sound/interface/button1
}
mouseenter
{
show highlight4
@ -1195,10 +1223,16 @@
itemDef
{
name none
group comfortcontrols
type ITEM_TYPE_YESNO
text @MENUS_VR_SWITCH_STICKS_ITEM
cvar "vr_switch_sticks"
group commoncontrols
type ITEM_TYPE_MULTI
text @MENUS_VR_TURN_ANGLE_ITEM
cvar "vr_turn_angle"
cvarFloatList
{
@MENUS_VR_TURN_ANGLE_30DEGREES 30
@MENUS_VR_TURN_ANGLE_45DEGREES 45
@MENUS_VR_TURN_ANGLE_90DEGREES 90
}
rect 305 251 300 20
textalign ITEM_ALIGN_RIGHT
textalignx 151
@ -1207,8 +1241,8 @@
textscale 0.8
forecolor 1 1 1 1
visible 0
// appearance_slot 5
descText @MENUS_VR_SWITCH_STICKS_DESC
// appearance_slot 4
descText @MENUS_VR_TURN_ANGLE_DESC
action
{
play sound/interface/button1
@ -1227,15 +1261,10 @@
itemDef
{
name none
group comfortcontrols
type ITEM_TYPE_MULTI
text @MENUS_VR_LEFT_HANDED_ITEM
cvar "vr_control_scheme"
cvarFloatList
{
@MENUS0_NO 0
@MENUS0_YES 10
}
group commoncontrols
type ITEM_TYPE_YESNO
text @MENUS_VR_SWITCH_STICKS_ITEM
cvar "vr_switch_sticks"
rect 305 271 300 20
textalign ITEM_ALIGN_RIGHT
textalignx 151
@ -1245,7 +1274,7 @@
forecolor 1 1 1 1
visible 0
// appearance_slot 5
descText @MENUS_VR_LEFT_HANDED_DESC
descText @MENUS_VR_SWITCH_STICKS_DESC
action
{
play sound/interface/button1
@ -1264,10 +1293,15 @@
itemDef
{
name none
group comfortcontrols
type ITEM_TYPE_YESNO
text @MENUS_VR_IMMERSIVE_CINEMATICS_ITEM
cvar "vr_immersive_cinematics"
group commoncontrols
type ITEM_TYPE_MULTI
text @MENUS_VR_LEFT_HANDED_ITEM
cvar "vr_control_scheme"
cvarFloatList
{
@MENUS0_NO 0
@MENUS0_YES 10
}
rect 305 291 300 20
textalign ITEM_ALIGN_RIGHT
textalignx 151
@ -1276,8 +1310,8 @@
textscale 0.8
forecolor 1 1 1 1
visible 0
// appearance_slot 1
descText @MENUS_VR_IMMERSIVE_CINEMATICS_DESC
// appearance_slot 5
descText @MENUS_VR_LEFT_HANDED_DESC
action
{
play sound/interface/button1
@ -1287,7 +1321,6 @@
{
show highlight7
}
mouseexit
{
hide highlight7
@ -1297,16 +1330,10 @@
itemDef
{
name none
group comfortcontrols
type ITEM_TYPE_MULTI
text @MENUS_VR_SCREEN_DISTANCE_ITEM
cvar "vr_screen_dist"
cvarFloatList
{
@MENUS_VR_SCREEN_DISTANCE_NEAR 1.5
@MENUS_VR_SCREEN_DISTANCE_MEDIUM 2.5
@MENUS_VR_SCREEN_DISTANCE_FAR 3.5
}
group commoncontrols
type ITEM_TYPE_YESNO
text @MENUS_VR_CROUCH_TOGGLE_ITEM
cvar "vr_crouch_toggle"
rect 305 311 300 20
textalign ITEM_ALIGN_RIGHT
textalignx 151
@ -1316,7 +1343,7 @@
forecolor 1 1 1 1
visible 0
// appearance_slot 1
descText @MENUS_VR_SCREEN_DISTANCE_DESC
descText @MENUS_VR_CROUCH_TOGGLE_DESC
action
{
play sound/interface/button1
@ -1336,73 +1363,7 @@
itemDef
{
name none
group comfortcontrols
type ITEM_TYPE_SLIDER
text @MENUS_VR_HEIGHT_ADJUST_ITEM
cvarfloat "cg_heightAdjust" 0 0 1
rect 305 331 300 20
textalign ITEM_ALIGN_RIGHT
textalignx 151
textaligny -2
font 2
textscale 0.8
forecolor 1 1 1 1
visible 0
// appearance_slot 1
descText @MENUS_VR_HEIGHT_ADJUST_DESC
action
{
play sound/interface/button1
}
mouseenter
{
show highlight9
}
mouseexit
{
hide highlight9
}
}
itemDef
{
name none
group comfortcontrols
type ITEM_TYPE_YESNO
text @MENUS_VR_CROUCH_TOGGLE_ITEM
cvar "vr_crouch_toggle"
rect 305 351 300 20
textalign ITEM_ALIGN_RIGHT
textalignx 151
textaligny -2
font 2
textscale 0.8
forecolor 1 1 1 1
visible 0
// appearance_slot 1
descText @MENUS_VR_CROUCH_TOGGLE_DESC
action
{
play sound/interface/button1
}
mouseenter
{
show highlight10
}
mouseexit
{
hide highlight10
}
}
itemDef
{
name none
group comfortcontrols
group commoncontrols
type ITEM_TYPE_MULTI
text @MENUS_VR_CROUCH_IRL_ITEM
cvar "vr_irl_crouch_enabled"
@ -1412,7 +1373,7 @@
@MENUS_VR_CROUCH_IRL_1ST_PERSON 1
@MENUS0_YES 2
}
rect 305 371 300 20
rect 305 331 300 20
textalign ITEM_ALIGN_RIGHT
textalignx 151
textaligny -2
@ -1429,11 +1390,11 @@
mouseenter
{
show highlight11
show highlight9
}
mouseexit
{
hide highlight11
hide highlight9
}
}
@ -1766,5 +1727,184 @@
hide highlight2
}
}
//----------------------------------------------------------------------------------------------
//
// COMFORT MENU
//
//----------------------------------------------------------------------------------------------
itemDef
{
name none
group comfortcontrols
type ITEM_TYPE_YESNO
text @MENUS_VR_IMMERSIVE_CINEMATICS_ITEM
cvar "vr_immersive_cinematics"
rect 305 191 300 20
textalign ITEM_ALIGN_RIGHT
textalignx 151
textaligny -2
font 2
textscale 0.8
forecolor 1 1 1 1
visible 0
// appearance_slot 1
descText @MENUS_VR_IMMERSIVE_CINEMATICS_DESC
action
{
play sound/interface/button1
}
mouseenter
{
show highlight2
}
mouseexit
{
hide highlight2
}
}
itemDef
{
name none
group comfortcontrols
type ITEM_TYPE_MULTI
text @MENUS_VR_SCREEN_DISTANCE_ITEM
cvar "vr_screen_dist"
cvarFloatList
{
@MENUS_VR_SCREEN_DISTANCE_NEAR 1.5
@MENUS_VR_SCREEN_DISTANCE_MEDIUM 2.5
@MENUS_VR_SCREEN_DISTANCE_FAR 3.5
}
rect 305 211 300 20
textalign ITEM_ALIGN_RIGHT
textalignx 151
textaligny -2
font 2
textscale 0.8
forecolor 1 1 1 1
visible 0
// appearance_slot 1
descText @MENUS_VR_SCREEN_DISTANCE_DESC
action
{
play sound/interface/button1
}
mouseenter
{
show highlight3
}
mouseexit
{
hide highlight3
}
}
itemDef
{
name none
group comfortcontrols
type ITEM_TYPE_SLIDER
text @MENUS_VR_HEIGHT_ADJUST_ITEM
cvarfloat "cg_heightAdjust" 0 0 1
rect 305 231 300 20
textalign ITEM_ALIGN_RIGHT
textalignx 151
textaligny -2
font 2
textscale 0.8
forecolor 1 1 1 1
visible 0
// appearance_slot 1
descText @MENUS_VR_HEIGHT_ADJUST_DESC
action
{
play sound/interface/button1
}
mouseenter
{
show highlight4
}
mouseexit
{
hide highlight4
}
}
itemDef
{
name none
group comfortcontrols
type ITEM_TYPE_SLIDER
text @MENUS_VR_HAPTIC_INTENSITY_ITEM
cvarfloat "vr_haptic_intensity" 0 0 1
rect 305 251 300 20
textalign ITEM_ALIGN_RIGHT
textalignx 151
textaligny -2
font 2
textscale 0.8
forecolor 1 1 1 1
visible 0
// appearance_slot 1
descText @MENUS_VR_HAPTIC_INTENSITY_DESC
action
{
play sound/interface/button1
}
mouseenter
{
show highlight5
}
mouseexit
{
hide highlight5
}
}
itemDef
{
name none
group comfortcontrols
type ITEM_TYPE_SLIDER
text @MENUS_VR_COMFORT_VIGNETTE_ITEM
cvarfloat "vr_comfort_vignette" 0 0 1
rect 305 271 300 20
textalign ITEM_ALIGN_RIGHT
textalignx 151
textaligny -2
font 2
textscale 0.8
forecolor 1 1 1 1
visible 0
// appearance_slot 1
descText @MENUS_VR_COMFORT_VIGNETTE_DESC
action
{
play sound/interface/button1
}
mouseenter
{
show highlight6
}
mouseexit
{
hide highlight6
}
}
}
}

View file

@ -20,14 +20,16 @@
onOpen
{
show setup_background
show comfortcontrols
show commoncontrols
hide weaponcontrols
hide forcecontrols
hide invcontrols
setitemcolor comfortcontrolbutton forecolor 1 1 1 1
hide comfortcontrols
setitemcolor commoncontrolbutton forecolor 1 1 1 1
setitemcolor weaponscontrolbutton forecolor 0.64 0.65 1 1
setitemcolor forcecontrolbutton forecolor 0.64 0.65 1 1
setitemcolor inventorycontrolbutton forecolor 0.64 0.65 1 1
setitemcolor comfortcontrolbutton forecolor 0.64 0.65 1 1
}
onClose
@ -204,7 +206,6 @@
//
//----------------------------------------------------------------------------------------------
// Big button "SAVE"
itemDef
{
@ -631,10 +632,10 @@
showCvar { 1 }
}
// Comfort button
// Common button
itemDef
{
name comfortbutton_glow
name commonbutton_glow
group mods
style WINDOW_STYLE_SHADER
rect 120 173 170 30
@ -646,9 +647,9 @@
itemDef
{
name comfortcontrolbutton
name commoncontrolbutton
group none
text @MENUS_VR_COMFORT_CONTROLS_ITEM
text @MENUS_VR_COMMON_CONTROLS_ITEM
type ITEM_TYPE_BUTTON
style WINDOW_STYLE_EMPTY
rect 120 173 170 30
@ -660,28 +661,30 @@
textstyle 3
forecolor 0.65 0.65 1 1
visible 1
descText @MENUS_VR_COMFORT_CONTROLS_DESC
descText @MENUS_VR_COMMON_CONTROLS_DESC
mouseEnter
{
show comfortbutton_glow
show commonbutton_glow
}
mouseExit
{
hide comfortbutton_glow
hide commonbutton_glow
}
action
{
play sound/interface/button1
show setup_background
show comfortcontrols
show commoncontrols
hide weaponcontrols
hide forcecontrols
hide invcontrols
setitemcolor comfortcontrolbutton forecolor 1 1 1 1
hide comfortcontrols
setitemcolor commoncontrolbutton forecolor 1 1 1 1
setitemcolor weaponscontrolbutton forecolor 0.64 0.65 1 1
setitemcolor forcecontrolbutton forecolor 0.64 0.65 1 1
setitemcolor inventorycontrolbutton forecolor 0.64 0.65 1 1
setitemcolor comfortcontrolbutton forecolor 0.64 0.65 1 1
}
}
@ -728,14 +731,16 @@
{
play sound/interface/button1
show setup_background
hide comfortcontrols
hide commoncontrols
show weaponcontrols
hide forcecontrols
hide invcontrols
setitemcolor comfortcontrolbutton forecolor 0.64 0.65 1 1
hide comfortcontrols
setitemcolor commoncontrolbutton forecolor 0.64 0.65 1 1
setitemcolor weaponscontrolbutton forecolor 1 1 1 1
setitemcolor forcecontrolbutton forecolor 0.64 0.65 1 1
setitemcolor inventorycontrolbutton forecolor 0.64 0.65 1 1
setitemcolor comfortcontrolbutton forecolor 0.64 0.65 1 1
}
}
@ -782,14 +787,16 @@
{
play sound/interface/button1
show setup_background
hide comfortcontrols
hide commoncontrols
hide weaponcontrols
show forcecontrols
hide invcontrols
setitemcolor comfortcontrolbutton forecolor 0.64 0.65 1 1
hide comfortcontrols
setitemcolor commoncontrolbutton forecolor 0.64 0.65 1 1
setitemcolor weaponscontrolbutton forecolor 0.64 0.65 1 1
setitemcolor forcecontrolbutton forecolor 1 1 1 1
setitemcolor inventorycontrolbutton forecolor 0.64 0.65 1 1
setitemcolor comfortcontrolbutton forecolor 0.64 0.65 1 1
}
}
@ -836,14 +843,72 @@
{
play sound/interface/button1
show setup_background
hide comfortcontrols
hide commoncontrols
hide weaponcontrols
hide forcecontrols
show invcontrols
setitemcolor comfortcontrolbutton forecolor 0.64 0.65 1 1
hide comfortcontrols
setitemcolor commoncontrolbutton forecolor 0.64 0.65 1 1
setitemcolor weaponscontrolbutton forecolor 0.64 0.65 1 1
setitemcolor forcecontrolbutton forecolor 0.64 0.65 1 1
setitemcolor inventorycontrolbutton forecolor 1 1 1 1
setitemcolor comfortcontrolbutton forecolor 0.64 0.65 1 1
}
}
// comfort button
itemDef
{
name comfortcontrolbutton_glow
group mods
style WINDOW_STYLE_SHADER
rect 120 293 170 30
background "gfx/menus/menu_blendbox2" // Frame around button
forecolor 1 1 1 1
visible 0
decoration
}
itemDef
{
name comfortcontrolbutton
group none
text @MENUS_VR_COMFORT_CONTROLS_ITEM
type ITEM_TYPE_BUTTON
style WINDOW_STYLE_EMPTY
rect 120 293 170 30
font 3
textscale 0.9
textalignx 170
textaligny 5
textalign ITEM_ALIGN_RIGHT
textstyle 3
forecolor 0.65 0.65 1 1
visible 1
descText @MENUS_VR_COMFORT_CONTROLS_DESC
mouseEnter
{
show comfortcontrolbutton_glow
}
mouseExit
{
hide comfortcontrolbutton_glow
}
action
{
play sound/interface/button1
show setup_background
hide commoncontrols
hide weaponcontrols
hide forcecontrols
hide invcontrols
show comfortcontrols
setitemcolor commoncontrolbutton forecolor 0.64 0.65 1 1
setitemcolor weaponscontrolbutton forecolor 0.64 0.65 1 1
setitemcolor forcecontrolbutton forecolor 0.64 0.65 1 1
setitemcolor inventorycontrolbutton forecolor 0.64 0.65 1 1
setitemcolor comfortcontrolbutton forecolor 1 1 1 1
}
}
@ -1041,17 +1106,17 @@
//----------------------------------------------------------------------------------------------
//
// COMFORT MENU
// COMMON MENU
//
//----------------------------------------------------------------------------------------------
itemDef
{
name none
group comfortcontrols
group commoncontrols
type ITEM_TYPE_SLIDER
text @MENUS_VR_MOVEMENT_SPEED_ITEM
cvarfloat "vr_movement_multiplier" 0 0.4 1.2
rect 305 171 300 20
rect 305 191 300 20
textalign ITEM_ALIGN_RIGHT
textalignx 151
textaligny -2
@ -1068,19 +1133,19 @@
mouseenter
{
show highlight1
show highlight2
}
mouseexit
{
hide highlight1
hide highlight2
}
}
itemDef
{
name none
group comfortcontrols
group commoncontrols
type ITEM_TYPE_MULTI
text @MENUS_VR_DIRECTION_MODE_ITEM
cvar "vr_walkdirection"
@ -1089,7 +1154,7 @@
@MENUS_VR_DIRECTION_MODE_CONTROLLER 0
@MENUS_VR_DIRECTION_MODE_HMD 1
}
rect 305 191 300 20
rect 305 211 300 20
textalign ITEM_ALIGN_RIGHT
textalignx 151
textaligny -2
@ -1106,12 +1171,12 @@
mouseenter
{
show highlight2
show highlight3
}
mouseexit
{
hide highlight2
hide highlight3
}
}
@ -1119,7 +1184,7 @@
itemDef
{
name none
group comfortcontrols
group commoncontrols
type ITEM_TYPE_MULTI
text @MENUS_VR_SMOOTH_TURN_ITEM
cvar "vr_turn_mode"
@ -1129,7 +1194,7 @@
@MENUS_VR_SMOOTH_TURN_3RD_PERSON 1
@MENUS0_YES 2
}
rect 305 211 300 20
rect 305 231 300 20
textalign ITEM_ALIGN_RIGHT
textalignx 151
textaligny -2
@ -1144,44 +1209,6 @@
play sound/interface/button1
}
mouseenter
{
show highlight3
}
mouseexit
{
hide highlight3
}
}
itemDef
{
name none
group comfortcontrols
type ITEM_TYPE_MULTI
text @MENUS_VR_TURN_ANGLE_ITEM
cvar "vr_turn_angle"
cvarFloatList
{
@MENUS_VR_TURN_ANGLE_30DEGREES 30
@MENUS_VR_TURN_ANGLE_45DEGREES 45
@MENUS_VR_TURN_ANGLE_90DEGREES 90
}
rect 305 231 300 20
textalign ITEM_ALIGN_RIGHT
textalignx 151
textaligny -2
font 2
textscale 0.8
forecolor 1 1 1 1
visible 0
// appearance_slot 4
descText @MENUS_VR_TURN_ANGLE_DESC
action
{
play sound/interface/button1
}
mouseenter
{
show highlight4
@ -1195,10 +1222,16 @@
itemDef
{
name none
group comfortcontrols
type ITEM_TYPE_YESNO
text @MENUS_VR_SWITCH_STICKS_ITEM
cvar "vr_switch_sticks"
group commoncontrols
type ITEM_TYPE_MULTI
text @MENUS_VR_TURN_ANGLE_ITEM
cvar "vr_turn_angle"
cvarFloatList
{
@MENUS_VR_TURN_ANGLE_30DEGREES 30
@MENUS_VR_TURN_ANGLE_45DEGREES 45
@MENUS_VR_TURN_ANGLE_90DEGREES 90
}
rect 305 251 300 20
textalign ITEM_ALIGN_RIGHT
textalignx 151
@ -1207,8 +1240,8 @@
textscale 0.8
forecolor 1 1 1 1
visible 0
// appearance_slot 5
descText @MENUS_VR_SWITCH_STICKS_DESC
// appearance_slot 4
descText @MENUS_VR_TURN_ANGLE_DESC
action
{
play sound/interface/button1
@ -1227,15 +1260,10 @@
itemDef
{
name none
group comfortcontrols
type ITEM_TYPE_MULTI
text @MENUS_VR_LEFT_HANDED_ITEM
cvar "vr_control_scheme"
cvarFloatList
{
@MENUS0_NO 0
@MENUS0_YES 10
}
group commoncontrols
type ITEM_TYPE_YESNO
text @MENUS_VR_SWITCH_STICKS_ITEM
cvar "vr_switch_sticks"
rect 305 271 300 20
textalign ITEM_ALIGN_RIGHT
textalignx 151
@ -1245,7 +1273,7 @@
forecolor 1 1 1 1
visible 0
// appearance_slot 5
descText @MENUS_VR_LEFT_HANDED_DESC
descText @MENUS_VR_SWITCH_STICKS_DESC
action
{
play sound/interface/button1
@ -1264,10 +1292,15 @@
itemDef
{
name none
group comfortcontrols
type ITEM_TYPE_YESNO
text @MENUS_VR_IMMERSIVE_CINEMATICS_ITEM
cvar "vr_immersive_cinematics"
group commoncontrols
type ITEM_TYPE_MULTI
text @MENUS_VR_LEFT_HANDED_ITEM
cvar "vr_control_scheme"
cvarFloatList
{
@MENUS0_NO 0
@MENUS0_YES 10
}
rect 305 291 300 20
textalign ITEM_ALIGN_RIGHT
textalignx 151
@ -1276,8 +1309,8 @@
textscale 0.8
forecolor 1 1 1 1
visible 0
// appearance_slot 1
descText @MENUS_VR_IMMERSIVE_CINEMATICS_DESC
// appearance_slot 5
descText @MENUS_VR_LEFT_HANDED_DESC
action
{
play sound/interface/button1
@ -1287,7 +1320,6 @@
{
show highlight7
}
mouseexit
{
hide highlight7
@ -1297,16 +1329,10 @@
itemDef
{
name none
group comfortcontrols
type ITEM_TYPE_MULTI
text @MENUS_VR_SCREEN_DISTANCE_ITEM
cvar "vr_screen_dist"
cvarFloatList
{
@MENUS_VR_SCREEN_DISTANCE_NEAR 1.5
@MENUS_VR_SCREEN_DISTANCE_MEDIUM 2.5
@MENUS_VR_SCREEN_DISTANCE_FAR 3.5
}
group commoncontrols
type ITEM_TYPE_YESNO
text @MENUS_VR_CROUCH_TOGGLE_ITEM
cvar "vr_crouch_toggle"
rect 305 311 300 20
textalign ITEM_ALIGN_RIGHT
textalignx 151
@ -1316,7 +1342,7 @@
forecolor 1 1 1 1
visible 0
// appearance_slot 1
descText @MENUS_VR_SCREEN_DISTANCE_DESC
descText @MENUS_VR_CROUCH_TOGGLE_DESC
action
{
play sound/interface/button1
@ -1336,73 +1362,7 @@
itemDef
{
name none
group comfortcontrols
type ITEM_TYPE_SLIDER
text @MENUS_VR_HEIGHT_ADJUST_ITEM
cvarfloat "cg_heightAdjust" 0 0 1
rect 305 331 300 20
textalign ITEM_ALIGN_RIGHT
textalignx 151
textaligny -2
font 2
textscale 0.8
forecolor 1 1 1 1
visible 0
// appearance_slot 1
descText @MENUS_VR_HEIGHT_ADJUST_DESC
action
{
play sound/interface/button1
}
mouseenter
{
show highlight9
}
mouseexit
{
hide highlight9
}
}
itemDef
{
name none
group comfortcontrols
type ITEM_TYPE_YESNO
text @MENUS_VR_CROUCH_TOGGLE_ITEM
cvar "vr_crouch_toggle"
rect 305 351 300 20
textalign ITEM_ALIGN_RIGHT
textalignx 151
textaligny -2
font 2
textscale 0.8
forecolor 1 1 1 1
visible 0
// appearance_slot 1
descText @MENUS_VR_CROUCH_TOGGLE_DESC
action
{
play sound/interface/button1
}
mouseenter
{
show highlight10
}
mouseexit
{
hide highlight10
}
}
itemDef
{
name none
group comfortcontrols
group commoncontrols
type ITEM_TYPE_MULTI
text @MENUS_VR_CROUCH_IRL_ITEM
cvar "vr_irl_crouch_enabled"
@ -1412,7 +1372,7 @@
@MENUS_VR_CROUCH_IRL_1ST_PERSON 1
@MENUS0_YES 2
}
rect 305 371 300 20
rect 305 331 300 20
textalign ITEM_ALIGN_RIGHT
textalignx 151
textaligny -2
@ -1429,11 +1389,11 @@
mouseenter
{
show highlight11
show highlight9
}
mouseexit
{
hide highlight11
hide highlight9
}
}
@ -1766,5 +1726,184 @@
hide highlight2
}
}
//----------------------------------------------------------------------------------------------
//
// COMFORT MENU
//
//----------------------------------------------------------------------------------------------
itemDef
{
name none
group comfortcontrols
type ITEM_TYPE_YESNO
text @MENUS_VR_IMMERSIVE_CINEMATICS_ITEM
cvar "vr_immersive_cinematics"
rect 305 191 300 20
textalign ITEM_ALIGN_RIGHT
textalignx 151
textaligny -2
font 2
textscale 0.8
forecolor 1 1 1 1
visible 0
// appearance_slot 1
descText @MENUS_VR_IMMERSIVE_CINEMATICS_DESC
action
{
play sound/interface/button1
}
mouseenter
{
show highlight2
}
mouseexit
{
hide highlight2
}
}
itemDef
{
name none
group comfortcontrols
type ITEM_TYPE_MULTI
text @MENUS_VR_SCREEN_DISTANCE_ITEM
cvar "vr_screen_dist"
cvarFloatList
{
@MENUS_VR_SCREEN_DISTANCE_NEAR 1.5
@MENUS_VR_SCREEN_DISTANCE_MEDIUM 2.5
@MENUS_VR_SCREEN_DISTANCE_FAR 3.5
}
rect 305 211 300 20
textalign ITEM_ALIGN_RIGHT
textalignx 151
textaligny -2
font 2
textscale 0.8
forecolor 1 1 1 1
visible 0
// appearance_slot 1
descText @MENUS_VR_SCREEN_DISTANCE_DESC
action
{
play sound/interface/button1
}
mouseenter
{
show highlight3
}
mouseexit
{
hide highlight3
}
}
itemDef
{
name none
group comfortcontrols
type ITEM_TYPE_SLIDER
text @MENUS_VR_HEIGHT_ADJUST_ITEM
cvarfloat "cg_heightAdjust" 0 0 1
rect 305 231 300 20
textalign ITEM_ALIGN_RIGHT
textalignx 151
textaligny -2
font 2
textscale 0.8
forecolor 1 1 1 1
visible 0
// appearance_slot 1
descText @MENUS_VR_HEIGHT_ADJUST_DESC
action
{
play sound/interface/button1
}
mouseenter
{
show highlight4
}
mouseexit
{
hide highlight4
}
}
itemDef
{
name none
group comfortcontrols
type ITEM_TYPE_SLIDER
text @MENUS_VR_HAPTIC_INTENSITY_ITEM
cvarfloat "vr_haptic_intensity" 0 0 1
rect 305 251 300 20
textalign ITEM_ALIGN_RIGHT
textalignx 151
textaligny -2
font 2
textscale 0.8
forecolor 1 1 1 1
visible 0
// appearance_slot 1
descText @MENUS_VR_HAPTIC_INTENSITY_DESC
action
{
play sound/interface/button1
}
mouseenter
{
show highlight5
}
mouseexit
{
hide highlight5
}
}
itemDef
{
name none
group comfortcontrols
type ITEM_TYPE_SLIDER
text @MENUS_VR_COMFORT_VIGNETTE_ITEM
cvarfloat "vr_comfort_vignette" 0 0 1
rect 305 271 300 20
textalign ITEM_ALIGN_RIGHT
textalignx 151
textaligny -2
font 2
textscale 0.8
forecolor 1 1 1 1
visible 0
// appearance_slot 1
descText @MENUS_VR_COMFORT_VIGNETTE_DESC
action
{
play sound/interface/button1
}
mouseenter
{
show highlight6
}
mouseexit
{
hide highlight6
}
}
}
}