Skip to content

Commit 75dff2d

Browse files
committed
Fix some minor things
1 parent 5d6b5dd commit 75dff2d

File tree

6 files changed

+32
-22
lines changed

6 files changed

+32
-22
lines changed

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1-
build/
1+
build/
2+
.DS_store

about.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Crystal
2-
The **biggest** mod client for Mac. Comes with a very accurate macro bot called **Amethyst** and 80+ new mods and features, all organized in an easy to use dropdown GUI.
2+
The **biggest** mod client for Mac and Windows. Comes with a very accurate macro bot called **Amethyst** and 90+ new mods and features, all organized in an easy to use dropdown GUI.
33

44
Click TAB to open and close the mod menu.
55

@@ -9,7 +9,7 @@ If you need any help with Crystal, want to suggest some upcoming features, or wa
99
## Special Thanks
1010
**Nosu:** contributed a lot of her ideas and mods.
1111
**Isakube:** for being the best accidental admin of my server.
12-
**Mat (matcool/mat.4):** for providing the code for some mods, and for the ImGui library.
12+
**Mat (matcool/mat.4):** for providing the code for some mods, for fixing the client for windows, and for the ImGui library.
1313
**Camila (camila314):** for being amazing and very helpful.
1414
**YourInnerDemons**, for making a lot of the logos and art and the trailer.
1515
**Seaze/SeazeIsCool, InkZie, tallen_suired, nomn, and nadire/Zen1th**, for beta testing.

