Ejemplo n.º 1
0
 public void Start()
 {
     Logger.ATBLog(@"Starting ATB!");
     if (MainSettingsModel.Instance.UseOverlay && !MainSettingsModel.Instance.HideOverlayWhenRunning)
     {
         OverlayLogic.Start();
     }
     HotkeyManager.RegisterHotkeys();
 }
Ejemplo n.º 2
0
        internal static void OverlayToggle()
        {
            if (!TreeRoot.IsRunning)
            {
                return;
            }

            if (!MainSettingsModel.Instance.UseOverlay && OverlayLogic.ATBEnemyOverlayIsVisible)
            {
                OverlayLogic.Stop();
            }

            if (MainSettingsModel.Instance.UseOverlay && !OverlayLogic.ATBEnemyOverlayIsVisible)
            {
                OverlayLogic.Start();
            }
        }
Ejemplo n.º 3
0
        public void RegisterAll()
        {
            HotkeyManager.Register("ATB_Pause", PauseKey, PauseModifier, hk =>
            {
                MainSettingsModel.Instance.UsePause = !MainSettingsModel.Instance.UsePause;
                ToastManager.AddToast(MainSettingsModel.Instance.UsePause ? "ATB Paused!" : "ATB Resumed!", TimeSpan.FromMilliseconds(750), Color.FromRgb(110, 225, 214), Colors.White, new FontFamily("High Tower Text Italic"), new FontWeight(), 52);

                if (MainSettingsModel.Instance.UseOverlay)
                {
                    if (MainSettingsModel.Instance.HideOverlayWhenRunning && !MainSettingsModel.Instance.UsePause)
                    {
                        OverlayLogic.Stop();
                    }
                    else
                    {
                        OverlayLogic.Start();
                    }
                }

                if (MainSettingsModel.Instance.UseOutputToEcho)
                {
                    ChatManager.SendChat(MainSettingsModel.Instance.UsePause ? "/echo ATB Paused!" : "/echo ATB Resumed!");
                }

                Logger.ATBLog(MainSettingsModel.Instance.UsePause ? "ATB Paused!" : "ATB Resumed!");
            });

            HotkeyManager.Register("ATB_ChangeAutoTarget", ChangeAutoTargetKey, ChangeAutoTargetModifier, hk =>
            {
                MainSettingsModel.Instance.ChangeAutoTargetSelectionCommand.Execute(null);
                ToastManager.AddToast(MainSettingsModel.Instance.AutoTargetSelection.ToString(), TimeSpan.FromMilliseconds(750), Color.FromRgb(110, 225, 214), Colors.White, new FontFamily("High Tower Text Italic"), new FontWeight(), 52);

                if (MainSettingsModel.Instance.UseOutputToEcho)
                {
                    ChatManager.SendChat("/echo " + MainSettingsModel.Instance.AutoTargetSelection + " selected!");
                }

                Logger.ATBLog(MainSettingsModel.Instance.AutoTargetSelection + " selected!");
            });

            HotkeyManager.Register("ATB_SmartPull", SmartPullKey, SmartPullModifier, hk =>
            {
                MainSettingsModel.Instance.UseSmartPull = !MainSettingsModel.Instance.UseSmartPull;
                ToastManager.AddToast(MainSettingsModel.Instance.UseSmartPull ? "Smart Pull Enabled!" : "Smart Pull Disabled!", TimeSpan.FromMilliseconds(750), Color.FromRgb(110, 225, 214), Colors.White, new FontFamily("High Tower Text Italic"), new FontWeight(), 52);

                if (MainSettingsModel.Instance.UseOutputToEcho)
                {
                    ChatManager.SendChat(MainSettingsModel.Instance.UseSmartPull ? "/echo Smart Pull Enabled!" : "/echo Smart Pull Disabled!");
                }

                Logger.ATBLog(MainSettingsModel.Instance.UseSmartPull ? "Smart Pull Enabled!" : "Smart Pull Disabled!");
            });

            HotkeyManager.Register("ATB_MechanicWarnings", MechanicWarningKey, MechanicWarningModifier, hk =>
            {
                MainSettingsModel.Instance.UseExtremeCaution = !MainSettingsModel.Instance.UseExtremeCaution;
                ToastManager.AddToast(MainSettingsModel.Instance.UseExtremeCaution ? "Mechanic Warnings Enabled!" : "Mechanic Warnings Disabled!", TimeSpan.FromMilliseconds(750), Color.FromRgb(110, 225, 214), Colors.White, new FontFamily("High Tower Text Italic"), new FontWeight(), 52);

                if (MainSettingsModel.Instance.UseOutputToEcho)
                {
                    ChatManager.SendChat(MainSettingsModel.Instance.UseExtremeCaution ? "/echo Mechanic Warnings Enabled!" : "/echo Mechanic Warnings Disabled!");
                }

                Logger.ATBLog(MainSettingsModel.Instance.UseExtremeCaution ? "Mechanic Warnings Enabled!" : "Mechanic Warnings Disabled!");
            });

            HotkeyManager.Register("ATB_AutoTargeting", AutoTargetingKey, AutoTargetingModifier, hk =>
            {
                MainSettingsModel.Instance.UseAutoTargeting = !MainSettingsModel.Instance.UseAutoTargeting;
                ToastManager.AddToast(MainSettingsModel.Instance.UseAutoTargeting ? "Auto-Targeting Enabled!" : "Auto-Targeting Disabled!", TimeSpan.FromMilliseconds(750), Color.FromRgb(110, 225, 214), Colors.White, new FontFamily("High Tower Text Italic"), new FontWeight(), 52);

                if (MainSettingsModel.Instance.UseOutputToEcho)
                {
                    ChatManager.SendChat(MainSettingsModel.Instance.UseAutoTargeting ? "/echo Auto-Targeting Enabled!" : "/echo Auto-Targeting Disabled!");
                }

                Logger.ATBLog(MainSettingsModel.Instance.UseAutoTargeting ? "Auto-Targeting Enabled!" : "Auto-Targeting Disabled!");
            });

            HotkeyManager.Register("ATB_AutoFace", AutoFaceKey, AutoFaceModifier, hk =>
            {
                MainSettingsModel.Instance.UseAutoFace = !MainSettingsModel.Instance.UseAutoFace;
                ToastManager.AddToast(MainSettingsModel.Instance.UseAutoFace ? "Auto-Face Enabled!" : "Auto-Face Disabled!", TimeSpan.FromMilliseconds(750), Color.FromRgb(110, 225, 214), Colors.White, new FontFamily("High Tower Text Italic"), new FontWeight(), 52);

                if (MainSettingsModel.Instance.UseOutputToEcho)
                {
                    ChatManager.SendChat(MainSettingsModel.Instance.UseAutoFace ? "/echo Auto-Face Enabled!" : "/echo Auto-Face Disabled!");
                }

                Logger.ATBLog(MainSettingsModel.Instance.UseAutoFace ? "Auto-Face Enabled!" : "Auto-Face Disabled!");
            });
        }