Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 30 additions & 0 deletions assets/pakQ3VR/ui/controls3.menu
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,36 @@ itemDef {
action { uiScript update "vr_controlSchema" }
}

itemDef {
name controls3
group grpControls3
type ITEM_TYPE_YESNO
text "Weapon Adjustment:"
cvar "vr_weaponAdjust"
rect 99 350 256 20
textalign ITEM_ALIGN_RIGHT
textalignx 128
textaligny 20
textscale .333
forecolor 1 1 1 1
visible 1
mouseEnter { show message_weaponadjust }
mouseExit { hide message_weaponadjust }
}

itemDef {
name message_weaponadjust
text "Hold both grips for 1s to enter weapon adjustment mode"
rect 99 375 256 20
textalign ITEM_ALIGN_CENTER
textalignx 128
textaligny 14
textscale .25
forecolor 1 .75 0 1
visible 0
decoration
}

itemDef {
name fadebox
style WINDOW_STYLE_FILLED
Expand Down
62 changes: 46 additions & 16 deletions assets/pakQ3VR/ui/ingame_controls.menu
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,15 @@ menuDef {
visible 0
fullscreen 0
outOfBoundsClick // this closes the window if it gets a click out of the rectangle
rect 125 30 370 375
rect 125 30 370 407
focusColor 1 .75 0 1
style 1
border 1
disableColor .5 .5 .5 0

itemDef {
name window
rect 10 15 360 360
rect 10 15 360 392
style 1
backcolor 0 .1 0 1
visible 1
Expand Down Expand Up @@ -69,15 +69,15 @@ itemDef {
}
itemDef {
name window
rect 0 314 64 64
rect 0 346 64 64
style 3
background "ui/assets/ingameleftcornerb.tga"
visible 1
decoration
}
itemDef {
name window
rect 317 314 64 64
rect 317 346 64 64
style 3
background "ui/assets/ingamerightcornerb.tga"
visible 1
Expand Down Expand Up @@ -105,7 +105,7 @@ itemDef {

itemDef {
name window
rect 0 232 16 84
rect 0 232 16 116
style 3
background "ui/assets/ingameleft.tga"
visible 1
Expand All @@ -132,7 +132,7 @@ itemDef {
}
itemDef {
name window
rect 365 232 16 84
rect 365 232 16 116
style 3
background "ui/assets/ingameright.tga"
visible 1
Expand All @@ -142,15 +142,15 @@ itemDef {

itemDef {
name window
rect 64 370 144 8
rect 64 402 144 8
style 3
background "ui/assets/ingamebottom.tga"
visible 1
decoration
}
itemDef {
name window
rect 208 370 144 8
rect 208 402 144 8
style 3
background "ui/assets/ingamebottom.tga"
visible 1
Expand Down Expand Up @@ -325,18 +325,48 @@ itemDef {
textalign ITEM_ALIGN_RIGHT
textalignx 143
textaligny 17
textscale .25
textscale .25
forecolor 1 1 1 1
visible 1
action { uiScript update "vr_controlSchema" }
}

itemDef {
name controls
group grpControls
type ITEM_TYPE_YESNO
text "Weapon Adjustment:"
cvar "vr_weaponAdjust"
rect 30 218 200 20
textalign ITEM_ALIGN_RIGHT
textalignx 143
textaligny 17
textscale .25
forecolor 1 1 1 1
visible 1
mouseEnter { show message_weaponadjust }
mouseExit { hide message_weaponadjust }
}

itemDef {
name message_weaponadjust
text "Hold both grips for 1s to adjust"
rect 10 235 360 14
textalign ITEM_ALIGN_CENTER
textalignx 180
textaligny 12
textscale .2
forecolor 1 .75 0 1
visible 0
decoration
}

itemDef {
name controls
group grpControls
style 1
text "Comfort Options"
rect 100 231 100 20
rect 100 247 100 20
textalign ITEM_ALIGN_RIGHT
textalignx 143
textaligny 17
Expand All @@ -351,7 +381,7 @@ itemDef {
type ITEM_TYPE_SLIDER
text "Comfort Vignette:"
cvarfloat "vr_comfortVignette" 0.2 0 1
rect 30 251 200 20
rect 30 267 200 20
textalign ITEM_ALIGN_RIGHT
textalignx 143
textaligny 17
Expand All @@ -365,7 +395,7 @@ itemDef {
type ITEM_TYPE_SLIDER
text "Height Adjust:"
cvarfloat "vr_heightAdjust" 0.2 0 1
rect 30 271 200 20
rect 30 287 200 20
textalign ITEM_ALIGN_RIGHT
textalignx 143
textaligny 17
Expand All @@ -379,7 +409,7 @@ itemDef {
type ITEM_TYPE_YESNO
text "Roll When Hit:"
cvar "vr_rollWhenHit"
rect 30 291 200 20
rect 30 307 200 20
textalign ITEM_ALIGN_RIGHT
textalignx 143
textaligny 17
Expand All @@ -393,7 +423,7 @@ itemDef {
type ITEM_TYPE_SLIDER
text "Haptic Intensity:"
cvarfloat "vr_hapticIntensity" 0.2 0 1
rect 30 311 200 20
rect 30 327 200 20
textalign ITEM_ALIGN_RIGHT
textalignx 143
textaligny 17
Expand All @@ -407,7 +437,7 @@ itemDef {
type ITEM_TYPE_SLIDER
text "HUD Depth:"
cvarfloat "vr_hudDepth" 1 0 5
rect 30 331 200 20
rect 30 347 200 20
textalign ITEM_ALIGN_RIGHT
textalignx 143
textaligny 17
Expand All @@ -421,7 +451,7 @@ itemDef {
type ITEM_TYPE_SLIDER
text "HUD Vertical Position:"
cvarfloat "vr_hudYOffset" 20 -200 200
rect 30 351 200 20
rect 30 367 200 20
textalign ITEM_ALIGN_RIGHT
textalignx 143
textaligny 17
Expand Down
3 changes: 3 additions & 0 deletions code/cgame/cg_consolecmds.c
Original file line number Diff line number Diff line change
Expand Up @@ -478,6 +478,9 @@ static consoleCommand_t commands[] = {
{ "tell_target", CG_TellTarget_f },
{ "tell_attacker", CG_TellAttacker_f },
{ "weapon_select", CG_WeaponSelectorSelect_f },
{ "weapon_adjust", CG_WeaponAdjust_f },
{ "weapon_adjust_reset", CG_WeaponAdjustReset_f },
{ "weapon_adjust_reset_all", CG_WeaponAdjustResetAll_f },
#ifdef MISSIONPACK
{ "vtell_target", CG_VoiceTellTarget_f },
{ "vtell_attacker", CG_VoiceTellAttacker_f },
Expand Down
3 changes: 3 additions & 0 deletions code/cgame/cg_draw.c
Original file line number Diff line number Diff line change
Expand Up @@ -3136,6 +3136,9 @@ static void CG_DrawScreen2D(void)
CG_DrawWeapReticle();
}
}

// Weapon adjustment overlay (drawn regardless of team/health since we auto-exit on those)
CG_WeaponAdjustDraw();
}


Expand Down
10 changes: 10 additions & 0 deletions code/cgame/cg_local.h
Original file line number Diff line number Diff line change
Expand Up @@ -1343,6 +1343,7 @@ void CG_RemoveHUDFlags(int flags);
void CG_AdjustFrom640( float *x, float *y, float *w, float *h );
void CG_FillRect( float x, float y, float width, float height, const float *color );
void CG_DrawPic( float x, float y, float width, float height, qhandle_t hShader );
void CG_DrawChar( int x, int y, int width, int height, int ch );

#define USE_NEW_FONT_RENDERER

Expand Down Expand Up @@ -1505,6 +1506,15 @@ void CG_LaserSight( vec3_t start, vec3_t end, byte colour[4], float width );

void CG_OutOfAmmoChange( void ); // should this be in pmove?

// weapon adjustment mode
void CG_WeaponAdjust_f( void );
void CG_WeaponAdjust_Enter( void );
void CG_WeaponAdjust_Exit( void );
void CG_WeaponAdjustReset_f( void );
void CG_WeaponAdjustResetAll_f( void );
void CG_WeaponAdjustFrame( void );
void CG_WeaponAdjustDraw( void );

//
// cg_marks.c
//
Expand Down
3 changes: 3 additions & 0 deletions code/cgame/cg_view.c
Original file line number Diff line number Diff line change
Expand Up @@ -1458,6 +1458,9 @@ void CG_DrawActiveFrame( int serverTime, stereoFrame_t stereoView, qboolean demo
CG_AddParticles ();
CG_AddLocalEntities();
}
// Process weapon adjustment mode (reads thumbstick, updates cvars)
CG_WeaponAdjustFrame();

CG_AddViewWeapon( &cg.predictedPlayerState );

// add buffered sounds
Expand Down
Loading