mod.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
{
22
"geode": "1.0.0",
3-
"version": "v4.0.0",
3+
"version": "v4.0.1",
44
"id": "ninxout.crystalclient",
55
"name": "Crystal Client",
66
"developer": "ninXout",
7-
"description": "Premium MacOS Modded Client",
7+
"description": "Premium Cross-Platform Modded Client",
88
"resources": {
99
"files": [
1010
"resources/Lexend.ttf"

src/CrystalClient/CrystalClient.cpp

Lines changed: 20 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,22 @@ void CrystalClient::ImToggleable(const char* str_id, bool* v, std::string toolti
2929
ImVec2 p = ImGui::GetCursorScreenPos();
3030
ImDrawList* draw_list = ImGui::GetWindowDrawList();
3131

32+
bool no_win = (tooltip == "This mod is not available for Windows");
33+
34+
ImVec4 regularColor;
35+
if (no_win) {
36+
regularColor = ImVec4(0.85f, 0.85f, 0.85f, 0.1f);
37+
} else {
38+
regularColor = *v ? colors[ImGuiCol_Button] : ImVec4(0.85f, 0.85f, 0.85f, 1.0f);
39+
}
40+
41+
ImVec4 activeColor;
42+
if (no_win) {
43+
activeColor = ImVec4(0.85f, 0.85f, 0.85f, 0.1f);
44+
} else {
45+
activeColor = *v ? colors[ImGuiCol_ButtonActive] : ImVec4(0.78f, 0.78f, 0.78f, 1.0f);
46+
}
47+
3248
float height = ImGui::GetFrameHeight();
3349
float width = height * 1.55f;
3450
float radius = height * 0.50f;
@@ -38,22 +54,18 @@ void CrystalClient::ImToggleable(const char* str_id, bool* v, std::string toolti
3854
ImGui::SetItemAllowOverlap();
3955
ImGui::SameLine();
4056
ImGui::SetCursorScreenPos(ImVec2(p.x + 10, p.y));
41-
ImGui::TextColored(*v ? colors[ImGuiCol_Button] : ImVec4(0.85f, 0.85f, 0.85f, 1.0f), "%s", str_id);
42-
if (ImGui::IsItemClicked()) *v = !*v;
57+
ImGui::TextColored(regularColor, "%s", str_id);
58+
if (ImGui::IsItemClicked() && !no_win) *v = !*v;
4359
ImGuiContext& gg = *GImGui;
4460
float ANIM_SPEED = 0.085f;
4561
if (gg.LastActiveId == gg.CurrentWindow->GetID(str_id))// && g.LastActiveIdTimer < ANIM_SPEED)
4662
float t_anim = ImSaturate(gg.LastActiveIdTimer / ANIM_SPEED);
4763
if (ImGui::IsItemHovered()) {
4864
if (tooltip != "N/A") ImGui::SetTooltip("%s", tooltip.c_str());
49-
draw_list->AddRectFilled(p, ImVec2(p.x + width * 0.1, p.y + height), ImGui::GetColorU32(*v ? colors[ImGuiCol_ButtonActive] : ImVec4(0.78f, 0.78f, 0.78f, 1.0f)), height * rounding);
65+
draw_list->AddRectFilled(p, ImVec2(p.x + width * 0.1, p.y + height), ImGui::GetColorU32(activeColor), height * rounding);
5066
} else {
51-
draw_list->AddRectFilled(p, ImVec2(p.x + width * 0.1, p.y + height), ImGui::GetColorU32(*v ? colors[ImGuiCol_Button] : ImVec4(0.85f, 0.85f, 0.85f, 1.0f)), height * rounding);
67+
draw_list->AddRectFilled(p, ImVec2(p.x + width * 0.1, p.y + height), ImGui::GetColorU32(regularColor), height * rounding);
5268
}
53-
54-
ImVec2 center = ImVec2(radius + (*v ? 1 : 0) * (width - radius * 2.0f), radius);
55-
//draw_list->AddRectFilled(ImVec2((p.x + center.x) - 9.0f, p.y + 1.5f),
56-
//ImVec2((p.x + (width / 2) + center.x) - 9.0f, p.y + height - 1.5f), IM_COL32(255, 255, 255, 255), height * rounding);
5769
}
5870

5971
void CrystalClient::ImExtendedToggleable(const char* str_id, bool* v, std::string tooltip) {

src/CrystalProfile.hpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,9 @@ inline std::map<std::string, std::string> modsMapS = {};
5353

5454
inline std::map<std::string, bool> TEMPmodsMapB = {};
5555
inline std::map<std::string, int> TEMPmodsMapI = {};
56-
inline std::map<std::string, float> TEMPmodsMapF = {};
56+
inline std::map<std::string, float> TEMPmodsMapF = {
57+
{"target_DT", 0.01666666666f}
58+
};
5759

5860
template <typename T>
5961
T getVar(std::string const& key);

src/main.cpp

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -354,7 +354,7 @@ void CrystalClient::drawGUI() {
354354
}
355355
CrystalClient::ImToggleable("Window Borders", setVar<bool>("border"));
356356
CrystalClient::ImToggleable("Force Manual Positioning", setVar<bool>("manual_positioning"), "Stops rearranging the windows whenever you open the game");
357-
if (ImGui::Button("Rearrange Windows")) *setTempVar<int>("should-sort-windows") = 3;
357+
//if (ImGui::Button("Rearrange Windows")) *setTempVar<int>("should-sort-windows") = 3;
358358
windowPreEnd();
359359
ImGui::End();
360360
windowPreBegin(sortIndex);
@@ -490,6 +490,7 @@ void CrystalClient::drawGUI() {
490490
}
491491
windowPreEnd();
492492
ImGui::End();
493+
/*
493494
windowPreBegin(sortIndex);
494495
ImGui::Begin("Internal Renderer", NULL, window_flags);
495496
CrystalClient::ImToggleable("Render Recording", setVar<bool>("AT_render"));
@@ -503,6 +504,7 @@ void CrystalClient::drawGUI() {
503504
windowPreEnd();
504505
ImGui::End();
505506
windowPreBegin(sortIndex);
507+
*/
506508
ImGui::Begin("Screenshots", NULL, window_flags);
507509
//CrystalClient::ImToggleable("Include Players", setVar<bool>("SS_players"));
508510
CrystalClient::ImToggleable("Include Displays", setVar<bool>("SS_displays"), "Include Display texts in your Screenshot");
@@ -591,13 +593,6 @@ class $modify(MenuLayer) {
591593
ghc::filesystem::create_directory(betterBG);
592594
}
593595

594-
#ifdef GEODE_IS_MACOS
595-
std::string renderInit = "chmod +x " + geode::Mod::get()->getConfigDir() / "Amethyst" / "Renderer" / "ffmpeg".string();
596-
system(renderInit.c_str());
597-
std::string pathInit = "export PATH='" + Mod::get()->getConfigDir() / "Amethyst" / "Renderer".string() + ":${PATH}'";
598-
system(pathInit.c_str());
599-
#endif
600-
601596
if (!MenuLayer::init()) return false;
602597

603598
std::fstream input(geode::Mod::get()->getConfigDir().append("Config").append("GH_config-01.json"));

0 commit comments

Comments
 (0)