Skip to content

Commit

Permalink
+8 more modules
Browse files Browse the repository at this point in the history
  • Loading branch information
TheBarii committed Sep 16, 2024
1 parent 91b7b68 commit a90f0e0
Show file tree
Hide file tree
Showing 8 changed files with 111 additions and 188 deletions.
41 changes: 11 additions & 30 deletions src/Client/Module/Modules/MotionBlur/MotionBlur.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,43 +34,24 @@ class MotionBlur : public Module {

void settingsRender() override {

float textWidth = Constraints::RelativeConstraint(0.12, "height", true);
const float textHeight = Constraints::RelativeConstraint(0.029, "height", true);

float toggleX = Constraints::PercentageConstraint(0.019, "left");
float toggleY = Constraints::PercentageConstraint(0.10, "top");
float x = Constraints::PercentageConstraint(0.019, "left");
float y = Constraints::PercentageConstraint(0.10, "top");

FlarialGUI::ScrollBar(toggleX, toggleY, 140, Constraints::SpacingConstraint(5.5, textWidth), 2);
FlarialGUI::SetScrollView(toggleX, Constraints::PercentageConstraint(0.00, "top"),
Constraints::RelativeConstraint(1.0, "width"),
Constraints::RelativeConstraint(1.0f, "height"));

FlarialGUI::FlarialTextWithFont(toggleX, toggleY, L"Bleed Factor", textWidth * 3.0f, textHeight,
DWRITE_TEXT_ALIGNMENT_LEADING,
Constraints::RelativeConstraint(0.12, "height", true),
DWRITE_FONT_WEIGHT_NORMAL);

float percent = FlarialGUI::Slider(7, toggleX + FlarialGUI::SettingsTextWidth("Bleed Factor "),
toggleY, this->settings.getSettingByName<float>("intensity")->value, 1.0f, 0,
false);

this->settings.getSettingByName<float>("intensity")->value = percent;
const float scrollviewWidth = Constraints::RelativeConstraint(0.12, "height", true);

toggleY += Constraints::SpacingConstraint(0.35, textWidth);

FlarialGUI::FlarialTextWithFont(toggleX, toggleY, L"Intensity", textWidth * 3.0f, textHeight,
DWRITE_TEXT_ALIGNMENT_LEADING,
Constraints::RelativeConstraint(0.12, "height", true),
DWRITE_FONT_WEIGHT_NORMAL);


percent = FlarialGUI::Slider(8, toggleX + FlarialGUI::SettingsTextWidth("Intensity "),
toggleY, this->settings.getSettingByName<float>("intensity2")->value, 30);

FlarialGUI::ScrollBar(x, y, 140, Constraints::SpacingConstraint(5.5, scrollviewWidth), 2);
FlarialGUI::SetScrollView(x, Constraints::PercentageConstraint(0.00, "top"),
Constraints::RelativeConstraint(1.0, "width"),
Constraints::RelativeConstraint(0.88f, "height"));

this->settings.getSettingByName<float>("intensity2")->value = percent;
this->addHeader("Misc");
this->addSlider("Bleed Factor", "The scale at which previous frames bleed into the current one.", this->settings.getSettingByName<float>("intensity")->value, 1.0f, 0.f, true);
this->addSlider("Intensity", "Amount of previous frames to render.", this->settings.getSettingByName<float>("intensity2")->value, 30, 0, true);

FlarialGUI::UnsetScrollView();

this->resetPadding();
}
};
20 changes: 15 additions & 5 deletions src/Client/Module/Modules/Nick/NickModule.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -55,12 +55,22 @@ class NickModule : public Module {
}

