From e57dd85afd203ba6db3b75a0052c89cbe17d985a Mon Sep 17 00:00:00 2001 From: Hannele Ruiz Date: Sat, 4 Dec 2021 13:57:52 -0300 Subject: [PATCH] Make the BaseScaleform.scaleform obsolete and error --- LemonUI/Scaleform/BaseScaleform.cs | 26 +++----------------------- 1 file changed, 3 insertions(+), 23 deletions(-) diff --git a/LemonUI/Scaleform/BaseScaleform.cs b/LemonUI/Scaleform/BaseScaleform.cs index 07e2b493..f45e5a05 100644 --- a/LemonUI/Scaleform/BaseScaleform.cs +++ b/LemonUI/Scaleform/BaseScaleform.cs @@ -20,12 +20,12 @@ public abstract class BaseScaleform : IScaleform /// /// The ID of the scaleform. /// - [Obsolete("Please use the Handle or Name properties and call the methods manually.")] + [Obsolete("Please use the Handle or Name properties and call the methods manually.", true)] #endif #if FIVEM - protected CitizenFX.Core.Scaleform scaleform = null; + protected CitizenFX.Core.Scaleform scaleform = new CitizenFX.Core.Scaleform(""); #elif (SHVDN2 || SHVDN3) - protected GTA.Scaleform scaleform = null; + protected GTA.Scaleform scaleform = new GTA.Scaleform(""); #endif #endregion @@ -73,18 +73,6 @@ public BaseScaleform(string sc) { Name = sc; - LoadScaleform(); - } - - #endregion - - #region Protected Functions - - /// - /// Load a given Scaleform - /// - protected void LoadScaleform() - { #if FIVEM Handle = API.RequestScaleformMovie(Name); #elif RPH @@ -92,14 +80,6 @@ protected void LoadScaleform() #elif (SHVDN2 || SHVDN3) Handle = Function.Call(Hash.REQUEST_SCALEFORM_MOVIE, Name); #endif - -#pragma warning disable CS0618 // Type or member is obsolete -#if FIVEM - scaleform = new CitizenFX.Core.Scaleform(Name); -#elif (SHVDN2 || SHVDN3) - scaleform = new GTA.Scaleform(Name); -#endif -#pragma warning restore CS0618 // Type or member is obsolete } #endregion