mirror of
https://github.com/YimMenu/YimMenuV2.git
synced 2026-10-10 11:53:14 +08:00
26 lines
534 B
C++
26 lines
534 B
C++
#pragma once
|
|
#include "Command.hpp"
|
|
|
|
namespace YimMenu
|
|
{
|
|
class StringCommand : public Command
|
|
{
|
|
protected:
|
|
std::string m_StringValue;
|
|
|
|
virtual void OnChange()
|
|
{
|
|
}
|
|
|
|
virtual void OnCall() override;
|
|
virtual void SaveState(nlohmann::json& value) override;
|
|
virtual void LoadState(nlohmann::json& value) override;
|
|
|
|
public:
|
|
StringCommand(std::string name, std::string label, std::string description, std::string defaultValue = "");
|
|
|
|
std::string GetString() const;
|
|
void SetStringValue(const std::string& value);
|
|
};
|
|
}
|