Skip to content

Commit 7132abd

Browse files
committed
Removed support for SHVDN2 (closes #48)
1 parent 21b0b5b commit 7132abd

20 files changed

+42
-165
lines changed

LemonUI.SHVDN2/LemonUI.SHVDN2.csproj

Lines changed: 0 additions & 37 deletions
This file was deleted.

LemonUI.sln

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,6 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LemonUI.SHVDN3", "LemonUI.S
77
EndProject
88
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LemonUI.FiveM", "LemonUI.FiveM\LemonUI.FiveM.csproj", "{7BECDA26-5F85-41C3-BA63-6101BADE057F}"
99
EndProject
10-
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LemonUI.SHVDN2", "LemonUI.SHVDN2\LemonUI.SHVDN2.csproj", "{B615FF57-A367-4748-8326-66FCBBC48DC0}"
11-
EndProject
1210
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LemonUI.RagePluginHook", "LemonUI.RagePluginHook\LemonUI.RagePluginHook.csproj", "{486A05C4-8AE6-4DC1-B0B3-7B0D2E4792D5}"
1311
EndProject
1412
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "LemonUI.SHV", "LemonUI.SHV\LemonUI.SHV.vcxproj", "{094037E8-3B14-45C0-B03C-A0C591B2F3AF}"
@@ -29,10 +27,6 @@ Global
2927
{7BECDA26-5F85-41C3-BA63-6101BADE057F}.Debug|Any CPU.Build.0 = Debug|Any CPU
3028
{7BECDA26-5F85-41C3-BA63-6101BADE057F}.Release|Any CPU.ActiveCfg = Release|Any CPU
3129
{7BECDA26-5F85-41C3-BA63-6101BADE057F}.Release|Any CPU.Build.0 = Release|Any CPU
32-
{B615FF57-A367-4748-8326-66FCBBC48DC0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
33-
{B615FF57-A367-4748-8326-66FCBBC48DC0}.Debug|Any CPU.Build.0 = Debug|Any CPU
34-
{B615FF57-A367-4748-8326-66FCBBC48DC0}.Release|Any CPU.ActiveCfg = Release|Any CPU
35-
{B615FF57-A367-4748-8326-66FCBBC48DC0}.Release|Any CPU.Build.0 = Release|Any CPU
3630
{486A05C4-8AE6-4DC1-B0B3-7B0D2E4792D5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
3731
{486A05C4-8AE6-4DC1-B0B3-7B0D2E4792D5}.Debug|Any CPU.Build.0 = Debug|Any CPU
3832
{486A05C4-8AE6-4DC1-B0B3-7B0D2E4792D5}.Release|Any CPU.ActiveCfg = Release|Any CPU

LemonUI/Controls.cs

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
#elif RPH
77
using Rage.Native;
88
using Control = Rage.GameControl;
9-
#elif (SHVDN2 || SHVDN3)
9+
#elif SHVDN3
1010
using GTA;
1111
using GTA.Native;
1212
#endif
@@ -32,8 +32,6 @@ public static bool IsUsingController
3232
return !Invoker.Invoke<bool>(Natives.IsInputDisabled, 2);
3333
#elif RPH
3434
return !NativeFunction.CallByHash<bool>(0xA571D46727E2B718, 2);
35-
#elif SHVDN2
36-
return !Function.Call<bool>(Hash._GET_LAST_INPUT_METHOD, 2);
3735
#elif SHVDN3
3836
return !Function.Call<bool>(Hash._IS_INPUT_DISABLED, 2);
3937
#endif
@@ -53,7 +51,7 @@ public static bool IsJustPressed(Control control)
5351
return Invoker.Invoke<bool>(Natives.IsDisabledControlJustPressed, 0, (int)control);
5452
#elif RPH
5553
return NativeFunction.CallByHash<bool>(0x91AEF906BCA88877, 0, (int)control);
56-
#elif (SHVDN2 || SHVDN3)
54+
#elif SHVDN3
5755
return Function.Call<bool>(Hash.IS_DISABLED_CONTROL_JUST_PRESSED, 0, (int)control);
5856
#endif
5957
}
@@ -71,7 +69,7 @@ public static bool IsPressed(Control control)
7169
return Invoker.Invoke<bool>(Natives.IsDisabledControlJustPressed, 0, (int)control);
7270
#elif RPH
7371
return NativeFunction.CallByHash<bool>(0xE2587F8CBBD87B1D, 0, (int)control);
74-
#elif (SHVDN2 || SHVDN3)
72+
#elif SHVDN3
7573
return Function.Call<bool>(Hash.IS_DISABLED_CONTROL_PRESSED, 0, (int)control);
7674
#endif
7775
}
@@ -87,7 +85,7 @@ public static void DisableAll(int inputGroup = 0)
8785
Invoker.Invoke(Natives.DisableAllControlActions, inputGroup);
8886
#elif RPH
8987
NativeFunction.CallByHash<int>(0x5F4B6931816E599B, inputGroup);
90-
#elif (SHVDN2 || SHVDN3)
88+
#elif SHVDN3
9189
Function.Call(Hash.DISABLE_ALL_CONTROL_ACTIONS, inputGroup);
9290
#endif
9391
}
@@ -104,7 +102,7 @@ public static void EnableThisFrame(Control control)
104102
Invoker.Invoke(Natives.EnableControlAction, 0, (int)control, true);
105103
#elif RPH
106104
NativeFunction.CallByHash<int>(0x351220255D64C155, 0, (int)control);
107-
#elif (SHVDN2 || SHVDN3)
105+
#elif SHVDN3
108106
Function.Call(Hash.ENABLE_CONTROL_ACTION, 0, (int)control);
109107
#endif
110108
}
@@ -132,7 +130,7 @@ public static void DisableThisFrame(Control control)
132130
Invoker.Invoke(Natives.DisableControlAction, 0, (int)control, true);
133131
#elif RPH
134132
NativeFunction.CallByHash<int>(0xFE99B66D079CF6BC, 0, (int)control, true);
135-
#elif (SHVDN2 || SHVDN3)
133+
#elif SHVDN3
136134
Function.Call(Hash.DISABLE_CONTROL_ACTION, 0, (int)control, true);
137135
#endif
138136
}

