WiiUPluginLoaderBackend/source/utils/config/ConfigRendererItem.h

38 lines
1.0 KiB
C
Raw Permalink Normal View History

#pragma once
2024-11-27 20:44:36 +01:00
#include "ConfigRendererItemGeneric.h"
#include "config/WUPSConfigItem.h"
2024-11-27 20:44:36 +01:00
#include <cstdint>
#include <string>
#include <wups/config.h>
class ConfigRendererItem final : public ConfigRendererItemGeneric {
public:
2024-11-27 20:44:36 +01:00
explicit ConfigRendererItem(const WUPSConfigAPIBackend::WUPSConfigItem *item);
void Draw(uint32_t yOffset, bool isHighlighted) const override;
[[nodiscard]] std::string GetValueToPrint(bool isHighlighted) const;
void Update(bool isHighlighted) override;
void ResetNeedsRedraw() override;
[[nodiscard]] bool NeedsRedraw() const override;
void SetIsSelected(bool isSelected) override;
void OnButtonPressed(WUPSConfigButtons buttons) override;
[[nodiscard]] bool IsMovementAllowed() const override;
void OnInput(WUPSConfigSimplePadData input) override;
void OnInputEx(WUPSConfigComplexPadData input) override;
private:
2024-11-27 20:44:36 +01:00
const WUPSConfigAPIBackend::WUPSConfigItem *mItem = nullptr;
std::string mCurItemText;
bool mNeedsDraw = true;
};