From aa7108be8cc492d1a74eab369d7153e004101d6d Mon Sep 17 00:00:00 2001 From: Petr Bartos Date: Sat, 9 Apr 2022 16:30:30 +0200 Subject: [PATCH] Menu update --- .../app/src/main/cpp/code/q3_ui/ui_comfort.c | 23 +++++-------------- .../src/main/cpp/code/q3_ui/ui_controls3.c | 4 ++-- .../src/main/cpp/code/q3_ui/ui_preferences.c | 2 +- android/app/src/main/pakQ3Q/ui/comfort.menu | 7 +++--- android/app/src/main/pakQ3Q/ui/controls3.menu | 2 +- .../src/main/pakQ3Q/ui/ingame_controls.menu | 9 ++++---- .../src/main/pakQ3Q/ui/ingame_options.menu | 2 +- android/app/src/main/pakQ3Q/ui/options.menu | 2 +- 8 files changed, 19 insertions(+), 32 deletions(-) diff --git a/android/app/src/main/cpp/code/q3_ui/ui_comfort.c b/android/app/src/main/cpp/code/q3_ui/ui_comfort.c index 7bdb4c29..d5f1ddef 100644 --- a/android/app/src/main/cpp/code/q3_ui/ui_comfort.c +++ b/android/app/src/main/cpp/code/q3_ui/ui_comfort.c @@ -62,7 +62,7 @@ typedef struct { menuslider_s heightadjust; menuradiobutton_s rollhit; menuslider_s hapticintensity; - menulist_s huddepth; + menuslider_s huddepth; menuslider_s hudyoffset; menubitmap_s back; @@ -104,7 +104,7 @@ static void Comfort_MenuEvent( void* ptr, int notification ) { break; case ID_HUDDEPTH: - trap_Cvar_SetValue( "vr_hudDepth", s_comfort.huddepth.curvalue ); + trap_Cvar_SetValue( "vr_hudDepth", ((int)s_comfort.huddepth.curvalue % NUM_HUDDEPTH)); break; case ID_HUDYOFFSET: @@ -120,17 +120,6 @@ static void Comfort_MenuEvent( void* ptr, int notification ) { static void Comfort_MenuInit( void ) { int y; - static const char *s_hud_depths[] = - { - "Very Close", - "Close", - "Middle", - "Further", - "Far", - "Distant", - NULL - }; - memset( &s_comfort, 0 ,sizeof(comfort_t) ); Comfort_Cache(); @@ -204,22 +193,22 @@ static void Comfort_MenuInit( void ) { s_comfort.hapticintensity.maxvalue = 1.0; y += BIGCHAR_HEIGHT+2; - s_comfort.huddepth.generic.type = MTYPE_SPINCONTROL; + s_comfort.huddepth.generic.type = MTYPE_SLIDER; s_comfort.huddepth.generic.flags = QMF_PULSEIFFOCUS|QMF_SMALLFONT; s_comfort.huddepth.generic.x = VR_X_POS; s_comfort.huddepth.generic.y = y; s_comfort.huddepth.generic.name = "HUD Depth:"; s_comfort.huddepth.generic.callback = Comfort_MenuEvent; s_comfort.huddepth.generic.id = ID_HUDDEPTH; - s_comfort.huddepth.itemnames = s_hud_depths; - s_comfort.huddepth.numitems = NUM_HUDDEPTH; + s_comfort.huddepth.minvalue = 0; + s_comfort.huddepth.maxvalue = 5; y += BIGCHAR_HEIGHT+2; s_comfort.hudyoffset.generic.type = MTYPE_SLIDER; s_comfort.hudyoffset.generic.x = VR_X_POS; s_comfort.hudyoffset.generic.y = y; s_comfort.hudyoffset.generic.flags = QMF_PULSEIFFOCUS|QMF_SMALLFONT; - s_comfort.hudyoffset.generic.name = "HUD Y Offset:"; + s_comfort.hudyoffset.generic.name = "HUD Vertical Position:"; s_comfort.hudyoffset.generic.id = ID_HUDYOFFSET; s_comfort.hudyoffset.generic.callback = Comfort_MenuEvent; s_comfort.hudyoffset.minvalue = 0; diff --git a/android/app/src/main/cpp/code/q3_ui/ui_controls3.c b/android/app/src/main/cpp/code/q3_ui/ui_controls3.c index bf224e0d..2cd53991 100644 --- a/android/app/src/main/cpp/code/q3_ui/ui_controls3.c +++ b/android/app/src/main/cpp/code/q3_ui/ui_controls3.c @@ -240,8 +240,8 @@ static void Controls3_MenuInit( void ) { static const char *s_weaponselectormode[] = { - "Controller Based", - "HMD/Thumbstick Based", + "VR Style / Pointing", + "Classic / Thumbstick", NULL }; diff --git a/android/app/src/main/cpp/code/q3_ui/ui_preferences.c b/android/app/src/main/cpp/code/q3_ui/ui_preferences.c index 450421f2..b4a23fea 100644 --- a/android/app/src/main/cpp/code/q3_ui/ui_preferences.c +++ b/android/app/src/main/cpp/code/q3_ui/ui_preferences.c @@ -91,7 +91,7 @@ static const char *hud_names[] = { "Off", "Floating", - "Simple", + "Fixed to View", NULL }; diff --git a/android/app/src/main/pakQ3Q/ui/comfort.menu b/android/app/src/main/pakQ3Q/ui/comfort.menu index 87b26ca5..1df17961 100755 --- a/android/app/src/main/pakQ3Q/ui/comfort.menu +++ b/android/app/src/main/pakQ3Q/ui/comfort.menu @@ -99,10 +99,9 @@ itemDef { itemDef { name comfort group grpComfort - type ITEM_TYPE_MULTI + type ITEM_TYPE_SLIDER text "HUD Depth:" - cvar "vr_hudDepth" - cvarFloatList { "Very Close" 0 "Close" 1 "Middle" 2 "Further" 3 "Far" 4 "Distant" 5 } + cvarfloat "vr_hudDepth" 1 0 5 rect 99 250 256 20 textalign ITEM_ALIGN_RIGHT textalignx 128 @@ -116,7 +115,7 @@ itemDef { name comfort group grpComfort type ITEM_TYPE_SLIDER - text "HUD Y Offset:" + text "HUD Vertical Position:" cvarfloat "vr_hudYOffset" 20 -200 200 rect 99 275 256 20 textalign ITEM_ALIGN_RIGHT diff --git a/android/app/src/main/pakQ3Q/ui/controls3.menu b/android/app/src/main/pakQ3Q/ui/controls3.menu index 9a84209e..46d4c140 100755 --- a/android/app/src/main/pakQ3Q/ui/controls3.menu +++ b/android/app/src/main/pakQ3Q/ui/controls3.menu @@ -180,7 +180,7 @@ itemDef { type ITEM_TYPE_MULTI text "Weapon Wheel Mode:" cvar "vr_weaponSelectorMode" - cvarFloatList { "Controller Based" 0 "HMD/Thumbstick Based" 1 } + cvarFloatList { "VR Style / Pointing" 0 "Classic / Thumbstick" 1 } rect 99 300 256 20 textalign ITEM_ALIGN_RIGHT textalignx 128 diff --git a/android/app/src/main/pakQ3Q/ui/ingame_controls.menu b/android/app/src/main/pakQ3Q/ui/ingame_controls.menu index 78eeaef7..ccb241c2 100755 --- a/android/app/src/main/pakQ3Q/ui/ingame_controls.menu +++ b/android/app/src/main/pakQ3Q/ui/ingame_controls.menu @@ -302,7 +302,7 @@ itemDef { type ITEM_TYPE_MULTI text "Weapon Wheel Mode:" cvar "vr_weaponSelectorMode" - cvarFloatList { "Controller Based" 0 "HMD/Thumbstick Based" 1 } + cvarFloatList { "VR Style / Pointing" 0 "Classic / Thumbstick" 1 } rect 30 182 200 20 textalign ITEM_ALIGN_RIGHT textalignx 143 @@ -402,10 +402,9 @@ itemDef { itemDef { name controls group grpControls - type ITEM_TYPE_MULTI + type ITEM_TYPE_SLIDER text "HUD Depth:" - cvar "vr_hudDepth" - cvarFloatList { "Very Close" 0 "Close" 1 "Middle" 2 "Further" 3 "Far" 4 "Distant" 5 } + cvarfloat "vr_hudDepth" 1 0 5 rect 30 331 200 20 textalign ITEM_ALIGN_RIGHT textalignx 143 @@ -418,7 +417,7 @@ itemDef { name controls group grpControls type ITEM_TYPE_SLIDER - text "HUD Y Offset:" + text "HUD Vertical Position:" cvarfloat "vr_hudYOffset" 20 -200 200 rect 30 351 200 20 textalign ITEM_ALIGN_RIGHT diff --git a/android/app/src/main/pakQ3Q/ui/ingame_options.menu b/android/app/src/main/pakQ3Q/ui/ingame_options.menu index 049dcd2f..2c7969a3 100755 --- a/android/app/src/main/pakQ3Q/ui/ingame_options.menu +++ b/android/app/src/main/pakQ3Q/ui/ingame_options.menu @@ -385,7 +385,7 @@ itemDef { type ITEM_TYPE_MULTI text "HUD Mode:" cvar "vr_hudDrawStatus" - cvarFloatList { "Off" 0 "Floating" 1 "Simple" 2 } + cvarFloatList { "Off" 0 "Floating" 1 "Fixed to View" 2 } rect 50 275 200 20 textalign ITEM_ALIGN_RIGHT textalignx 143 diff --git a/android/app/src/main/pakQ3Q/ui/options.menu b/android/app/src/main/pakQ3Q/ui/options.menu index e52a8845..3fa460aa 100755 --- a/android/app/src/main/pakQ3Q/ui/options.menu +++ b/android/app/src/main/pakQ3Q/ui/options.menu @@ -266,7 +266,7 @@ itemDef { type ITEM_TYPE_MULTI text "HUD Mode:" cvar "vr_hudDrawStatus" - cvarFloatList { "Off" 0 "Floating" 1 "Simple" 2 } + cvarFloatList { "Off" 0 "Floating" 1 "Fixed to View" 2 } rect 99 315 256 20 textalign ITEM_ALIGN_RIGHT textalignx 128