void settingsRender() override {
float toggleX = Constraints::PercentageConstraint(0.019, "left");
float toggleY = Constraints::PercentageConstraint(0.10, "top");

const float textWidth = Constraints::RelativeConstraint(0.12, "height", true);
float x = Constraints::PercentageConstraint(0.019, "left");
float y = Constraints::PercentageConstraint(0.10, "top");

toggleY += Constraints::SpacingConstraint(0.35, textWidth);
FlarialGUI::TextBoxVisual(5, settings.getSettingByName<std::string>("nick")->value, 16, toggleX, toggleY);
const float scrollviewWidth = Constraints::RelativeConstraint(0.12, "height", true);


FlarialGUI::ScrollBar(x, y, 140, Constraints::SpacingConstraint(5.5, scrollviewWidth), 2);
FlarialGUI::SetScrollView(x, Constraints::PercentageConstraint(0.00, "top"),
Constraints::RelativeConstraint(1.0, "width"),
Constraints::RelativeConstraint(0.88f, "height"));

this->addHeader("Misc");
this->addTextBox("Nickname", "", settings.getSettingByName<std::string>("nick")->value);
FlarialGUI::UnsetScrollView();

this->resetPadding();
}
};
41 changes: 12 additions & 29 deletions src/Client/Module/Modules/PaperDoll/PaperDoll.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -45,43 +45,26 @@ class PaperDoll : public Module {

void settingsRender() override {

/* Border Start */

float x = Constraints::PercentageConstraint(0.019, "left");
float y = Constraints::PercentageConstraint(0.10, "top");

const float scrollviewWidth = Constraints::RelativeConstraint(0.12, "height", true);

float toggleX = Constraints::PercentageConstraint(0.019, "left");
float toggleY = Constraints::PercentageConstraint(0.10, "top");

const float textWidth = Constraints::RelativeConstraint(0.12, "height", true);
const float textHeight = Constraints::RelativeConstraint(0.029, "height", true);
FlarialGUI::ScrollBar(x, y, 140, Constraints::SpacingConstraint(5.5, scrollviewWidth), 2);
FlarialGUI::SetScrollView(x, Constraints::PercentageConstraint(0.00, "top"),
Constraints::RelativeConstraint(1.0, "width"),
Constraints::RelativeConstraint(0.88f, "height"));

FlarialGUI::ScrollBar(toggleX, toggleY, 140, 40, 2);
FlarialGUI::SetScrollView(toggleX, toggleY, Constraints::RelativeConstraint(1.0, "width"),
Constraints::RelativeConstraint(0.90, "height"));
this->addHeader("Misc");
this->addSlider("UI Scale", "", this->settings.getSettingByName<float>("uiscale")->value);

FlarialGUI::FlarialTextWithFont(toggleX, toggleY, L"UI Scale", textWidth * 6.9f,
textHeight, DWRITE_TEXT_ALIGNMENT_LEADING,
Constraints::RelativeConstraint(0.12, "height", true),
DWRITE_FONT_WEIGHT_NORMAL);
this->addToggle("Always Show", "", this->settings.getSettingByName<bool>("alwaysshow")->value);

float percent = FlarialGUI::Slider(3, toggleX + FlarialGUI::SettingsTextWidth("UI Scale "),
toggleY,
this->settings.getSettingByName<float>("uiscale")->value, 40.0f);

this->settings.getSettingByName<float>("uiscale")->value = percent;

toggleY += Constraints::SpacingConstraint(0.35, textWidth);

FlarialGUI::FlarialTextWithFont(toggleX + Constraints::SpacingConstraint(0.60, textWidth), toggleY,
L"Always Show", textWidth * 6.9f, textHeight,
DWRITE_TEXT_ALIGNMENT_LEADING, Constraints::SpacingConstraint(1.05, textWidth),
DWRITE_FONT_WEIGHT_NORMAL);
FlarialGUI::UnsetScrollView();

if (FlarialGUI::Toggle(2, toggleX, toggleY, this->settings.getSettingByName<bool>(
"alwaysshow")->value))
this->settings.getSettingByName<bool>("alwaysshow")->value = !this->settings.getSettingByName<bool>(
"alwaysshow")->value;
this->resetPadding();

FlarialGUI::UnsetScrollView();
}
};
94 changes: 16 additions & 78 deletions src/Client/Module/Modules/RenderOptions/RenderOptions.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -65,90 +65,28 @@ class RenderOptions : public Module {

void settingsRender() override {

updateSetings();

const float textWidth = Constraints::RelativeConstraint(0.12, "height", true);
const float textHeight = Constraints::RelativeConstraint(0.029, "height", true);

float toggleX = Constraints::PercentageConstraint(0.019, "left");
float toggleY = Constraints::PercentageConstraint(0.10, "top");

FlarialGUI::ScrollBar(toggleX, toggleY, 140, Constraints::SpacingConstraint(5.5, textWidth), 2);
FlarialGUI::SetScrollView(toggleX, Constraints::PercentageConstraint(0.00, "top"),
Constraints::RelativeConstraint(1.0, "width"),
Constraints::RelativeConstraint(1.0f, "height"));

FlarialGUI::FlarialTextWithFont(toggleX + Constraints::SpacingConstraint(0.60, textWidth), toggleY,
L"Chunk Borders", textWidth * 3.0f, textHeight, DWRITE_TEXT_ALIGNMENT_LEADING,
Constraints::RelativeConstraint(0.12, "height", true),
DWRITE_FONT_WEIGHT_NORMAL);

if (FlarialGUI::Toggle(1, toggleX, toggleY, this->settings.getSettingByName<bool>(
"chunkborders")->value))
this->settings.getSettingByName<bool>("chunkborders")->value = !this->settings.getSettingByName<bool>(
"chunkborders")->value;

toggleY += Constraints::SpacingConstraint(0.35, textWidth);

FlarialGUI::FlarialTextWithFont(toggleX + Constraints::SpacingConstraint(0.60, textWidth), toggleY,
L"Render Sky", textWidth * 3.0f, textHeight, DWRITE_TEXT_ALIGNMENT_LEADING,
Constraints::RelativeConstraint(0.12, "height", true),
DWRITE_FONT_WEIGHT_NORMAL);

if (FlarialGUI::Toggle(2, toggleX, toggleY, this->settings.getSettingByName<bool>(
"sky")->value))
this->settings.getSettingByName<bool>("sky")->value = !this->settings.getSettingByName<bool>("sky")->value;

toggleY += Constraints::SpacingConstraint(0.35, textWidth);
float x = Constraints::PercentageConstraint(0.019, "left");
float y = Constraints::PercentageConstraint(0.10, "top");

FlarialGUI::FlarialTextWithFont(toggleX + Constraints::SpacingConstraint(0.60, textWidth), toggleY,
L"Render Entities", textWidth * 3.0f, textHeight, DWRITE_TEXT_ALIGNMENT_LEADING,
Constraints::RelativeConstraint(0.12, "height", true),
DWRITE_FONT_WEIGHT_NORMAL);
const float scrollviewWidth = Constraints::RelativeConstraint(0.12, "height", true);

if (FlarialGUI::Toggle(3, toggleX, toggleY, this->settings.getSettingByName<bool>(
"entity")->value))
this->settings.getSettingByName<bool>("entity")->value = !this->settings.getSettingByName<bool>(
"entity")->value;

toggleY += Constraints::SpacingConstraint(0.35, textWidth);

FlarialGUI::FlarialTextWithFont(toggleX + Constraints::SpacingConstraint(0.60, textWidth), toggleY,
L"Render Block Entities", textWidth * 3.0f, textHeight,
DWRITE_TEXT_ALIGNMENT_LEADING,
Constraints::RelativeConstraint(0.12, "height", true),
DWRITE_FONT_WEIGHT_NORMAL);

if (FlarialGUI::Toggle(4, toggleX, toggleY, this->settings.getSettingByName<bool>(
"blockentity")->value))
this->settings.getSettingByName<bool>("blockentity")->value = !this->settings.getSettingByName<bool>(
"blockentity")->value;

toggleY += Constraints::SpacingConstraint(0.35, textWidth);

FlarialGUI::FlarialTextWithFont(toggleX + Constraints::SpacingConstraint(0.60, textWidth), toggleY,
L"Render Particles", textWidth * 3.0f, textHeight,
DWRITE_TEXT_ALIGNMENT_LEADING,
Constraints::RelativeConstraint(0.12, "height", true),
DWRITE_FONT_WEIGHT_NORMAL);

if (FlarialGUI::Toggle(5, toggleX, toggleY, this->settings.getSettingByName<bool>(
"particles")->value))
this->settings.getSettingByName<bool>("particles")->value = !this->settings.getSettingByName<bool>(
"particles")->value;

toggleY += Constraints::SpacingConstraint(0.35, textWidth);

FlarialGUI::FlarialTextWithFont(toggleX + Constraints::SpacingConstraint(0.60, textWidth), toggleY,
L"Render Weather", textWidth * 3.0f, textHeight, DWRITE_TEXT_ALIGNMENT_LEADING,
Constraints::RelativeConstraint(0.12, "height", true),
DWRITE_FONT_WEIGHT_NORMAL);
FlarialGUI::ScrollBar(x, y, 140, Constraints::SpacingConstraint(5.5, scrollviewWidth), 2);
FlarialGUI::SetScrollView(x, Constraints::PercentageConstraint(0.00, "top"),
Constraints::RelativeConstraint(1.0, "width"),
Constraints::RelativeConstraint(0.88f, "height"));

if (FlarialGUI::Toggle(6, toggleX, toggleY, this->settings.getSettingByName<bool>(
"weather")->value))
this->settings.getSettingByName<bool>("weather")->value = !this->settings.getSettingByName<bool>(
"weather")->value;
this->addHeader("Misc");
this->addToggle("Chunk Borders", "", this->settings.getSettingByName<bool>("chunkborders")->value);
this->addToggle("Sky", "", this->settings.getSettingByName<bool>("sky")->value);
this->addToggle("Render Entitie", "", this->settings.getSettingByName<bool>("entity")->value);
this->addToggle("Render Block Entities", "", this->settings.getSettingByName<bool>("blockentity")->value);
this->addToggle("Render Particles", "", this->settings.getSettingByName<bool>("particles")->value);
this->addToggle("Render Weather", "", this->settings.getSettingByName<bool>("weather")->value);

FlarialGUI::UnsetScrollView();

this->resetPadding();
}
};
20 changes: 17 additions & 3 deletions src/Client/Module/Modules/SnapLook/SnapLook.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,23 @@ class SnapLook : public Module {

void settingsRender() override {

float toggleX = Constraints::PercentageConstraint(0.019, "left");
float toggleY = Constraints::PercentageConstraint(0.10, "top");

FlarialGUI::KeybindSelector(0, toggleX, toggleY, getKeybind());
float x = Constraints::PercentageConstraint(0.019, "left");
float y = Constraints::PercentageConstraint(0.10, "top");

const float scrollviewWidth = Constraints::RelativeConstraint(0.12, "height", true);


FlarialGUI::ScrollBar(x, y, 140, Constraints::SpacingConstraint(5.5, scrollviewWidth), 2);
FlarialGUI::SetScrollView(x, Constraints::PercentageConstraint(0.00, "top"),
Constraints::RelativeConstraint(1.0, "width"),
Constraints::RelativeConstraint(0.88f, "height"));

this->addHeader("Misc");
this->addKeybind("Keybind", "", getKeybind());

FlarialGUI::UnsetScrollView();

this->resetPadding();
}
};
18 changes: 15 additions & 3 deletions src/Client/Module/Modules/Sneak/Sneak.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,23 @@ class Sneak : public Module {
}

