Subversion Repositories eduke32

Rev

Rev 8773 | Rev 8778 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 8773 Rev 8776
Line 913... Line 913...
913
static MenuEntry_t ME_MOUSESETUP_MOUSEAIMING = MAKE_MENUENTRY( "Vertical aiming:", &MF_Redfont, &MEF_BigOptionsRt, &MEO_MOUSESETUP_MOUSEAIMING, Option );
913
static MenuEntry_t ME_MOUSESETUP_MOUSEAIMING = MAKE_MENUENTRY( "Vertical aiming:", &MF_Redfont, &MEF_BigOptionsRt, &MEO_MOUSESETUP_MOUSEAIMING, Option );
914
#endif
914
#endif
915
static MenuOption_t MEO_MOUSESETUP_INVERT = MAKE_MENUOPTION( &MF_Redfont, &MEOS_YesNo, &ud.mouseflip );
915
static MenuOption_t MEO_MOUSESETUP_INVERT = MAKE_MENUOPTION( &MF_Redfont, &MEOS_YesNo, &ud.mouseflip );
916
static MenuEntry_t ME_MOUSESETUP_INVERT = MAKE_MENUENTRY( "Invert aiming:", &MF_Redfont, &MEF_BigOptionsRt, &MEO_MOUSESETUP_INVERT, Option );
916
static MenuEntry_t ME_MOUSESETUP_INVERT = MAKE_MENUENTRY( "Invert aiming:", &MF_Redfont, &MEF_BigOptionsRt, &MEO_MOUSESETUP_INVERT, Option );
917
917
918
#ifndef EDUKE32_RETAIL_MENU
-
 
919
static MenuLink_t MEO_MOUSESETUP_ADVANCED = { MENU_MOUSEADVANCED, MA_Advance, };
-
 
920
static MenuEntry_t ME_MOUSESETUP_ADVANCED = MAKE_MENUENTRY( "Advanced setup", &MF_Redfont, &MEF_BigOptionsRt, &MEO_MOUSESETUP_ADVANCED, Link );
-
 
921
#endif
-
 
922
static MenuRangeInt32_t MEO_MOUSEADVANCED_SCALEX = MAKE_MENURANGE(&ud.config.MouseAnalogueScale[0], &MF_Redfont, -262144, 262144, 65536, 161, 3);
918
static MenuRangeInt32_t MEO_MOUSESETUP_SCALEX = MAKE_MENURANGE(&CONTROL_MouseAxesScale[0], &MF_Redfont, 512, 65536, 65536, 128, 3 | EnforceIntervals);
923
static MenuEntry_t ME_MOUSEADVANCED_SCALEX = MAKE_MENUENTRY("X-Scale:", &MF_Redfont, &MEF_BigOptionsRt, &MEO_MOUSEADVANCED_SCALEX, RangeInt32);
919
static MenuEntry_t ME_MOUSESETUP_SCALEX = MAKE_MENUENTRY("X-Scale:", &MF_Redfont, &MEF_BigOptionsRt, &MEO_MOUSESETUP_SCALEX, RangeInt32);
924
static MenuRangeInt32_t MEO_MOUSEADVANCED_SCALEY = MAKE_MENURANGE(&ud.config.MouseAnalogueScale[1], &MF_Redfont, -262144, 262144, 65536, 161, 3);
920
static MenuRangeInt32_t MEO_MOUSESETUP_SCALEY = MAKE_MENURANGE(&CONTROL_MouseAxesScale[1], &MF_Redfont, 512, 65536, 65536, 128, 3 | EnforceIntervals);
925
static MenuEntry_t ME_MOUSEADVANCED_SCALEY = MAKE_MENUENTRY("Y-Scale:", &MF_Redfont, &MEF_BigOptionsRt, &MEO_MOUSEADVANCED_SCALEY, RangeInt32);
921
static MenuEntry_t ME_MOUSESETUP_SCALEY = MAKE_MENUENTRY("Y-Scale:", &MF_Redfont, &MEF_BigOptionsRt, &MEO_MOUSESETUP_SCALEY, RangeInt32);
926
922
927
static MenuEntry_t *MEL_MOUSESETUP[] = {
923
static MenuEntry_t *MEL_MOUSESETUP[] = {
928
    &ME_MOUSESETUP_BTNS,
924
    &ME_MOUSESETUP_BTNS,
929
    &ME_MOUSESETUP_SENSITIVITY,
925
    &ME_MOUSESETUP_SENSITIVITY,
930
#ifdef EDUKE32_RETAIL_MENU
-
 
931
    &ME_MOUSEADVANCED_SCALEX,
926
    &ME_MOUSESETUP_SCALEX,
932
    &ME_MOUSEADVANCED_SCALEY,
927
    &ME_MOUSESETUP_SCALEY,
933
#endif
-
 
934
    &ME_Space2_Redfont,
928
    &ME_Space2_Redfont,
935
    &ME_MOUSESETUP_INVERT,
929
    &ME_MOUSESETUP_INVERT,
936
#ifndef EDUKE32_RETAIL_MENU
930
#ifndef EDUKE32_RETAIL_MENU
937
    &ME_MOUSESETUP_MOUSEAIMINGTYPE,
931
    &ME_MOUSESETUP_MOUSEAIMINGTYPE,
938
    &ME_MOUSESETUP_MOUSEAIMING,
932
    &ME_MOUSESETUP_MOUSEAIMING,
939
    &ME_MOUSESETUP_ADVANCED,
-
 
940
#endif
933
#endif
941
};
934
};
942
935
943
#ifdef EDUKE32_ANDROID_MENU
936
#ifdef EDUKE32_ANDROID_MENU
944
static MenuRangeFloat_t MEO_TOUCHSETUP_SENSITIVITY_MOVE = MAKE_MENURANGE(&droidinput.forward_sens, &MF_Redfont, 1.f, 9.f, 0.f, 17, 1 + EnforceIntervals);
937
static MenuRangeFloat_t MEO_TOUCHSETUP_SENSITIVITY_MOVE = MAKE_MENURANGE(&droidinput.forward_sens, &MF_Redfont, 1.f, 9.f, 0.f, 17, 1 + EnforceIntervals);
Line 1011... Line 1004...
1011
static MenuEntry_t ME_JOYSTICKAXES[MAXJOYAXES];
1004
static MenuEntry_t ME_JOYSTICKAXES[MAXJOYAXES];
1012
static char MenuJoystickAxes[MAXJOYAXES][MAXJOYBUTTONSTRINGLENGTH];
1005
static char MenuJoystickAxes[MAXJOYAXES][MAXJOYBUTTONSTRINGLENGTH];
1013
1006
1014
static MenuEntry_t *MEL_JOYSTICKAXES[MAXJOYAXES];
1007
static MenuEntry_t *MEL_JOYSTICKAXES[MAXJOYAXES];
1015
1008
1016
static MenuEntry_t *MEL_MOUSEADVANCED[] = {
-
 
1017
    &ME_MOUSEADVANCED_SCALEX,
-
 
1018
    &ME_MOUSEADVANCED_SCALEY,
-
 
1019
};
-
 
