public static void Initialize() { TargetSelector.Initialize(); Prediction.Initialize(); Hacks.Initialize(); //FakeClicks.Initialize(); Instance.AddToMainMenu(); }
/// <summary> /// Initializes a static instance of the <see cref="CommonMenu" /> class. /// </summary> static CommonMenu() { TargetSelector.Initialize(); Prediction.Initialize(); Hacks.Initialize(); FakeClicks.Initialize(); Instance.AddToMainMenu(); }
public static void Initialize() { //修改的内容:增加FrozenGJ菜单。 FrozenGJMenu.Initialize(); TargetSelector.Initialize(); Prediction.Initialize(); Hacks.Initialize(); FakeClicks.Initialize(); Instance.AddToMainMenu(); }
/// <summary> /// External attachment handle for the Sandbox to load in the SDK library. /// </summary> /// <param name="args"> /// The additional arguments the loader passes. /// </param> public static void Init(string[] args) { if (initialized) { return; } initialized = true; // Initial notification. Logging.Write()(LogLevel.Info, "[-- SDK Bootstrap Loading --]"); // Load GameObjects. GameObjects.Initialize(); Logging.Write()(LogLevel.Info, "[SDK Bootstrap] GameObjects Initialized."); // Create L# menu Variables.LeagueSharpMenu = new Menu("LeagueSharp", "SDK基本库", true).Attach(); MenuCustomizer.Initialize(Variables.LeagueSharpMenu); Logging.Write()(LogLevel.Info, "[SDK Bootstrap] LeagueSharp Menu Created."); // Load the Orbwalker Orbwalker.Initialize(Variables.LeagueSharpMenu); Logging.Write()(LogLevel.Info, "[SDK Bootstrap] Orbwalker Initialized."); // Load the TargetSelector. TargetSelector.Initialize(Variables.LeagueSharpMenu); Logging.Write()(LogLevel.Info, "[SDK Bootstrap] TargetSelector Initialized."); // Load the Notifications Notifications.Initialize(Variables.LeagueSharpMenu); Logging.Write()(LogLevel.Info, "[SDK Bootstrap] Notifications Initialized."); // Load Damages. Damage.Initialize(Variables.GameVersion); Logging.Write()(LogLevel.Info, "[SDK Bootstrap] Damage Library Initialized."); // Load Gapcloser. Gapcloser.Initialize(); Logging.Write()(LogLevel.Info, "[SDK Bootstrap] Gapcloser Library Initialized."); // Final notification. Logging.Write()(LogLevel.Info, "[-- SDK Bootstrap Loading --]"); }
internal static void Initialize() { // Initialize properties SavedValues = new Dictionary <string, Dictionary <string, List <Dictionary <string, object> > > >(); Instance = new SimpleControlContainer(ThemeManager.SpriteType.FormComplete, false, true, false) { IsVisible = false }; Sprite = new Sprite(() => ThemeManager.CurrentTheme.Texture); // Control containers Instance.Add(AddonButtonContainer = new AddonContainer()); // Empty controls Instance.Add(TitleBar = new EmptyControl(ThemeManager.SpriteType.FormHeader)); // Buttons Instance.Add(ExitButton = new Button(Button.ButtonType.Exit)); // Text types TitleBar.TextObjects.Add(TitleText = new Text("ELOBUDDY", new FontDescription { FaceName = "Gill Sans MT Pro Medium", Height = 28, Quality = FontQuality.Antialiased, Weight = FontWeight.ExtraBold, Width = 12, }) { TextAlign = Text.Align.Center, TextOrientation = Text.Orientation.Center, Color = Color.FromArgb(255, 143, 122, 72), Padding = new Vector2(0, 3) }); // Simple event hooks ExitButton.OnActiveStateChanged += delegate { if (ExitButton.IsActive) { IsVisible = false; ExitButton.IsActive = false; } }; TitleBar.OnLeftMouseDown += delegate { MoveOffset = Position - Game.CursorPos2D; }; TitleBar.OnLeftMouseUp += delegate { MoveOffset = Vector2.Zero; }; // Don't pass anything through the menu to the game if the mouse is inside of the menu Messages.OnMessage += delegate(Messages.WindowMessage args) { if (IsMouseInside) { args.Process = false; } }; // Center menu position Position = (new Vector2(Drawing.Width, Drawing.Height) - Instance.Size) / 2; // Setup save timer SaveTimer = new Timer(60000); SaveTimer.Elapsed += OnSaveTimerElapsed; SaveTimer.Start(); OnSaveTimerElapsed(null, null); // Listen to events ThemeManager.OnThemeChanged += OnThemeChanged; Sprite.OnMenuDraw += OnMenuDraw; Messages.OnMessage += OnWndMessage; AppDomain.CurrentDomain.DomainUnload += OnUnload; AppDomain.CurrentDomain.ProcessExit += OnUnload; #if DEBUG var debugMenu = AddMenu("Debug", "debugging"); debugMenu.AddGroupLabel("Menu outline (skeleton)"); debugMenu.Add("drawOutline", new CheckBox("Draw outline", false)).CurrentValue = false; debugMenu.AddGroupLabel("Load Bootstrap"); debugMenu.Add("targetselector", new CheckBox("TargetSelector", false)).CurrentValue = false; debugMenu.Add("orbwalker", new CheckBox("Orbwalker", false)).CurrentValue = false; debugMenu.Add("prediction", new CheckBox("Prediction", false)).CurrentValue = false; debugMenu.Add("damagelibrary", new CheckBox("DamageLibrary", false)).CurrentValue = false; debugMenu["drawOutline"].Cast <CheckBox>().OnValueChange += delegate(ValueBase <bool> sender, ValueBase <bool> .ValueChangeArgs args) { ControlContainerBase.DrawOutline = args.NewValue; }; debugMenu["targetselector"].Cast <CheckBox>().OnValueChange += delegate { TargetSelector.Initialize(); Core.DelayAction(() => debugMenu.Remove("targetselector"), 25); }; debugMenu["orbwalker"].Cast <CheckBox>().OnValueChange += delegate { Orbwalker.Initialize(); Core.DelayAction(() => debugMenu.Remove("orbwalker"), 25); }; debugMenu["prediction"].Cast <CheckBox>().OnValueChange += delegate { Prediction.Initialize(); Core.DelayAction(() => debugMenu.Remove("prediction"), 25); }; debugMenu["damagelibrary"].Cast <CheckBox>().OnValueChange += delegate { DamageLibrary.Initialize(); Core.DelayAction(() => debugMenu.Remove("damagelibrary"), 25); }; #endif // Indicate that the menu has finished loading IsLoaded = true; }