void settingsRender() override {
float x = Constraints::PercentageConstraint(0.019, "left");
float y = Constraints::PercentageConstraint(0.10, "top");

float toggleX = Constraints::PercentageConstraint(0.019, "left");
float toggleY = Constraints::PercentageConstraint(0.10, "top");
const float scrollviewWidth = Constraints::RelativeConstraint(0.12, "height", true);

FlarialGUI::KeybindSelector(0, toggleX, toggleY, getKeybind());

FlarialGUI::ScrollBar(x, y, 140, Constraints::SpacingConstraint(5.5, scrollviewWidth), 2);
FlarialGUI::SetScrollView(x, Constraints::PercentageConstraint(0.00, "top"),
Constraints::RelativeConstraint(1.0, "width"),
Constraints::RelativeConstraint(0.88f, "height"));

this->addHeader("Misc");
this->addKeybind("Keybind", "", getKeybind());

FlarialGUI::UnsetScrollView();

this->resetPadding();

}
};
Expand Down
19 changes: 13 additions & 6 deletions src/Client/Module/Modules/TextHotkey/TextHotkey.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,17 +35,24 @@ class TextHotkey : public Module {

void settingsRender() override {

float toggleX = Constraints::PercentageConstraint(0.019, "left");
float toggleY = Constraints::PercentageConstraint(0.10, "top");
float x = Constraints::PercentageConstraint(0.019, "left");
float y = Constraints::PercentageConstraint(0.10, "top");

const float textWidth = Constraints::RelativeConstraint(0.12, "height", true);
const float scrollviewWidth = Constraints::RelativeConstraint(0.12, "height", true);

FlarialGUI::KeybindSelector(0, toggleX, toggleY, getKeybind());

toggleY += Constraints::SpacingConstraint(0.35, textWidth);
FlarialGUI::ScrollBar(x, y, 140, Constraints::SpacingConstraint(5.5, scrollviewWidth), 2);
FlarialGUI::SetScrollView(x, Constraints::PercentageConstraint(0.00, "top"),
Constraints::RelativeConstraint(1.0, "width"),
Constraints::RelativeConstraint(0.88f, "height"));

FlarialGUI::TextBoxVisual(5, settings.getSettingByName<std::string>("text")->value, 50, toggleX, toggleY);
this->addHeader("Misc");
this->addKeybind("Keybind", "There's a spam limit!", getKeybind());
this->addTextBox("Text to Send", "", settings.getSettingByName<std::string>("text")->value);

FlarialGUI::UnsetScrollView();

this->resetPadding();
}
};

Loading

0 comments on commit a90f0e0

Please sign in to comment.