1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55
|
#pragma once
#include "ScrollableMenuSection.h"
namespace Jazz2::UI::Menu
{
#ifndef DOXYGEN_GENERATING_OUTPUT
enum class GameplayOptionsItemType {
Enhancements,
Language,
#if defined(WITH_ANGELSCRIPT)
AllowUnsignedScripts,
#endif
ContinuousJump,
SwitchToNewWeapon,
AllowCheats,
OverwriteEpisodeEnd,
#if !defined(DEATH_TARGET_ANDROID) && !defined(DEATH_TARGET_IOS) && !defined(DEATH_TARGET_SWITCH) && !defined(DEATH_TARGET_WINDOWS_RT)
EnableRgbLights,
#endif
#if defined(DEATH_TARGET_APPLE) || defined(DEATH_TARGET_WINDOWS) || defined(DEATH_TARGET_UNIX)
BrowseSourceDirectory,
#endif
#if !defined(DEATH_TARGET_EMSCRIPTEN)
RefreshCache,
#endif
};
struct GameplayOptionsItem {
GameplayOptionsItemType Type;
StringView DisplayName;
bool HasBooleanValue;
bool IsReadOnly;
};
#endif
class GameplayOptionsSection : public ScrollableMenuSection<GameplayOptionsItem>
{
public:
GameplayOptionsSection();
~GameplayOptionsSection();
void OnShow(IMenuContainer* root) override;
void OnDraw(Canvas* canvas) override;
protected:
void OnHandleInput() override;
void OnLayoutItem(Canvas* canvas, ListViewItem& item) override;
void OnDrawItem(Canvas* canvas, ListViewItem& item, std::int32_t& charOffset, bool isSelected) override;
void OnExecuteSelected() override;
private:
bool _isDirty;
};
}
|