From cc95db37f8cf93cfc24c2b644001e9c158422492 Mon Sep 17 00:00:00 2001 From: Simon Date: Fri, 24 Jul 2020 00:16:18 +0100 Subject: [PATCH] VR Menu in progress --- .../Android/jni/rtcw/src/cgame/cg_local.h | 1 - Projects/Android/jni/rtcw/src/cgame/cg_main.c | 2 - .../Android/z_rtcwquest_menu/ui/controls.menu | 284 +++++++++++++++++ .../Android/z_rtcwquest_menu/ui/options.menu | 297 ++++++++++++++++++ 4 files changed, 581 insertions(+), 3 deletions(-) create mode 100644 Projects/Android/z_rtcwquest_menu/ui/controls.menu create mode 100644 Projects/Android/z_rtcwquest_menu/ui/options.menu diff --git a/Projects/Android/jni/rtcw/src/cgame/cg_local.h b/Projects/Android/jni/rtcw/src/cgame/cg_local.h index bf4ee7e..2c127f3 100644 --- a/Projects/Android/jni/rtcw/src/cgame/cg_local.h +++ b/Projects/Android/jni/rtcw/src/cgame/cg_local.h @@ -1709,7 +1709,6 @@ extern vmCvar_t cg_thirdPersonAngle; extern vmCvar_t cg_thirdPerson; extern vmCvar_t cg_stereoSeparation; extern vmCvar_t cg_worldScale; -extern vmCvar_t cg_weaponScale; extern vmCvar_t cg_heightAdjust; extern vmCvar_t cg_lagometer; extern vmCvar_t cg_drawAttacker; diff --git a/Projects/Android/jni/rtcw/src/cgame/cg_main.c b/Projects/Android/jni/rtcw/src/cgame/cg_main.c index 9167638..cd336de 100644 --- a/Projects/Android/jni/rtcw/src/cgame/cg_main.c +++ b/Projects/Android/jni/rtcw/src/cgame/cg_main.c @@ -191,7 +191,6 @@ vmCvar_t cg_thirdPersonRange; vmCvar_t cg_thirdPersonAngle; vmCvar_t cg_stereoSeparation; vmCvar_t cg_worldScale; -vmCvar_t cg_weaponScale; vmCvar_t cg_heightAdjust; vmCvar_t cg_lagometer; vmCvar_t cg_drawAttacker; @@ -333,7 +332,6 @@ cvarTable_t cvarTable[] = { { &cg_letterbox, "cg_letterbox", "0", CVAR_TEMP }, //----(SA) added { &cg_stereoSeparation, "cg_stereoSeparation", "0.065", CVAR_ARCHIVE }, { &cg_worldScale, "cg_worldScale", "37.5", CVAR_ARCHIVE }, - { &cg_weaponScale, "cg_weaponScale", "0.62", CVAR_ARCHIVE }, { &cg_heightAdjust, "cg_heightAdjust", "0.0", CVAR_ARCHIVE }, { &cg_shadows, "cg_shadows", "1", CVAR_ARCHIVE }, { &cg_gibs, "cg_gibs", "1", CVAR_ARCHIVE }, diff --git a/Projects/Android/z_rtcwquest_menu/ui/controls.menu b/Projects/Android/z_rtcwquest_menu/ui/controls.menu new file mode 100644 index 0000000..99fe378 --- /dev/null +++ b/Projects/Android/z_rtcwquest_menu/ui/controls.menu @@ -0,0 +1,284 @@ +#include "ui/menudef.h" + +{ +\\ SETUP MENU \\ + +menuDef +{ + name "control_menu" + visible 1 + fullscreen 0 + rect 100 125 443 340 + focusColor 1 .75 0 1 + style 1 + border 1 + onClose { uiScript saveControls } + onOpen { + setitemcolor fadebox backcolor 0 0 0 1; + fadeout fadebox; + hide grpControls; + show look; + uiScript loadControls + } + + onEsc { + close control_menu; + close setup_menu; + open main + } + + + itemDef + { + name controls_shader + group grpControls + style WINDOW_STYLE_SHADER + rect 0 45 640 60 + visible 0 + // background "ui/assets/controls_shader1" + decoration + } + + + itemDef + { + name window + group grpControlbutton + rect 0 2 443 300 + style WINDOW_STYLE_FILLED + border 1 + bordercolor .5 .5 .5 .5 + forecolor 1 1 1 1 + backcolor 0 0 0 .25 + visible 1 + decoration + } + + itemDef + { + name window2 + group grpControlbutton + rect 2 4 439 20 + style WINDOW_STYLE_FILLED + border 1 + bordercolor .1 .1 .1 .2 + forecolor 1 1 1 1 + backcolor .3 0.5 0.2 .25 + visible 1 + decoration + } + + + + + + + itemDef { + name keyBindStatus + rect 0 322 640 30 + ownerdraw UI_KEYBINDSTATUS + text " " + forecolor 1 .75 0 1 + textscale .23 + textalignx 221 + textalign 1 + textaligny 20 + visible 0 + decoration + } + + + + + +itemDef + { + name ctr_vr + text "VR Controls" + type 1 + textscale .22 + group grpSystembutton + style WINDOW_STYLE_FILLED + rect 172 10 100 12 + textalign 1 + textalignx 50 + textaligny 10 + forecolor 1 1 1 1 + backcolor .1 .1 .1 0 + visible 1 + action { play "sound/misc/kcaction.wav" ; + hide grpOptions ; show vr } + mouseEnter { show message_graphics ; setitemcolor ctr_vr backcolor .3 .3 .3 0 } + mouseExit { hide message_graphics ; setitemcolor ctr_vr backcolor .1 .1 .1 0 } + } + + + itemDef { + name vr + group grpOptions + text "Control Scheme: " + type ITEM_TYPE_MULTI + cvar "vr_control_scheme" + cvarFloatList {"Right Handed" 0 "Left Handed" 10 } + rect 82 30 290 12 + textalign ITEM_ALIGN_RIGHT + textalignx 142 + textaligny 10 + textscale .22 + style WINDOW_STYLE_FILLED + backcolor 1 1 1 .07 + forecolor 1 1 1 1 + visible 1 + } + + + itemDef { + name vr + group grpOptions + text "Teleport: " + type ITEM_TYPE_YESNO + cvar "vr_teleport" + rect 82 45 290 12 + textalign ITEM_ALIGN_RIGHT + textalignx 142 + textaligny 10 + textscale .22 + style WINDOW_STYLE_FILLED + backcolor 1 1 1 .07 + forecolor 1 1 1 1 + visible 1 + } + + itemDef { + name vr + group grpOptions + type ITEM_TYPE_YESNO + text "Laser Sight: " + cvar "vr_lasersight" + rect 82 60 290 12 + textalign ITEM_ALIGN_RIGHT + textalignx 142 + textaligny 10 + textscale .22 + style WINDOW_STYLE_FILLED + backcolor 1 1 1 .07 + forecolor 1 1 1 1 + visible 1 + } + + + itemDef { + name vr + group grpOptions + type ITEM_TYPE_SLIDER + text "Height Adjust:" + cvarfloat "cg_heightAdjust" .0 .01 1 + rect 82 75 290 12 + textalign ITEM_ALIGN_RIGHT + textalignx 142 + textaligny 10 + textscale .23 + style WINDOW_STYLE_FILLED + backcolor 1 1 1 .07 + forecolor 1 1 1 1 + visible 1 + } + + + itemDef { + name vr + group grpOptions + type ITEM_TYPE_SLIDER + text "Turn Angle ( <= 10 for smooth turn):" + cvarfloat "vr_snapturn_angle" .0 1 90 + rect 82 90 290 12 + textalign ITEM_ALIGN_RIGHT + textalignx 142 + textaligny 10 + textscale .23 + style WINDOW_STYLE_FILLED + backcolor 1 1 1 .07 + forecolor 1 1 1 1 + visible 1 + } + + + itemDef { + name vr + group grpOptions + type ITEM_TYPE_YESNO + text "Gaze Movement Direction: " + cvar "vr_walkdirection" + rect 82 105 290 12 + textalign ITEM_ALIGN_RIGHT + textalignx 142 + textaligny 10 + textscale .22 + style WINDOW_STYLE_FILLED + backcolor 1 1 1 .07 + forecolor 1 1 1 1 + visible 1 + } + + + + +// TOOLS MESSAGE // + +itemDef +{ + name yesno_message + rect 0 320 640 30 + text "Select the Item to Toggle to Yes or No" + forecolor 1 .75 0 1 + textscale .23 + textalignx 221 + textalign 1 + textaligny 20 + visible 0 + decoration + } + +itemDef +{ + name slider_message + rect 0 320 640 30 + text "Drag the Slider to Increase and Decrease" + forecolor 1 .75 0 1 + textscale .23 + textalignx 221 + textalign 1 + textaligny 20 + visible 0 + decoration + } + +itemDef +{ + name fadebox + style WINDOW_STYLE_FILLED + background "ui/assets/fadebox.tga" + forecolor 0 0 0 1 + backcolor 0 0 0 1 + rect 0 0 640 480 + visible 1 + decoration + } + + + + + + + + + + + + + +} + +} + +} diff --git a/Projects/Android/z_rtcwquest_menu/ui/options.menu b/Projects/Android/z_rtcwquest_menu/ui/options.menu new file mode 100644 index 0000000..7a9f5de --- /dev/null +++ b/Projects/Android/z_rtcwquest_menu/ui/options.menu @@ -0,0 +1,297 @@ +#include "ui/menudef.h" + +{ +\\ SETUP MENU \\ + +menuDef { + name "options_menu" + visible 0 + fullscreen 0 + rect 100 125 443 340 + focusColor 1 .75 0 1 + style 1 + border 1 + onOpen { setitemcolor fadebox backcolor 0 0 0 1 ; + fadeout fadebox } + onEsc { close options_menu ; close setup_menu ; open main } + + + +itemDef + { + name window + group grpSystembutton + rect 0 2 443 300 + style WINDOW_STYLE_FILLED + border 1 + bordercolor .5 .5 .5 .5 + forecolor 1 1 1 1 + backcolor 0 0 0 .25 + visible 1 + decoration + } + + +itemDef { + name window + text "GAME OPTIONS" + type 1 + textfont UI_FONT_NORMAL + style 0 + textstyle 6 + rect 222.5 -12 64 14 + textalign ITEM_ALIGN_CENTER + textscale .22 + textalignx 2 + textaligny 12 + forecolor .9 .9 .9 .9 + visible 1 + decoration +} + itemDef + { + name window2 + group grpControlbutton + rect 2 4 439 20 + style WINDOW_STYLE_FILLED + border 1 + bordercolor .1 .1 .1 .2 + forecolor 1 1 1 1 + backcolor .3 0.5 0.2 .25 + visible 1 + decoration + } + + + + +itemDef + { + name ctr_performance + text "Performance" + type 1 + textscale .22 + group grpSystembutton + style WINDOW_STYLE_FILLED + rect 172 10 100 12 + textalign 1 + textalignx 50 + textaligny 10 + forecolor 1 1 1 1 + backcolor .1 .1 .1 0 + visible 1 + action { play "sound/misc/kcaction.wav" ; + hide grpOptions ; show performance } + mouseEnter { show message_graphics ; setitemcolor ctr_performance backcolor .3 .3 .3 0 } + mouseExit { hide message_graphics ; setitemcolor ctr_performance backcolor .1 .1 .1 0 } + } + + + + itemDef { + name performance + group grpOptions + text "Wall Mark Lifetime: " + type ITEM_TYPE_MULTI + cvar "cg_markTime" + cvarFloatList {"Normal" 20000 "Short" 10000 "Off" 0 "Long" 30000 } + rect 82 30 290 12 + textalign ITEM_ALIGN_RIGHT + textalignx 142 + textaligny 10 + textscale .22 + style WINDOW_STYLE_FILLED + backcolor 1 1 1 .07 + forecolor 1 1 1 1 + visible 1 + } + + + itemDef { + name performance + group grpOptions + text "Ejecting Brass: " + type ITEM_TYPE_MULTI + cvar "cg_brassTime" + cvarFloatList { "High" 2500 "Med" 1250 "Off" 0 } + rect 82 45 290 12 + textalign ITEM_ALIGN_RIGHT + textalignx 142 + textaligny 10 + textscale .22 + style WINDOW_STYLE_FILLED + backcolor 1 1 1 .07 + forecolor 1 1 1 1 + visible 1 + } + + itemDef { + name performance + group grpOptions + type ITEM_TYPE_YESNO + text "Dynamic Lights: " + cvar "r_dynamiclight" + rect 82 60 290 12 + textalign ITEM_ALIGN_RIGHT + textalignx 142 + textaligny 10 + textscale .22 + style WINDOW_STYLE_FILLED + backcolor 1 1 1 .07 + forecolor 1 1 1 1 + visible 1 + } + + + itemDef { + name performance + group grpOptions + type ITEM_TYPE_YESNO + text "Low Quality Sky: " + cvar "r_fastsky" + rect 82 75 290 12 + textalign ITEM_ALIGN_RIGHT + textalignx 142 + textaligny 10 + textscale .22 + style WINDOW_STYLE_FILLED + backcolor 1 1 1 .07 + forecolor 1 1 1 1 + visible 1 + } + +itemDef { + name performance + group grpOptions + type ITEM_TYPE_YESNO + text "Draw Portal Skies:" + cvar "cg_skybox" + rect 82 90 290 12 + textalign ITEM_ALIGN_RIGHT + textalignx 142 + textaligny 10 + textscale .23 + style WINDOW_STYLE_FILLED + backcolor 1 1 1 .07 + forecolor 1 1 1 1 + visible 1 + } + + + itemDef { + name performance + type ITEM_TYPE_MULTI + group grpOptions + text "Corona Dist: " + rect 82 105 290 12 + cvar "cg_coronafardist" + cvarFloatList { "normal" 1536 "far" 4096 "you crazy" 16000 "off" 0 "near" 800 } + textalign ITEM_ALIGN_RIGHT + textalignx 142 + textaligny 10 + textscale .22 + style WINDOW_STYLE_FILLED + backcolor 1 1 1 .07 + forecolor 1 1 1 1 + visible 1 + } + + + + itemDef { + name performance + group grpOptions + type ITEM_TYPE_YESNO + text "Particles: " + cvar "cg_wolfparticles" + rect 82 120 290 12 + textalign ITEM_ALIGN_RIGHT + textalignx 142 + textaligny 10 + textscale .22 + style WINDOW_STYLE_FILLED + backcolor 1 1 1 .07 + forecolor 1 1 1 1 + visible 1 + } + + + +itemDef { + name ctr_view + text "View" + type 1 + textscale .22 + group grpSystembutton + style WINDOW_STYLE_FILLED + rect 270 10 100 12 + textalign 1 + textalignx 50 + textaligny 10 + forecolor 1 1 1 1 + backcolor .1 .1 .1 0 + visible 1 + action { play "sound/misc/kcaction.wav" ; + hide grpOptions ; show view } + mouseEnter { show message_driver ; setitemcolor ctr_view backcolor .3 .3 .3 0 } + mouseExit { hide message_driver ; setitemcolor ctr_view backcolor .1 .1 .1 0 } + } + + + + + itemDef { + name view + type ITEM_TYPE_MULTI + group grpOptions + text "Cursor Hints:" + cvar "cg_cursorHints" + cvarFloatList { "strobe pulse" 2 "alpha pulse" 3 "solid" 4 "off" 0 "size pulse" 1 } + textalign ITEM_ALIGN_RIGHT + rect 82 30 290 12 + textalign ITEM_ALIGN_RIGHT + textalignx 142 + textaligny 10 + textscale .23 + style WINDOW_STYLE_FILLED + backcolor 1 1 1 .07 + forecolor 1 1 1 1 + visible 0 + } + + + + itemDef { + name view + group grpOptions + type ITEM_TYPE_SLIDER + text "HUD Alpha:" + cvarfloat "cg_hudAlpha" .6 .1 1 + rect 82 45 290 12 + textalign ITEM_ALIGN_RIGHT + textalignx 142 + textaligny 10 + textscale .23 + style WINDOW_STYLE_FILLED + backcolor 1 1 1 .07 + forecolor 1 1 1 1 + visible 0 + } + + + + itemDef { + name fadebox + style WINDOW_STYLE_FILLED + background "ui/assets/fadebox.tga" + forecolor 0 0 0 1 + backcolor 0 0 0 1 + rect 0 0 640 480 + visible 1 + decoration + } + + + + +}