LemonUI/Elements/Alignment.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#if (SHVDN2 || RPH)
1+
#if RPH
22
namespace LemonUI
33
{
44
/// <summary>

LemonUI/Elements/IText.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@
33
using Font = CitizenFX.Core.UI.Font;
44
#elif RAGEMP
55
using RAGE.Game;
6-
#elif SHVDN2
7-
using Font = GTA.Font;
86
#elif SHVDN3
97
using Alignment = GTA.UI.Alignment;
108
using Font = GTA.UI.Font;

LemonUI/Elements/ScaledRectangle.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
using RAGE.Game;
55
#elif RPH
66
using Rage.Native;
7-
#elif (SHVDN2 || SHVDN3)
7+
#elif SHVDN3
88
using GTA.Native;
99
#endif
1010
using System.Drawing;
@@ -46,7 +46,7 @@ public override void Draw()
4646
Invoker.Invoke(Natives.DrawRect, relativePosition.X, relativePosition.Y, relativeSize.Width, relativeSize.Height, Color.R, Color.G, Color.B, Color.A);
4747
#elif RPH
4848
NativeFunction.CallByHash<int>(0x3A618A217E5154F0, relativePosition.X, relativePosition.Y, relativeSize.Width, relativeSize.Height, Color.R, Color.G, Color.B, Color.A);
49-
#elif (SHVDN2 || SHVDN3)
49+
#elif SHVDN3
5050
Function.Call(Hash.DRAW_RECT, relativePosition.X, relativePosition.Y, relativeSize.Width, relativeSize.Height, Color.R, Color.G, Color.B, Color.A);
5151
#endif
5252
}

LemonUI/Elements/ScaledText.cs

