diff options
Diffstat (limited to 'src/core/Frontend.h')
-rw-r--r-- | src/core/Frontend.h | 50 |
1 files changed, 48 insertions, 2 deletions
diff --git a/src/core/Frontend.h b/src/core/Frontend.h index b6a91517..b9be5a82 100644 --- a/src/core/Frontend.h +++ b/src/core/Frontend.h @@ -15,6 +15,9 @@ #define MENUACTION_SCALE_MULT 0.9f +#define MENUSLIDER_BARS 16 +#define MENUSLIDER_LOGICAL_BARS MENUSLIDER_BARS + #define MENULABEL_X_MARGIN 80.0f #define MENULABEL_POS_X 100.0f #define MENULABEL_POS_Y 97.0f @@ -26,9 +29,17 @@ #define RIGHT_ALIGNED_TEXT_RIGHT_MARGIN(xMargin) (xMargin + 30.0f) #define MENURADIO_ICON_FIRST_X 238.f +#ifdef EXTERNAL_3D_SOUND #define MENURADIO_ICON_Y 288.0f +#else +#define MENURADIO_ICON_Y 248.0f +#endif #define MENURADIO_ICON_SIZE 60.0f +#ifdef EXTERNAL_3D_SOUND #define MENURADIO_SELECTOR_START_Y 285.f // other options should leave room on the screen +#else +#define MENURADIO_SELECTOR_START_Y 245.0f +#endif #define MENURADIO_SELECTOR_HEIGHT 65.f #define MENUSLIDER_X 500.0f @@ -218,8 +229,11 @@ enum eMenuScreen #ifdef DETECT_JOYSTICK_MENU MENUPAGE_DETECT_JOYSTICK, #endif - #endif +#ifdef MISSION_REPLAY + MENUPAGE_MISSION_RETRY, +#endif + MENUPAGE_OUTRO, // Originally 34, but CFO needs last screen to be empty to count number of menu pages MENUPAGES }; @@ -227,6 +241,7 @@ enum eMenuScreen enum eMenuAction { #ifdef CUSTOM_FRONTEND_OPTIONS + MENUACTION_CFO_SLIDER = -3, MENUACTION_CFO_SELECT = -2, MENUACTION_CFO_DYNAMIC = -1, #endif @@ -288,6 +303,10 @@ enum eMenuAction MENUACTION_CTRLVIBRATION, MENUACTION_CTRLCONFIG, #endif +#ifdef MISSION_REPLAY + MENUACTION_REJECT_RETRY, + MENUACTION_UNK114 +#endif }; enum eCheckHover @@ -328,6 +347,10 @@ enum eCheckHover HOVEROPTION_DECREASE_MOUSESENS, HOVEROPTION_INCREASE_MP3BOOST, HOVEROPTION_DECREASE_MP3BOOST, +#ifdef CUSTOM_FRONTEND_OPTIONS + HOVEROPTION_INCREASE_CFO_SLIDER, + HOVEROPTION_DECREASE_CFO_SLIDER, +#endif HOVEROPTION_NOT_HOVERING, }; @@ -400,7 +423,7 @@ struct CCustomScreenLayout { struct CCFO { - int8 *value; + void *value; const char *saveCat; const char *save; }; @@ -431,6 +454,24 @@ struct CCFOSelect : CCFO } }; +// Value is float in here +struct CCFOSlider : CCFO +{ + ChangeFuncFloat changeFunc; + float min; + float max; + + CCFOSlider() {}; + CCFOSlider(float* value, const char* saveCat, const char* save, float min, float max, ChangeFuncFloat changeFunc = nil){ + this->value = value; + this->saveCat = saveCat; + this->save = save; + this->changeFunc = changeFunc; + this->min = min; + this->max = max; + } +}; + struct CCFODynamic : CCFO { DrawFunc drawFunc; @@ -462,6 +503,7 @@ struct CMenuScreenCustom CCFO *m_CFO; // for initializing CCFOSelect *m_CFOSelect; CCFODynamic *m_CFODynamic; + CCFOSlider *m_CFOSlider; }; int32 m_SaveSlot; // eSaveSlot int32 m_TargetMenu; // eMenuScreen @@ -677,6 +719,10 @@ public: int8 m_nDisplayMSAALevel; #endif +#ifdef MISSION_REPLAY + bool m_bAttemptingMissionRetry; +#endif + #ifdef GAMEPAD_MENU enum { |