Skip to content
This repository has been archived by the owner on May 20, 2023. It is now read-only.

Commit

Permalink
v1.2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Imrglop committed Feb 3, 2021
1 parent bd872ac commit 5e1cfd2
Show file tree
Hide file tree
Showing 17 changed files with 184 additions and 29 deletions.
108 changes: 105 additions & 3 deletions Latite/LatiteForm.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

24 changes: 19 additions & 5 deletions Latite/LatiteForm.cs
Original file line number Diff line number Diff line change
Expand Up @@ -106,9 +106,9 @@ private void ConnectToMc(bool show = true)
}
} catch (DllNotFoundException e)
{
var Result = MessageBox.Show("Could not connect! You may be missing LatiteCore.dll", "Error", MessageBoxButtons.RetryCancel, MessageBoxIcon.Hand);
Coutln("DllNotFoundException occured while attempting to import LatiteCore.dll");
Coutln("Error: " + e.ToString() + "\nStacktrace: " + e.StackTrace);
var Result = MessageBox.Show("Could not connect! You may be missing LatiteCore.dll.\nPlease make sure you have Microsoft Visual C++ 2019 installed.", "Error", MessageBoxButtons.RetryCancel, MessageBoxIcon.Hand);
Coutln("DllNotFoundException occured while attempting to import LatiteCore.dll, or any of the dependancies!\nPlease make sure you have Microsoft Visual C++ 2019 installed.");
Coutln("Error: " + e.ToString());
if (Result == DialogResult.Retry)
{
ConnectToMc();
Expand Down Expand Up @@ -278,7 +278,8 @@ private void LatiteForm_Load(object sender, EventArgs e)

private void transparentOverlayToggle_CheckedChanged(object sender, EventArgs e)
{
this.OverlayForm.TransparentPanels(transparentOverlayToggle.Checked); ;
if (connectedToMinecraft())
this.OverlayForm.TransparentPanels(transparentOverlayToggle.Checked); ;
}

private void launchButton_Click(object sender, EventArgs e)
Expand All @@ -305,6 +306,7 @@ private void lookBehindBind_TextChanged(object sender, EventArgs e)

private void opacitySlider_Scroll(object sender, EventArgs e)
{
if (!connectedToMinecraft()) return;
double val = opacitySlider.Value * 4;
opacityDisplayLabel.Text = (opacitySlider.Value * 4) + "";
this.OverlayForm.SetOpacity(val / 100);
Expand All @@ -323,6 +325,7 @@ private void toggleSprintBind_TextChanged(object sender, EventArgs e)

private void UpdateGUIPositions()
{
if (!connectedToMinecraft()) return;
if (rbTopLeftKeystrokes.Checked)
{
this.OverlayForm.UpdatePanelPos(0);
Expand Down Expand Up @@ -354,7 +357,8 @@ private void rbBottomLeftKeystrokes_CheckedChanged(object sender, EventArgs e)

private void posDisplayCheckBox_CheckedChanged(object sender, EventArgs e)
{
this.OverlayForm.SetGuiDisplay(0, posDisplayCheck.Checked);
if (connectedToMinecraft())
this.OverlayForm.SetGuiDisplay(0, posDisplayCheck.Checked);
}

private void checkBox1_CheckedChanged(object sender, EventArgs e)
Expand All @@ -370,5 +374,15 @@ private void timeChangerTrackBar_Scroll(object sender, EventArgs e)
int Val = timeChangerTrackBar.Value * 2500;
timeChangerTrackBarLabel.Text = Val + "";
}

private void GithubButton_Click(object sender, EventArgs e)
{
System.Diagnostics.Process.Start("https://github.com/Imrglop/Latite");
}

private void updateButton_Click(object sender, EventArgs e)
{
System.Diagnostics.Process.Start("https://github.com/Imrglop/Latite/releases/latest");
}
}
}
2 changes: 1 addition & 1 deletion Latite/LatiteForm.resx
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@
<value>17, 17</value>
</metadata>
<metadata name="$this.TrayHeight" type="System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>63</value>
<value>57</value>
</metadata>
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
Expand Down
2 changes: 2 additions & 0 deletions Latite/Overlay.cs
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,8 @@ public void UpdatePanelPos(int Keystrokes)
panel1.Anchor = DefaultAnchor;
break;
case 1:
this.latiteForm.Coutln("setting to topright\n");
panel1.Location = new Point(this.Size.Width - panel1.Size.Width, panel1.Location.Y);
panel1.Anchor = TopRightAnchor;
break;
}
Expand Down
2 changes: 1 addition & 1 deletion LatiteCore/Config/servers.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
# That will disable both toggle sprint and zoom
# in a Minecraft server called example.com

play.nethergames.org=toggle_sprint
play.nethergames.org=toggle_sprint,time_changer

! --------------------------------------------
# If you want a server added here by default,
Expand Down
7 changes: 5 additions & 2 deletions LatiteCore/LatiteCore.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@
<ClInclude Include="memory.h" />
<ClInclude Include="Mods\ModManager.h" />
<ClInclude Include="Mods\Zoom.h" />
<ClInclude Include="SA_utils.hh" />
<ClInclude Include="SA_utils.hpp" />
<ClInclude Include="server_mod_disabler.h" />
<ClInclude Include="TimeChanger.h" />
<ClInclude Include="ToggleSprint.h" />
Expand All @@ -176,7 +176,10 @@
<ClCompile Include="ToggleSprint.cpp" />
</ItemGroup>
<ItemGroup>
<None Include="Config\servers.txt" />
<None Include="Config\readme.txt" />
</ItemGroup>
<ItemGroup>
<Text Include="info.txt" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
Expand Down
13 changes: 9 additions & 4 deletions LatiteCore/LatiteCore.vcxproj.filters
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,10 @@
<ClInclude Include="server_mod_disabler.h">
<Filter>Source Files\Tools</Filter>
</ClInclude>
<ClInclude Include="SA_utils.hh">
<Filter>Source Files\Tools</Filter>
</ClInclude>
<ClInclude Include="Mods\Zoom.h">
<Filter>Source Files\Mods</Filter>
</ClInclude>
<ClInclude Include="SA_utils.hpp">
<Filter>Source Files\Tools</Filter>
</ClInclude>
</ItemGroup>
Expand Down Expand Up @@ -91,7 +91,12 @@
</ClCompile>
</ItemGroup>
<ItemGroup>
<None Include="Config\servers.txt">
<Text Include="info.txt">
<Filter>Source Files\Config</Filter>
</Text>
</ItemGroup>
<ItemGroup>
<None Include="Config\readme.txt">
<Filter>Source Files\Config</Filter>
</None>
</ItemGroup>
Expand Down
8 changes: 5 additions & 3 deletions LatiteCore/LookBehind.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#include "LookBehind.h"
#include "LocalPlayer.h"
#include "dllmain.h"
#include "server_mod_disabler.h"

char lbBind_;
unsigned char oldView;
Expand All @@ -9,13 +10,14 @@ bool lbKeyPressed = false;

void lookBehind()
{
LocalPlayer::setPerspective(2);
if (moduleDisabledOnServer(LocalPlayer::getServer(), "look_behind")) return;
LocalPlayer::setPerspective(2ui8);
}

void goBack()
{
if (oldView != 2) // small optimization
LocalPlayer::setPerspective(oldView);
if (!moduleDisabledOnServer(LocalPlayer::getServer(), "look_behind"))
LocalPlayer::setPerspective(0ui8);
}

void LookBehind::setBind(char b)
Expand Down
Loading

0 comments on commit 5e1cfd2

Please sign in to comment.