Lines changed: 3 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,6 @@
66
using RAGE.Game;
77
#elif RPH
88
using Rage.Native;
9-
#elif SHVDN2
10-
using GTA;
11-
using GTA.Native;
12-
using Font = GTA.Font;
139
#elif SHVDN3
1410
using GTA.UI;
1511
using GTA.Native;
@@ -161,10 +157,6 @@ public float Width
161157
NativeFunction.CallByHash<int>(0x54CE8AC98E120CAB, "CELL_EMAIL_BCON");
162158
Add();
163159
return NativeFunction.CallByHash<float>(0x85F061DA64ED2F67, true) * 1f.ToXAbsolute();
164-
#elif SHVDN2
165-
Function.Call(Hash._SET_TEXT_ENTRY_FOR_WIDTH, "CELL_EMAIL_BCON");
166-
Add();
167-
return Function.Call<float>(Hash._GET_TEXT_SCREEN_WIDTH, true) * 1f.ToXAbsolute();
168160
#elif SHVDN3
169161
Function.Call(Hash._BEGIN_TEXT_COMMAND_GET_WIDTH, "CELL_EMAIL_BCON");
170162
Add();
@@ -185,8 +177,6 @@ public int LineCount
185177
Invoker.Invoke(Natives.BeginTextCommandLineCount, "CELL_EMAIL_BCON");
186178
#elif RPH
187179
NativeFunction.CallByHash<int>(0x521FB041D93DD0E4, "CELL_EMAIL_BCON");
188-
#elif SHVDN2
189-
Function.Call(Hash._SET_TEXT_GXT_ENTRY, "CELL_EMAIL_BCON");
190180
#elif SHVDN3
191181
Function.Call(Hash._BEGIN_TEXT_COMMAND_LINE_COUNT, "CELL_EMAIL_BCON");
192182
#endif
@@ -197,8 +187,6 @@ public int LineCount
197187
return Invoker.Invoke<int>(Natives.EndTextCommandGetLineCount, relativePosition.X, relativePosition.Y);
198188
#elif RPH
199189
return NativeFunction.CallByHash<int>(0x9040DFB09BE75706, relativePosition.X, relativePosition.Y);
200-
#elif SHVDN2
201-
return Function.Call<int>(Hash._0x9040DFB09BE75706, relativePosition.X, relativePosition.Y);
202190
#elif SHVDN3
203191
return Function.Call<int>(Hash._END_TEXT_COMMAND_LINE_COUNT, relativePosition.X, relativePosition.Y);
204192
#endif
@@ -218,8 +206,6 @@ public float LineHeight
218206
return 1080 * Invoker.Invoke<float>(Natives.GetTextScaleHeight, Scale, (int)Font);
219207
#elif RPH
220208
return 1080 * NativeFunction.CallByHash<float>(0xDB88A37483346780, Scale, (int)Font);
221-
#elif SHVDN2
222-
return 1080 * Function.Call<float>(Hash._0xDB88A37483346780, Scale, (int)Font);
223209
#elif SHVDN3
224210
return 1080 * Function.Call<float>(Hash._GET_TEXT_SCALE_HEIGHT, Scale, (int)Font);
225211
#endif
@@ -385,7 +371,7 @@ private void Add()
385371
{
386372
NativeFunction.CallByHash<int>(0x63145D9C883A1A70, 0f, relativePosition.X);
387373
}
388-
#elif (SHVDN2 || SHVDN3)
374+
#elif SHVDN3
389375
foreach (string chunk in chunks)
390376
{
391377
Function.Call((Hash)0x6C188BE134E074AA, chunk); // _ADD_TEXT_COMPONENT_STRING on v2, ADD_TEXT_COMPONENT_SUBSTRING_PLAYER_NAME on v3
@@ -498,7 +484,7 @@ public void Draw()
498484
Invoker.Invoke(Natives.BeginTextCommandDisplayText, "CELL_EMAIL_BCON");
499485
#elif RPH
500486
NativeFunction.CallByHash<int>(0x25FBB336DF1804CB, "CELL_EMAIL_BCON");
501-
#elif (SHVDN2 || SHVDN3)
487+
#elif SHVDN3
502488
Function.Call((Hash)0x25FBB336DF1804CB, "CELL_EMAIL_BCON"); // _SET_TEXT_ENTRY on v2, BEGIN_TEXT_COMMAND_DISPLAY_TEXT on v3
503489
#endif
504490

@@ -510,7 +496,7 @@ public void Draw()
510496
Invoker.Invoke(Natives.DrawDebugText, relativePosition.X, relativePosition.Y);
511497
#elif RPH
512498
NativeFunction.CallByHash<int>(0xCD015E5BB0D96A57, relativePosition.X, relativePosition.Y);
513-
#elif (SHVDN2 || SHVDN3)
499+
#elif SHVDN3
514500
Function.Call((Hash)0xCD015E5BB0D96A57, relativePosition.X, relativePosition.Y); // _DRAW_TEXT on v2, END_TEXT_COMMAND_DISPLAY_TEXT on v3
515501
#endif
516502
}

