generated from YimMenu/YimMenuV2
-
Notifications
You must be signed in to change notification settings - Fork 39
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
New Kick - ICE Kick Logger Improvements Color Commands Node and Vtable Hooks Improved Protections Enhancements, Improvements, and Various Refactors
- Loading branch information
Showing
118 changed files
with
4,055 additions
and
1,100 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
#include "ColorCommand.hpp" | ||
#include "game/backend/FiberPool.hpp" // TODO: game import in core | ||
|
||
namespace YimMenu | ||
{ | ||
void ColorCommand::OnCall() | ||
{ | ||
} | ||
|
||
void ColorCommand::SaveState(nlohmann::json& value) | ||
{ | ||
value = {m_ColorState.x, m_ColorState.y, m_ColorState.z, m_ColorState.w}; | ||
} | ||
|
||
void ColorCommand::LoadState(nlohmann::json& value) | ||
{ | ||
if (value.is_array() && value.size() == 4) | ||
{ | ||
m_ColorState = ImVec4(value[0], value[1], value[2], value[3]); | ||
} | ||
else | ||
{ | ||
m_ColorState = ImVec4(1.0f, 1.0f, 1.0f, 1.0f); | ||
} | ||
} | ||
|
||
ColorCommand::ColorCommand(std::string name, std::string label, std::string description, ImVec4 color) : | ||
Command(name, label, description, 0), | ||
m_ColorState(color) | ||
{ | ||
} | ||
|
||
ImVec4 ColorCommand::GetState() | ||
{ | ||
return m_ColorState; | ||
} | ||
|
||
void ColorCommand::SetColorState(ImVec4 state) | ||
{ | ||
FiberPool::Push([this] { | ||
OnChange(); | ||
}); | ||
m_ColorState = state; | ||
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,22 @@ | ||
#pragma once | ||
#include "Command.hpp" | ||
#include "imgui.h" | ||
|
||
namespace YimMenu | ||
{ | ||
class ColorCommand : public Command | ||
{ | ||
protected: | ||
virtual void OnChange(){}; | ||
virtual void OnCall() override; | ||
virtual void SaveState(nlohmann::json& value) override; | ||
virtual void LoadState(nlohmann::json& value) override; | ||
|
||
ImVec4 m_ColorState = ImVec4(1.0f, 1.0f, 1.0f, 1.0f); | ||
|
||
public: | ||
ColorCommand(std::string name, std::string label, std::string description, ImVec4 color = ImVec4(1.0f, 1.0f, 1.0f, 1.0f)); | ||
ImVec4 GetState(); | ||
void SetColorState(ImVec4 state); | ||
}; | ||
} |
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
Oops, something went wrong.