Skip to content

Commit 02c3a15

Browse files
committed
Slight modifications to Movable chat (it does not work yet)
1 parent c707bc6 commit 02c3a15

File tree

3 files changed

+9
-6
lines changed

3 files changed

+9
-6
lines changed

src/Client/Module/Manager.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@
5959
#include "Modules/NoHurtCam/NoHurtCam.hpp"
6060
#include "Modules/CommandHotkey/CommandHotkey.hpp"
6161
#include "Modules/Misc/DiscordRPC/DiscordRPCListener.hpp"
62+
#include "Modules/MovableChat/MovableChat.hpp"
6263
#include <algorithm>
6364

6465
namespace ModuleManager {

src/Client/Module/Modules/MovableChat/MovableChat.hpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@ class MovableChat : public Module {
2929
if (settings.getSettingByName<float>("uiscale") == nullptr) settings.addSetting("uiscale", 21.0f);
3030
if (settings.getSettingByName<float>("percentageX") == nullptr) {
3131
settings.addSetting("percentageX", 0.0f);
32+
}
33+
if (settings.getSettingByName<float>("percentageY") == nullptr) {
3234
settings.addSetting("percentageY", 0.0f);
3335
}
3436
if (settings.getSettingByName<bool>("vertical") == nullptr) settings.addSetting("vertical", false);

src/Client/Module/Modules/MovableChat/MovableChatListener.hpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ class MovableChatListener : public Listener {
4343
ClientInstance::getTopScreenName() == "pause_screen" &&
4444
module->isEnabled()) {
4545

46-
if (!enabled && ModuleManager::getModule("ClickGUI")->isEnabled()) {
46+
if (!enabled && FlarialGUI::inMenu) {
4747
FlarialGUI::Notify("To change the position of the chat, Please click " +
4848
ModuleManager::getModule("ClickGUI")->settings.getSettingByName<std::string>(
4949
"editmenubind")->value);
@@ -66,9 +66,9 @@ class MovableChatListener : public Listener {
6666
currentPos = Vec2<float>{MovableChatListener::oriXy.x, MovableChatListener::oriXy.y};
6767

6868
if (ClickGUIRenderer::editmenu)
69-
FlarialGUI::SetWindowRect(currentPos.x, currentPos.y, width, height, 20);
69+
FlarialGUI::SetWindowRect(currentPos.x, currentPos.y, width, height, 21);
7070

71-
Vec2<float> vec2 = FlarialGUI::CalculateMovedXY(currentPos.x, currentPos.y, 20, width, height);
71+
Vec2<float> vec2 = FlarialGUI::CalculateMovedXY(currentPos.x, currentPos.y, 21, width, height);
7272

7373

7474
currentPos.x = vec2.x;
@@ -79,10 +79,10 @@ class MovableChatListener : public Listener {
7979
module->settings.setValue("percentageX", percentages.x);
8080
module->settings.setValue("percentageY", percentages.y);
8181

82-
FlarialGUI::RoundedRect(currentPos.x, currentPos.y, D2D1::ColorF(D2D1::ColorF::White, 0.4f), width, height);
83-
84-
if (ClickGUIRenderer::editmenu)
82+
if (ClickGUIRenderer::editmenu) {
83+
FlarialGUI::RoundedRect(currentPos.x, currentPos.y, D2D1::ColorF(D2D1::ColorF::White, 0.2f), width, height);
8584
FlarialGUI::UnsetWindowRect();
85+
}
8686
} else {
8787
enabled = false;
8888
}

0 commit comments

Comments
 (0)