LemonUI/Elements/ScaledTexture.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
using RAGE.Game;
55
#elif RPH
66
using Rage.Native;
7-
#elif (SHVDN2 || SHVDN3)
7+
#elif SHVDN3
88
using GTA.Native;
99
#endif
1010
using System.Drawing;
@@ -77,7 +77,7 @@ private void Request()
7777
{
7878
NativeFunction.CallByHash<int>(0xDFA2EF8E04127DD5, Dictionary, true);
7979
}
80-
#elif (SHVDN2 || SHVDN3)
80+
#elif SHVDN3
8181
if (!Function.Call<bool>(Hash.HAS_STREAMED_TEXTURE_DICT_LOADED, Dictionary))
8282
{
8383
Function.Call(Hash.REQUEST_STREAMED_TEXTURE_DICT, Dictionary, true);
@@ -105,7 +105,7 @@ public override void Draw()
105105
Invoker.Invoke(Natives.DrawSprite, Dictionary, Texture, relativePosition.X, relativePosition.Y, relativeSize.Width, relativeSize.Height, Heading, Color.R, Color.G, Color.B, Color.A);
106106
#elif RPH
107107
NativeFunction.CallByHash<int>(0xE7FFAE5EBF23D890, Dictionary, Texture, relativePosition.X, relativePosition.Y, relativeSize.Width, relativeSize.Height, Heading, Color.R, Color.G, Color.B, Color.A);
108-
#elif (SHVDN2 || SHVDN3)
108+
#elif SHVDN3
109109
Function.Call(Hash.DRAW_SPRITE, Dictionary, Texture, relativePosition.X, relativePosition.Y, relativeSize.Width, relativeSize.Height, Heading, Color.R, Color.G, Color.B, Color.A);
110110
#endif
111111
}
@@ -125,7 +125,7 @@ public void DrawSpecific(PointF topLeft, PointF bottomRight)
125125
Invoker.Invoke(0x95812F9B26074726, Dictionary, Texture, relativePosition.X, relativePosition.Y, relativeSize.Width, relativeSize.Height, topLeft.X, topLeft.Y, bottomRight.X, bottomRight.Y, Heading, Color.R, Color.G, Color.B, Color.A);
126126
#elif RPH
127127
NativeFunction.CallByHash<int>(0x95812F9B26074726, Dictionary, Texture, relativePosition.X, relativePosition.Y, relativeSize.Width, relativeSize.Height, topLeft.X, topLeft.Y, bottomRight.X, bottomRight.Y, Heading, Color.R, Color.G, Color.B, Color.A);
128-
#elif (SHVDN2 || SHVDN3)
128+
#elif SHVDN3
129129
Function.Call((Hash)0x95812F9B26074726, Dictionary, Texture, relativePosition.X, relativePosition.Y, relativeSize.Width, relativeSize.Height, topLeft.X, topLeft.Y, bottomRight.X, bottomRight.Y, Heading, Color.R, Color.G, Color.B, Color.A);
130130
#endif
131131
}

LemonUI/Menus/NativeColorPanel.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,6 @@
55
using RAGE.Game;
66
#elif RPH
77
using Control = Rage.GameControl;
8-
#elif SHVDN2
9-
using GTA;
108
#elif SHVDN3
119
using GTA;
1210
using GTA.UI;

LemonUI/Menus/NativeGridPanel.cs

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,6 @@
88
using Rage;
99
using Rage.Native;
1010
using Control = Rage.GameControl;
11-
#elif SHVDN2
12-
using GTA;
13-
using GTA.Native;
1411
#elif SHVDN3
1512
using GTA;
1613
using GTA.Native;
@@ -342,8 +339,6 @@ public override void Process()
342339
bool usingKeyboard = Invoker.Invoke<bool>(0xA571D46727E2B718, 2);
343340
#elif RPH
344341
bool usingKeyboard = NativeFunction.CallByHash<bool>(0xA571D46727E2B718, 2);
345-
#elif SHVDN2
346-
bool usingKeyboard = Function.Call<bool>(Hash._0xA571D46727E2B718, 2);
347342
#elif SHVDN3
348343
bool usingKeyboard = Function.Call<bool>(Hash._IS_INPUT_DISABLED, 2);
349344
#endif
@@ -372,7 +367,7 @@ public override void Process()
372367
Controls.EnableThisFrame(Control.ScriptRightAxisX);
373368
Controls.EnableThisFrame(Control.ScriptRightAxisY);
374369

375-
#if FIVEM || SHVDN2
370+
#if FIVEM
376371
float rX = Game.GetControlNormal(0, Control.ScriptRightAxisX);
377372
float rY = Game.GetControlNormal(0, Control.ScriptRightAxisY);
378373
float frameTime = Game.LastFrameTime;

0 commit comments

Comments
 (0)