1020
-
 
1021
static const char *MenuJoystickHatDirections[] = { "Up", "Right", "Down", "Left", };
1009
static const char *MenuJoystickHatDirections[] = { "Up", "Right", "Down", "Left", };
1022
1010
1023
static char const *MEOSN_JOYSTICKAXIS_ANALOG[] = { "  -None-", "Turning", "Strafing", "Looking", "Moving", };
1011
static char const *MEOSN_JOYSTICKAXIS_ANALOG[] = { "  -None-", "Turning", "Strafing", "Looking", "Moving", };
1024
static int32_t MEOSV_JOYSTICKAXIS_ANALOG[] = { -1, analog_turning, analog_strafing, analog_lookingupanddown, analog_moving, };
1012
static int32_t MEOSV_JOYSTICKAXIS_ANALOG[] = { -1, analog_turning, analog_strafing, analog_lookingupanddown, analog_moving, };
1025
static MenuOptionSet_t MEOS_JOYSTICKAXIS_ANALOG = MAKE_MENUOPTIONSET( MEOSN_JOYSTICKAXIS_ANALOG, MEOSV_JOYSTICKAXIS_ANALOG, 0x0 );
1013
static MenuOptionSet_t MEOS_JOYSTICKAXIS_ANALOG = MAKE_MENUOPTIONSET( MEOSN_JOYSTICKAXIS_ANALOG, MEOSV_JOYSTICKAXIS_ANALOG, 0x0 );
Line 1460... Line 1448...
1460
static MenuMenu_t M_JOYSTICKSETUP = MAKE_MENUMENU( "Gamepad Setup", &MMF_BigOptions, MEL_JOYSTICKSETUP );
1448
static MenuMenu_t M_JOYSTICKSETUP = MAKE_MENUMENU( "Gamepad Setup", &MMF_BigOptions, MEL_JOYSTICKSETUP );
1461
static MenuMenu_t M_JOYSTICKBTNS = MAKE_MENUMENU( "Gamepad Buttons", &MMF_MouseJoySetupBtns, MEL_JOYSTICKBTNS );
1449
static MenuMenu_t M_JOYSTICKBTNS = MAKE_MENUMENU( "Gamepad Buttons", &MMF_MouseJoySetupBtns, MEL_JOYSTICKBTNS );
1462
static MenuMenu_t M_JOYSTICKAXES = MAKE_MENUMENU( "Gamepad Axes", &MMF_BigSliders, MEL_JOYSTICKAXES );
1450
static MenuMenu_t M_JOYSTICKAXES = MAKE_MENUMENU( "Gamepad Axes", &MMF_BigSliders, MEL_JOYSTICKAXES );
1463
static MenuMenu_t M_KEYBOARDKEYS = MAKE_MENUMENU( "Key Configuration", &MMF_KeyboardSetupFuncs, MEL_KEYBOARDSETUPFUNCS );
1451
static MenuMenu_t M_KEYBOARDKEYS = MAKE_MENUMENU( "Key Configuration", &MMF_KeyboardSetupFuncs, MEL_KEYBOARDSETUPFUNCS );
1464
static MenuMenu_t M_MOUSEBTNS = MAKE_MENUMENU( "Mouse Buttons", &MMF_MouseJoySetupBtns, MEL_MOUSESETUPBTNS );
1452
static MenuMenu_t M_MOUSEBTNS = MAKE_MENUMENU( "Mouse Buttons", &MMF_MouseJoySetupBtns, MEL_MOUSESETUPBTNS );
1465
static MenuMenu_t M_MOUSEADVANCED = MAKE_MENUMENU( "Advanced Mouse", &MMF_BigSliders, MEL_MOUSEADVANCED );
-
 
