generated from YimMenu/YimMenuV2
-
Notifications
You must be signed in to change notification settings - Fork 45
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rebranding, Map Editor and Improvements (#217)
String Commands Map Editor Rewrite Global Editor and add Local Editor Added Option to Force Enable Snow and Halloween Events Improved Shows Menu Improved Native Invoker ...and more + lots of bug fixes
- Loading branch information
Showing
113 changed files
with
12,677 additions
and
7,750 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
#include "StringCommand.hpp" | ||
|
||
namespace YimMenu | ||
{ | ||
void StringCommand::OnCall() | ||
{ | ||
} | ||
|
||
void StringCommand::SaveState(nlohmann::json& value) | ||
{ | ||
value = m_StringValue; | ||
} | ||
|
||
void StringCommand::LoadState(nlohmann::json& value) | ||
{ | ||
m_StringValue = value.get<std::string>(); | ||
} | ||
|
||
StringCommand::StringCommand(std::string name, std::string label, std::string description, std::string defaultValue) : | ||
Command(name, label, description, 0), | ||
m_StringValue(defaultValue) | ||
{ | ||
} | ||
|
||
std::string StringCommand::GetString() const | ||
{ | ||
return m_StringValue; | ||
} | ||
|
||
void StringCommand::SetStringValue(const std::string& value) | ||
{ | ||
m_StringValue = value; | ||
OnChange(); | ||
MarkDirty(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
#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); | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.