Skip to content
This repository has been archived by the owner on Dec 26, 2021. It is now read-only.

Commit

Permalink
Merge pull request #4456 from FloppyDolphin57/master
Browse files Browse the repository at this point in the history
Make the rest of the client match clickgui theme
  • Loading branch information
richardletshacks authored Aug 23, 2021
2 parents e959fa7 + 271c57e commit 15dfded
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 18 deletions.
4 changes: 2 additions & 2 deletions Horion/DrawUtils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -371,7 +371,7 @@ void DrawUtils::drawNameTags(C_Entity* ent, float textSize, bool drawHealth, boo
vec4_t subRectPos = rectPos;
subRectPos.y = subRectPos.w - 1.f * textSize;
static auto nametagsMod = moduleMgr->getModule<NameTags>();
fillRectangle(rectPos, MC_Color(13, 29, 48), nametagsMod->opacity);
fillRectangle(rectPos, MC_Color(12, 12, 12), nametagsMod->opacity);
if (nametagsMod->underline) {
fillRectangle(subRectPos, MC_Color(30, 110, 20), 0.9f);
}
Expand Down Expand Up @@ -474,7 +474,7 @@ void DrawUtils::drawKeystroke(char key, const vec2_t& pos) {
vec2_t textPos(
(rectPos.x + (rectPos.z - rectPos.x) / 2) - (DrawUtils::getTextWidth(&keyString) / 2.f),
rectPos.y + 10.f - DrawUtils::getFont(Fonts::SMOOTH)->getLineHeight() / 2.f);
fillRectangle(rectPos, GameData::isKeyDown(key) ? MC_Color(28, 50, 77) : MC_Color(13, 29, 48), 1.f);
fillRectangle(rectPos, GameData::isKeyDown(key) ? MC_Color(85, 85, 85) : MC_Color(12, 12, 12), 1.f);
drawText(textPos, &keyString, MC_Color(255, 255, 255), 1.f, 1.f);
}

Expand Down
2 changes: 1 addition & 1 deletion Horion/ImmediateGui.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ void ButtonInfo::draw(vec2_t mousePos, const char* label) {
DrawUtils::fillRectangle(surface, MC_Color(28, 50, 77), 1);
this->canClickB = true;
} else {
DrawUtils::fillRectangle(surface, MC_Color(13, 29, 48), 1);
DrawUtils::fillRectangle(surface, MC_Color(12, 12, 12), 1);
this->canClickB = false;
}
}
Expand Down
4 changes: 2 additions & 2 deletions Horion/Menu/ClickGui.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -511,7 +511,7 @@ void ClickGui::renderCategory(Category category) {
// Draw Progress
{
rect.z = rect.x + value;
DrawUtils::fillRectangle(rect, MC_Color(28, 107, 201), (areWeFocused || setting->isDragging) ? 1.f : 0.8f);
DrawUtils::fillRectangle(rect, MC_Color(85, 85, 85), (areWeFocused || setting->isDragging) ? 1.f : 0.8f);
}

// Drag Logic
Expand Down Expand Up @@ -606,7 +606,7 @@ void ClickGui::renderCategory(Category category) {
// Draw Progress
{
rect.z = rect.x + value;
DrawUtils::fillRectangle(rect, MC_Color(28, 107, 201), (areWeFocused || setting->isDragging) ? 1.f : 0.8f);
DrawUtils::fillRectangle(rect, MC_Color(85, 85, 85), (areWeFocused || setting->isDragging) ? 1.f : 0.8f);
}

// Drag Logic
Expand Down
8 changes: 4 additions & 4 deletions Horion/Menu/TabGui.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ void TabGui::renderLevel() {
if (selected[renderedLevel].selectedItemId == i && level >= renderedLevel) { // We are selected
if (renderedLevel == level) { // Are we actually in the menu we are drawing right now?
// We are selected in the current menu
DrawUtils::fillRectangle(rectPos, MC_Color(13, 29, 48), 1.f);
DrawUtils::fillRectangle(rectPos, MC_Color(12, 12, 12), 1.f);
static bool lastVal = toggleCurrentSelection;

if (toggleCurrentSelection) {
Expand All @@ -114,11 +114,11 @@ void TabGui::renderLevel() {
label.mod->setEnabled(false);
lastVal = toggleCurrentSelection;
} else { // selected, but not what the user is interacting with
DrawUtils::fillRectangle(rectPos, MC_Color(13, 29, 48), 1.f);
DrawUtils::fillRectangle(rectPos, MC_Color(12, 12, 12), 1.f);
}
//selectedYOffset = yOffset;
} else { // We are not selected
DrawUtils::fillRectangle(rectPos, MC_Color(13, 29, 48), 1.f);
DrawUtils::fillRectangle(rectPos, MC_Color(12, 12, 12), 1.f);
}

std::string tempLabel(label.text);
Expand All @@ -143,7 +143,7 @@ void TabGui::renderLevel() {
selected[renderedLevel].rollback();
} else
selected[renderedLevel].rollin();
DrawUtils::fillRectangle(selectedPos, MC_Color(28, 107, 201), alphaVal);
DrawUtils::fillRectangle(selectedPos, MC_Color(85, 85, 85), alphaVal);
}

// Cleanup
Expand Down
6 changes: 3 additions & 3 deletions Horion/Module/Modules/HudModule.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ void HudModule::onPostRender(C_MinecraftUIRenderContext* renderCtx) {
std::string fpsText = "FPS: " + std::to_string(g_Data.getFPS());
vec4_t rectPos = vec4_t(2.5f, startY + 5.f * scale, len, startY + 15.f * scale);
vec2_t textPos = vec2_t(rectPos.x + 1.5f, rectPos.y + 1.f);
DrawUtils::fillRectangle(rectPos, MC_Color(13, 29, 48), 1.f);
DrawUtils::fillRectangle(rectPos, MC_Color(12, 12, 12), 1.f);
DrawUtils::drawText(textPos, &fpsText, MC_Color(200, 200, 200), scale);

startY += f;
Expand All @@ -49,7 +49,7 @@ void HudModule::onPostRender(C_MinecraftUIRenderContext* renderCtx) {
std::string cpsText = "CPS: " + std::to_string(g_Data.getLeftCPS()) + " - " + std::to_string(g_Data.getRightCPS());
vec4_t rectPos = vec4_t(2.5f, startY + 5.f * scale, len, startY + 15.f * scale);
vec2_t textPos = vec2_t(rectPos.x + 1.5f, rectPos.y + 1.f);
DrawUtils::fillRectangle(rectPos, MC_Color(13, 29, 48), 1.f);
DrawUtils::fillRectangle(rectPos, MC_Color(12, 12, 12), 1.f);
DrawUtils::drawText(textPos, &cpsText, MC_Color(200, 200, 200), scale);

startY += f;
Expand All @@ -64,7 +64,7 @@ void HudModule::onPostRender(C_MinecraftUIRenderContext* renderCtx) {
std::string coordsZ = "Z: " + std::to_string((int)floorf(pos->z));
vec4_t rectPos = vec4_t(2.5f, startY + 5.f * scale, len, startY + 35.f * scale);
vec2_t textPos = vec2_t(rectPos.x + 1.5f, rectPos.y + 1.f);
DrawUtils::fillRectangle(rectPos, MC_Color(13, 29, 48), 1.f);
DrawUtils::fillRectangle(rectPos, MC_Color(12, 12, 12), 1.f);
DrawUtils::drawText(textPos, &coordsX, MC_Color(200, 200, 200), scale);
textPos.y += f;
DrawUtils::drawText(textPos, &coordsY, MC_Color(200, 200, 200), scale);
Expand Down
12 changes: 6 additions & 6 deletions Memory/Hooks.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -661,10 +661,10 @@ __int64 Hooks::RenderText(__int64 a1, C_MinecraftUIRenderContext* renderCtx) {
windowSize.x - margin + borderPadding,
windowSize.y - margin);

DrawUtils::drawRectangle(rect, MC_Color(13, 29, 48), 1.f, 2.f);
DrawUtils::fillRectangle(rect, MC_Color(rcolors), 1.f);
DrawUtils::drawText(vec2_t(rect.x + borderPadding, rect.y), &name, MC_Color(6, 15, 24), nameTextSize);
DrawUtils::drawText(vec2_t(rect.x + borderPadding + nameLength, rect.w - 7), &version, MC_Color(0, 0, 0), versionTextSize);
DrawUtils::drawRectangle(rect, MC_Color(rcolors), 1.f, 2.f);
DrawUtils::fillRectangle(rect, MC_Color(12, 12, 12), 1.f);
DrawUtils::drawText(vec2_t(rect.x + borderPadding, rect.y), &name, MC_Color(rcolors), nameTextSize);
DrawUtils::drawText(vec2_t(rect.x + borderPadding + nameLength, rect.w - 7), &version, MC_Color(rcolors), versionTextSize);
}

// Draw ArrayList
Expand Down Expand Up @@ -790,7 +790,7 @@ __int64 Hooks::RenderText(__int64 a1, C_MinecraftUIRenderContext* renderCtx) {
currColor[0] += 1.f / a * c;
Utils::ColorConvertHSVtoRGB(currColor[0], currColor[1], currColor[2], currColor[0], currColor[1], currColor[2]);

DrawUtils::fillRectangle(rectPos, MC_Color(13, 29, 48), 1.f);
DrawUtils::fillRectangle(rectPos, MC_Color(12, 12, 12), 1.f);
DrawUtils::fillRectangle(leftRect, MC_Color(currColor), 1.f);
if (!GameData::canUseMoveKeys() && rectPos.contains(&mousePos) && hudModule->clickToggle) {
vec4_t selectedRect = rectPos;
Expand Down Expand Up @@ -865,7 +865,7 @@ __int64 Hooks::RenderText(__int64 a1, C_MinecraftUIRenderContext* renderCtx) {
centerPos.y - paddingVert,
centerPos.x + paddingHoriz + std::max(titleWidth, msgWidth) / 2,
centerPos.y + paddingVert * 2 + titleTextHeight + messageHeight * lines);
DrawUtils::fillRectangle(rectPos, MC_Color(13, 29, 48), box->fadeVal);
DrawUtils::fillRectangle(rectPos, MC_Color(12, 12, 12), box->fadeVal);
DrawUtils::drawRectangle(rectPos, rcolors, box->fadeVal, 2.f);
DrawUtils::drawText(textPos, &box->title, MC_Color(), titleTextSize, box->fadeVal);
DrawUtils::drawText(msgPos, &box->message, MC_Color(), messageTextSize, box->fadeVal);
Expand Down

0 comments on commit 15dfded

Please sign in to comment.