1466
static MenuMenu_t M_JOYSTICKAXIS = MAKE_MENUMENU( NULL, &MMF_BigSliders, MEL_JOYSTICKAXIS );
1453
static MenuMenu_t M_JOYSTICKAXIS = MAKE_MENUMENU( NULL, &MMF_BigSliders, MEL_JOYSTICKAXIS );
1467
#ifdef USE_OPENGL
1454
#ifdef USE_OPENGL
1468
static MenuMenu_t M_RENDERERSETUP_POLYMOST = MAKE_MENUMENU( "Polymost Setup", &MMF_SmallOptions, MEL_RENDERERSETUP_POLYMOST );
1455
static MenuMenu_t M_RENDERERSETUP_POLYMOST = MAKE_MENUMENU( "Polymost Setup", &MMF_SmallOptions, MEL_RENDERERSETUP_POLYMOST );
1469
# ifdef POLYMER
1456
# ifdef POLYMER
1470
static MenuMenu_t M_RENDERERSETUP_POLYMER = MAKE_MENUMENU("Polymer Setup", &MMF_SmallOptions, MEL_RENDERERSETUP_POLYMER );
1457
static MenuMenu_t M_RENDERERSETUP_POLYMER = MAKE_MENUMENU("Polymer Setup", &MMF_SmallOptions, MEL_RENDERERSETUP_POLYMER );
Line 1554... Line 1541...
1554
    { &M_JOYSTICKSETUP, MENU_JOYSTICKSETUP, MENU_CONTROLS, MA_Return, Menu },
1541
    { &M_JOYSTICKSETUP, MENU_JOYSTICKSETUP, MENU_CONTROLS, MA_Return, Menu },
1555
    { &M_JOYSTICKBTNS, MENU_JOYSTICKBTNS, MENU_JOYSTICKSETUP, MA_Return, Menu },
1542
    { &M_JOYSTICKBTNS, MENU_JOYSTICKBTNS, MENU_JOYSTICKSETUP, MA_Return, Menu },
1556
    { &M_JOYSTICKAXES, MENU_JOYSTICKAXES, MENU_JOYSTICKSETUP, MA_Return, Menu },
1543
    { &M_JOYSTICKAXES, MENU_JOYSTICKAXES, MENU_JOYSTICKSETUP, MA_Return, Menu },
1557
    { &M_KEYBOARDKEYS, MENU_KEYBOARDKEYS, MENU_KEYBOARDSETUP, MA_Return, Menu },
1544
    { &M_KEYBOARDKEYS, MENU_KEYBOARDKEYS, MENU_KEYBOARDSETUP, MA_Return, Menu },
1558
    { &M_MOUSEBTNS, MENU_MOUSEBTNS, MENU_MOUSESETUP, MA_Return, Menu },
1545
    { &M_MOUSEBTNS, MENU_MOUSEBTNS, MENU_MOUSESETUP, MA_Return, Menu },
1559
    { &M_MOUSEADVANCED, MENU_MOUSEADVANCED, MENU_MOUSESETUP, MA_Return, Menu },
-
 
1560
    { &M_JOYSTICKAXIS, MENU_JOYSTICKAXIS, MENU_JOYSTICKAXES, MA_Return, Menu },
1546
    { &M_JOYSTICKAXIS, MENU_JOYSTICKAXIS, MENU_JOYSTICKAXES, MA_Return, Menu },
1561
#ifdef EDUKE32_ANDROID_MENU
1547
#ifdef EDUKE32_ANDROID_MENU
1562
    { &M_TOUCHSETUP, MENU_TOUCHSETUP, MENU_OPTIONS, MA_Return, Menu },
1548
    { &M_TOUCHSETUP, MENU_TOUCHSETUP, MENU_OPTIONS, MA_Return, Menu },
1563
    { &M_TOUCHSENS, MENU_TOUCHSENS, MENU_TOUCHSETUP, MA_Return, Menu },
1549
    { &M_TOUCHSENS, MENU_TOUCHSENS, MENU_TOUCHSETUP, MA_Return, Menu },
1564
    { &M_TOUCHBUTTONS, MENU_TOUCHBUTTONS, MENU_TOUCHSETUP, MA_Return, Panel },
1550
    { &M_TOUCHBUTTONS, MENU_TOUCHBUTTONS, MENU_TOUCHSETUP, MA_Return, Panel },
Line 3090... Line 3076...
3090
static void Menu_PreOptionListDraw(MenuEntry_t *entry, const vec2_t origin)
3076
static void Menu_PreOptionListDraw(MenuEntry_t *entry, const vec2_t origin)
3091
{
3077
{
3092
    switch (g_currentMenu)
3078
    switch (g_currentMenu)
3093
    {
3079
    {
3094
    case MENU_MOUSEBTNS:
3080
    case MENU_MOUSEBTNS:
3095
    case MENU_MOUSEADVANCED:
-
 
3096
    case MENU_JOYSTICKBTNS:
3081
    case MENU_JOYSTICKBTNS:
3097
    case MENU_JOYSTICKAXIS:
3082
    case MENU_JOYSTICKAXIS:
3098
        mgametextcenter(origin.x, origin.y + (31<<16), "Select a function to assign");
3083
        mgametextcenter(origin.x, origin.y + (31<<16), "Select a function to assign");
3099
3084
3100
        Bsprintf(tempbuf, "to %s", entry->name);
3085
        Bsprintf(tempbuf, "to %s", entry->name);
Line 3668... Line 3653...
3668
        G_SetStatusBarScale(newValue);
3653
        G_SetStatusBarScale(newValue);
3669
    else if (entry == &ME_SOUND_VOLUME_FX)
3654
    else if (entry == &ME_SOUND_VOLUME_FX)
3670
        FX_SetVolume(newValue);
3655
        FX_SetVolume(newValue);
3671
    else if (entry == &ME_SOUND_VOLUME_MUSIC)
3656
    else if (entry == &ME_SOUND_VOLUME_MUSIC)
3672
        S_MusicVolume(newValue);
3657
        S_MusicVolume(newValue);
3673
    else if (entry == &ME_MOUSEADVANCED_SCALEX)
3658
    else if (entry == &ME_MOUSESETUP_SCALEX)
3674
        CONTROL_SetAnalogAxisScale(0, newValue, controldevice_mouse);
3659
        CONTROL_SetAnalogAxisScale(0, newValue, controldevice_mouse);
3675
    else if (entry == &ME_MOUSEADVANCED_SCALEY)
3660
    else if (entry == &ME_MOUSESETUP_SCALEY)
3676
        CONTROL_SetAnalogAxisScale(1, newValue, controldevice_mouse);
3661
        CONTROL_SetAnalogAxisScale(1, newValue, controldevice_mouse);
3677
    else if (entry == &ME_JOYSTICKAXIS_SCALE)
3662
    else if (entry == &ME_JOYSTICKAXIS_SCALE)
3678
        CONTROL_SetAnalogAxisScale(M_JOYSTICKAXES.currentEntry, newValue, controldevice_joystick);
3663
        CONTROL_SetAnalogAxisScale(M_JOYSTICKAXES.currentEntry, newValue, controldevice_joystick);
3679
    else if (entry == &ME_JOYSTICKAXIS_DEAD)
3664
    else if (entry == &ME_JOYSTICKAXIS_DEAD)
3680
        joySetDeadZone(M_JOYSTICKAXES.currentEntry, newValue, *MEO_JOYSTICKAXIS_SATU.variable);
3665
        joySetDeadZone(M_JOYSTICKAXES.currentEntry, newValue, *MEO_JOYSTICKAXIS_SATU.variable);