private static void InitAboutMenu(QMenu rootMenu, Dictionary <string, QAction> actions) { rootMenu.AddAction(MediaIconHelper.HelpIcon, "Help"); rootMenu.AddSeparator(); //rootMenu.AddAction(MediaIconHelper.NewDocumentIcon, "About"); rootMenu.AddAction(actions["About"]); }
private void CreateSimMenu() { menuSimItem = new QMenu(mainwindow_Ui.LstSimContacts); menuSimActions = new List <QAction>(); menuSimActions.Add(new QAction(new QIcon(":/toolbar/resources/qt/list-add.png"), GlobalObjUI.LMan.GetString("addcontacts"), menuSimItem)); menuSimActions.Add(new QAction(new QIcon(":/toolbar/resources/qt/edit-delete.png"), GlobalObjUI.LMan.GetString("delcontacts"), menuSimItem)); menuSimActions.Add(new QAction(new QIcon(":/toolbar/resources/qt/go-up.png"), GlobalObjUI.LMan.GetString("copycontactstofile"), menuSimItem)); menuSimItem.AddActions(menuSimActions); menuSimActions[0].ObjectName = "simadd"; menuSimActions[1].ObjectName = "simdel"; menuSimActions[2].ObjectName = "simcopy"; foreach (QAction qa in menuSimActions) { qa.SetVisible(true); qa.IconVisibleInMenu = true; } }
private static void InitFileMenu(QMenu rootMenu) { rootMenu.AddAction(MediaIconHelper.NewDocumentIcon, "New File"); rootMenu.AddAction(MediaIconHelper.OpenDocumentIcon, "Open File"); // create new Import sub menu //var importMenu = new QMenu("Import"); var importMenu = rootMenu.AddMenu(MediaIconHelper.OpenDocumentIcon, "&Import"); // add actions to menu importMenu.AddAction(new QAction("Import news feed...", null)); importMenu.AddAction(new QAction("Import bookmarks...", null)); importMenu.AddAction(new QAction("Import mail...", null)); // add Import to main menu rootMenu.AddMenu(importMenu); // Add separator line rootMenu.AddSeparator(); // create sub menu var quit = new QAction(MediaIconHelper.SystemLogOugIcon, "&Quit", rootMenu); // add it to main menu rootMenu.AddAction(quit); // Menus are displayed in created order quit.Triggered += Quit_Triggered; }
private static void Drawing_OnDraw(EventArgs args) { if (!DrawingMenu.GetCheckbox("enable")) { return; } if (DrawingMenu.GetCheckbox("drawQ")) { Drawing.DrawCircle(ObjectManager.Me.Position, Q.Range, Color.White); } if (DrawingMenu.GetCheckbox("drawE")) { Drawing.DrawCircle(ObjectManager.Me.Position, E.Range, Color.Red); } if (DrawingMenu.GetCheckbox("drawR")) { Drawing.DrawCircle(ObjectManager.Me.Position, R.Range, Color.Green); } if (DrawingMenu.GetCheckbox("drawmaxR")) { Drawing.DrawCircle(ObjectManager.Me.Position, QMenu.GetSlider("rangeQ"), Color.Green); } if (DrawingMenu.GetCheckbox("drawminR")) { Drawing.DrawCircle(ObjectManager.Me.Position, QMenu.GetSlider("minQ"), Color.Green); } }
/// <summary> /// Generates the menu. /// </summary> public void GenerateMenu() { QMenu = Variables.MenuPrincipal.AddSubMenu("Q Settings"); QMenu.Add("TDVaynemisctumblenoqintoenemies", new CheckBox("Don't Q into enemies")); QMenu.Add("TDVaynemisctumbleqks", new CheckBox("Q for Killsteal")); QMenu.Add("TDVaynemisctumblesmartQ", new CheckBox("Use SOLO Vayne Q Logic")); EMenu = Variables.MenuPrincipal.AddSubMenu("E Settings"); EMenu.Add("useecombo", new CheckBox("Use E")); EMenu.Add("TDVaynemisccondemnautoe", new CheckBox("Auto E")); EMenu.Add("TDVaynemisccondemncurrent", new CheckBox("Only E Current Target")); StringList(EMenu, "EMode", "E Mode", new[] { "PRADASMART", "PRADAPERFECT", "MARKSMAN", "SHARPSHOOTER", "GOSU", "VHR", "PRADALEGACY", "FASTEST", "OLDPRADA" }, 0); EMenu.Add("EPushDist", new Slider("E Push Distance", 450, 300, 475)); EMenu.Add("EHitchance", new Slider("E Hitchance", 50)); EMenu.Add("TDVaynemisccondemnsave", new CheckBox("Save yourself")); HarassMenu = Variables.MenuPrincipal.AddSubMenu("Harass Settings"); StringList(HarassMenu, "TDVaynemixedmode", "Harass Mode", new[] {"Passive", "Aggresive"}, 1); FarmMenu = Variables.MenuPrincipal.AddSubMenu("Farm Settings"); FarmMenu.Add("useqfarm", new CheckBox("Use Q")); FarmMenu.Add("TDVaynelaneclearcondemnjungle", new CheckBox("Condemn Jungle Mobs")); MiscMenu = Variables.MenuPrincipal.AddSubMenu("Misc Settings"); MiscMenu.Add("usercombo", new CheckBox("Auto Q when use ult")); MiscMenu.Add("botrkcutlasshpercent", new Slider("BotRK/Cutlass Health %", 50)); MiscMenu.Add("TDVaynemiscmiscellaneousantigapcloser", new CheckBox("Antigapcloser")); MiscMenu.Add("TDVaynemiscmiscellaneousinterrupter", new CheckBox("Interrupter")); MiscMenu.Add("TDVaynemiscmiscellaneousnoaastealth", new CheckBox("Don't AA while stealthed")); MiscMenu.Add("TDVaynemiscmiscellaneousdelay", new Slider("Antigapcloser / Interrupter Delay", 300, 0, 1000)); }
private static QMenu GetMenuItems(DynamicGroupAction group) { m_Log.Debug("Getting menu items for " + group.Text + "."); QMenu ctx = new QMenu(group.GetType().FullName); LinuxNativePool.Instance.Retain(ctx); foreach (Moai.Platform.Menus.Action a in group.Actions) { if (a is DynamicGroupAction) { m_Log.Debug("Recursive menu add for " + a.GetType().FullName + "."); ctx.AddMenu(ActionWrapper.GetMenuItems(a as DynamicGroupAction)); } else if (a is SeperatorAction) { ctx.AddSeparator(); } else { m_Log.Debug("Normal menu add for " + a.GetType().FullName + "."); ctx.AddAction(ActionWrapper.WrapAction(a)); } } ctx.Title = group.Text; return(ctx); }
private static void LoadMenuOKTW() { drawMenu = Config.AddSubMenu("Draw"); drawMenu.Add("onlyRdy", new CheckBox("Draw only ready spells")); drawMenu.Add("wRange", new CheckBox("W Range")); drawMenu.Add("rNot", new CheckBox("R key info", true)); QMenu = Config.AddSubMenu("Q Config"); QMenu.Add("harasQ", new CheckBox("Harass Q")); EMenu = Config.AddSubMenu("E Config"); EMenu.Add("autoE", new CheckBox("Auto E")); RMenu = Config.AddSubMenu("R Config"); RMenu.Add("autoR", new CheckBox("Auto R")); RMenu.Add("Rkscombo", new CheckBox("R KS combo R + W + AA")); RMenu.Add("autoRaoe", new CheckBox("Auto R aoe")); RMenu.Add("autoRinter", new CheckBox("Auto R OnPossibleToInterrupt")); foreach (var enemy in HeroManager.Enemies) { for (int i = 0; i < 4; i++) { var spell = enemy.Spellbook.Spells[i]; if (spell.SData.TargettingType != SpellDataTargetType.Self && spell.SData.TargettingType != SpellDataTargetType.SelfAndUnit) { RMenu.Add("spell" + spell.SData.Name, new CheckBox(spell.Name, false)); } } } RMenu.Add("useR2", new KeyBind("R key target cast", false, KeyBind.BindTypes.HoldActive, 'Y')); RMenu.Add("useR", new KeyBind("Semi-manual cast R key", false, KeyBind.BindTypes.HoldActive, 'T')); List <string> modes = new List <string>(); modes.Add("LOW HP"); modes.Add("CLOSEST"); RMenu.Add("Semi-manual", new ComboBox("Semi-manual MODE", 0, modes.ToArray())); foreach (var enemy in ObjectManager.Get <AIHeroClient>().Where(enemy => enemy.Team != Player.Team)) { RMenu.Add("GapCloser" + enemy.NetworkId, new CheckBox("Gapclose R : " + enemy.ChampionName, false)); } harassMenu = Config.AddSubMenu("Harass"); foreach (var enemy in ObjectManager.Get <AIHeroClient>().Where(enemy => enemy.Team != Player.Team)) { harassMenu.Add("haras" + enemy.NetworkId, new CheckBox(enemy.ChampionName)); } FarmMenu = Config.AddSubMenu("Farm"); FarmMenu.Add("farmQ", new CheckBox("Lane clear Q")); FarmMenu.Add("farmW", new CheckBox("Lane clear W")); FarmMenu.Add("Mana", new Slider("LaneClear Mana", 80, 30)); FarmMenu.Add("LCminions", new Slider("LaneClear minimum minions", 3, 0, 10)); FarmMenu.Add("jungleQ", new CheckBox("Jungle clear Q")); FarmMenu.Add("jungleW", new CheckBox("Jungle clear W")); }
public static void DoCombo() { var q = ComboMenu.GetCheckbox("useQ") && Q.IsReady(); var e = ComboMenu.GetCheckbox("useE") && E.IsReady(); var r = ComboMenu.GetCheckbox("useR") && R.IsReady(); var rc = MiscMenu.GetCheckbox("useRafterQ") && R.IsReady(); AIHeroClient target; if (q) { target = TargetSelector.GetTarget(QMenu.GetSlider("rangeQ"), TargetSelector.DamageType.Magical); if (MiscMenu.GetCheckbox("useDP")) { var location = LinearPrediction(ObjectManager.Player.Position, Q, (AIHeroClient)target); if (target != null && (target.Distance(ObjectManager.Me) > QMenu.GetSlider("minQ")) && !QMenu.GetCheckbox("blq" + target.ChampionName) && !Functions.HasSpellShield(target) && location != DarkPrediction.empt && !DarkPrediction.CollisionChecker(location, ObjectManager.Me.Position, Q)) { Q.Cast(location); } } else { if (target != null && (target.Distance(ObjectManager.Me) > QMenu.GetSlider("minQ")) && !QMenu.GetCheckbox("blq" + target.ChampionName) && !Functions.HasSpellShield(target)) { Q.CastIfHitchanceEquals(target, HitChance.VeryHigh); } } } if (r) { target = TargetSelector.GetTarget(R.Range, TargetSelector.DamageType.Magical); if (target != null && !Functions.HasSpellShield(target)) { if (ObjectManager.Player.CountEnemiesInRange(550f) > ComboMenu.GetSlider("minR")) { R.Cast(); } } } if (rc) { target = TargetSelector.GetTarget(R.Range, TargetSelector.DamageType.Magical); if (target != null && !Functions.HasSpellShield(target) && target.HasBuff("rocketgrab2")) { R.Cast(); } } if (e) { target = TargetSelector.GetTarget(E.Range, TargetSelector.DamageType.Physical); if (target != null && !Functions.HasSpellShield(target)) { E.Cast(); Orbwalker.ResetAutoAttackTimer(); } } }
private static void LoadMenuOKTW() { drawMenu = Config.AddSubMenu("Draw"); drawMenu.Add("qRange", new CheckBox("Q range")); drawMenu.Add("wRange", new CheckBox("W range")); drawMenu.Add("eRange", new CheckBox("E range")); drawMenu.Add("rRange", new CheckBox("R range")); drawMenu.Add("onlyRdy", new CheckBox("Draw only ready spells")); QMenu = Config.AddSubMenu("Q Config"); QMenu.Add("autoQ", new CheckBox("Auto Q")); QMenu.Add("AGCQ", new CheckBox("Q gapcloser")); QMenu.Add("harrasQ", new CheckBox("Harass Q")); foreach (var enemy in ObjectManager.Get <AIHeroClient>().Where(enemy => enemy.Team != Player.Team)) { QMenu.Add("haras" + enemy.NetworkId, new CheckBox("Harass :" + enemy.ChampionName)); } WMenu = Config.AddSubMenu("W Config"); WMenu.Add("autoW", new CheckBox("Auto W")); WMenu.Add("AGCW", new CheckBox("AntiGapcloser W")); WMenu.Add("inter", new CheckBox("OnPossibleToInterrupt W")); EMenu = Config.AddSubMenu("E Config"); EMenu.Add("autoE", new CheckBox("Auto E")); RMenu = Config.AddSubMenu("R Config"); RMenu.Add("autoR", new CheckBox("Auto R")); FarmMenu = Config.AddSubMenu("Farm"); FarmMenu.Add("farmE", new CheckBox("Lane clear E")); FarmMenu.Add("farmR", new CheckBox("Lane clear R")); FarmMenu.Add("Mana", new Slider("LaneClear Mana", 80)); FarmMenu.Add("LCminions", new Slider("LaneClear minimum minions", 2, 0, 10)); FarmMenu.Add("jungleQ", new CheckBox("Jungle clear Q")); FarmMenu.Add("jungleW", new CheckBox("Jungle clear W")); FarmMenu.Add("jungleE", new CheckBox("Jungle clear E")); FarmMenu.Add("jungleR", new CheckBox("Jungle clear R")); AniviaMenu = Config.AddSubMenu(Player.ChampionName); AniviaMenu.Add("AACombo", new CheckBox("Disable AA if can use E")); }
private static void LoadMenuOKTW() { drawMenu = Config.AddSubMenu("线圈"); drawMenu.Add("qRange", new CheckBox("Q 范围")); drawMenu.Add("wRange", new CheckBox("W 范围")); drawMenu.Add("eRange", new CheckBox("E 范围")); drawMenu.Add("rRange", new CheckBox("R 范围")); drawMenu.Add("onlyRdy", new CheckBox("只显示无冷却技能")); QMenu = Config.AddSubMenu("Q 设置"); QMenu.Add("autoQ", new CheckBox("自动 Q")); QMenu.Add("AGCQ", new CheckBox("Q 防突进")); QMenu.Add("harrasQ", new CheckBox("骚扰 Q")); foreach (var enemy in ObjectManager.Get <AIHeroClient>().Where(enemy => enemy.Team != Player.Team)) { QMenu.Add("haras" + enemy.NetworkId, new CheckBox("骚扰 :" + enemy.ChampionName)); } WMenu = Config.AddSubMenu("W 设置"); WMenu.Add("autoW", new CheckBox("自动 W")); WMenu.Add("AGCW", new CheckBox("防突进 W")); WMenu.Add("inter", new CheckBox("可打断技能的目标 W")); EMenu = Config.AddSubMenu("E 设置"); EMenu.Add("autoE", new CheckBox("自动 E")); RMenu = Config.AddSubMenu("R 设置"); RMenu.Add("autoR", new CheckBox("自动 R")); FarmMenu = Config.AddSubMenu("农兵"); FarmMenu.Add("farmE", new CheckBox("清线 E")); FarmMenu.Add("farmR", new CheckBox("清线 R")); FarmMenu.Add("Mana", new Slider("清线蓝量", 80)); FarmMenu.Add("LCminions", new Slider("清线最低小兵数量", 2, 0, 10)); FarmMenu.Add("jungleQ", new CheckBox("清野 Q")); FarmMenu.Add("jungleW", new CheckBox("清野 W")); FarmMenu.Add("jungleE", new CheckBox("清野 E")); FarmMenu.Add("jungleR", new CheckBox("清野 R")); AniviaMenu = Config.AddSubMenu(Player.ChampionName); AniviaMenu.Add("AACombo", new CheckBox("E无冷却时,屏蔽普攻")); }
public static Account ShowAccountSelectMenu(QWidget attachWidget) { AccountService accountService = ServiceManager.Get <AccountService>(); if (accountService.ConnectedAccounts.Count == 0) { var widget = (attachWidget != null) ? attachWidget.TopLevelWidget() : Gui.MainWindow; QMessageBox.Critical(widget, "Synapse", "You are not connected."); return(null); } Account selectedAccount = null; if (accountService.ConnectedAccounts.Count > 1) { QMenu menu = new QMenu(); menu.AddAction("Select Account:").SetDisabled(true); foreach (Account account in accountService.ConnectedAccounts) { QAction action = menu.AddAction(account.Jid.ToString()); if (menu.ActiveAction() == null) { menu.SetActiveAction(action); } } var pos = (attachWidget != null) ? attachWidget.MapToGlobal(new QPoint(0, attachWidget.Height())) : QCursor.Pos(); QAction selectedAction = menu.Exec(pos); if (selectedAction != null) { selectedAccount = accountService.GetAccount(new jabber.JID(selectedAction.Text)); } } else { selectedAccount = accountService.ConnectedAccounts[0]; } return(selectedAccount); }
private static void LoadMenuOKTW() { drawMenu = Config.AddSubMenu("线圈"); drawMenu.Add("onlyRdy", new CheckBox("只显示无冷却技能")); drawMenu.Add("wRange", new CheckBox("W 范围")); QMenu = Config.AddSubMenu("Q 设置"); QMenu.Add("harasQ", new CheckBox("骚扰 Q")); EMenu = Config.AddSubMenu("E 设置"); EMenu.Add("autoE", new CheckBox("自动 E")); RMenu = Config.AddSubMenu("R 设置"); RMenu.Add("autoR", new CheckBox("自动 R")); RMenu.Add("Rkscombo", new CheckBox("R 连招抢头 R + W + AA")); RMenu.Add("autoRaoe", new CheckBox("自动R (多敌人模式)")); RMenu.Add("autoRinter", new CheckBox("自动R (可尝试技能打断目标")); RMenu.Add("useR", new KeyBind("半自动 R 按键", false, KeyBind.BindTypes.HoldActive, 'T')); foreach (var enemy in ObjectManager.Get <AIHeroClient>().Where(enemy => enemy.Team != Player.Team)) { RMenu.Add("GapCloser" + enemy.NetworkId, new CheckBox("防突进 R : " + enemy.ChampionName, false)); } harassMenu = Config.AddSubMenu("骚扰"); foreach (var enemy in ObjectManager.Get <AIHeroClient>().Where(enemy => enemy.Team != Player.Team)) { harassMenu.Add("haras" + enemy.NetworkId, new CheckBox(enemy.ChampionName)); } FarmMenu = Config.AddSubMenu("农兵"); FarmMenu.Add("farmQ", new CheckBox("清线 Q")); FarmMenu.Add("farmW", new CheckBox("清线 W")); FarmMenu.Add("Mana", new Slider("清线蓝量", 80, 30)); FarmMenu.Add("LCminions", new Slider("最低小兵命中数", 3, 0, 10)); FarmMenu.Add("jungleQ", new CheckBox("清野 Q")); FarmMenu.Add("jungleW", new CheckBox("清野 W")); }
private static void LoadMenuOKTW() { drawMenu = Config.AddSubMenu("Draw"); drawMenu.Add("onlyRdy", new CheckBox("Draw only ready spells")); drawMenu.Add("wRange", new CheckBox("W Range")); QMenu = Config.AddSubMenu("Q Config"); QMenu.Add("harasQ", new CheckBox("Harass Q")); EMenu = Config.AddSubMenu("E Config"); EMenu.Add("autoE", new CheckBox("Auto E")); RMenu = Config.AddSubMenu("R Config"); RMenu.Add("autoR", new CheckBox("Auto R")); RMenu.Add("Rkscombo", new CheckBox("R KS combo R + W + AA")); RMenu.Add("autoRaoe", new CheckBox("Auto R aoe")); RMenu.Add("autoRinter", new CheckBox("Auto R OnPossibleToInterrupt")); RMenu.Add("useR", new KeyBind("Semi-manual cast R key", false, KeyBind.BindTypes.HoldActive, 'T')); foreach (var enemy in ObjectManager.Get <AIHeroClient>().Where(enemy => enemy.Team != Player.Team)) { RMenu.Add("GapCloser" + enemy.ChampionName, new CheckBox("Gapclose R : " + enemy.ChampionName, false)); } harassMenu = Config.AddSubMenu("Harass"); foreach (var enemy in ObjectManager.Get <AIHeroClient>().Where(enemy => enemy.Team != Player.Team)) { harassMenu.Add("haras" + enemy.ChampionName, new CheckBox(enemy.ChampionName, true)); } FarmMenu = Config.AddSubMenu("Farm"); FarmMenu.Add("farmQ", new CheckBox("Lane clear Q")); FarmMenu.Add("farmW", new CheckBox("Lane clear W")); FarmMenu.Add("Mana", new Slider("LaneClear Mana", 80, 30, 100)); FarmMenu.Add("LCminions", new Slider("LaneClear minimum minions", 3, 0, 10)); FarmMenu.Add("jungleQ", new CheckBox("Jungle clear Q")); FarmMenu.Add("jungleW", new CheckBox("Jungle clear W")); }
public static QMenu GetContextMenu(Moai.Platform.Menus.Action[] actions) { m_Log.Debug("Getting context menu."); QMenu ctx = new QMenu(); LinuxNativePool.Instance.Retain(ctx); foreach (Moai.Platform.Menus.Action a in actions) { if (a is DynamicGroupAction) { ctx.AddMenu(ActionWrapper.GetMenuItems(a as DynamicGroupAction)); } else if (a is SeperatorAction) { ctx.AddSeparator(); } else { ctx.AddAction(ActionWrapper.WrapAction(a)); } } return(ctx); }
public TrayIcon(QObject parent) : base(parent) { m_ShowMainWindowAction = new QAction("Show Synapse", this); m_ShowMainWindowAction.Checkable = true; QObject.Connect(m_ShowMainWindowAction, Qt.SIGNAL("triggered()"), HandleShowMainWindowActionTriggered); m_ShowDebugWindowAction = new QAction("Debug Window", this); m_ShowDebugWindowAction.Checkable = true; QObject.Connect(m_ShowDebugWindowAction, Qt.SIGNAL("triggered()"), HandleShowDebugWindowActionTriggered); m_Menu = new QMenu(); m_Menu.AddAction(m_ShowMainWindowAction); m_Menu.AddAction(m_ShowDebugWindowAction); m_Menu.AddSeparator(); m_Menu.AddAction(Gui.GlobalActions.NewMessageAction); m_Menu.AddAction(Gui.GlobalActions.JoinConferenceAction); m_Menu.AddAction(Gui.GlobalActions.ShowBrowserAction); m_Menu.AddAction(Gui.GlobalActions.EditProfileAction); m_Menu.AddAction(Gui.GlobalActions.ChangeStatusAction); m_Menu.AddSeparator(); m_Menu.AddAction(Gui.GlobalActions.ShowPreferencesAction); m_Menu.AddSeparator(); m_Menu.AddAction(Gui.GlobalActions.AboutAction); m_Menu.AddAction(Gui.GlobalActions.SendFeedbackAction); m_Menu.AddSeparator(); m_Menu.AddAction(Gui.GlobalActions.QuitAction); QObject.Connect(m_Menu, Qt.SIGNAL("aboutToShow()"), HandleMenuAboutToShow); QPixmap pixmap = new QPixmap("resource:/octy-22.png"); QIcon icon = new QIcon(pixmap); m_Icon = new QSystemTrayIcon(icon); m_Icon.SetContextMenu(m_Menu); QObject.Connect <QSystemTrayIcon.ActivationReason>(m_Icon, Qt.SIGNAL("activated(QSystemTrayIcon::ActivationReason)"), HandleTrayActivated); }
public GlobalActions() { m_AccountsMenu = new QMenu(); m_QuitAction = new QAction(Gui.LoadIcon("application-exit"), "Quit", this); m_QuitAction.Shortcut = new QKeySequence("Ctrl+Q"); QObject.Connect(m_QuitAction, Qt.SIGNAL("triggered()"), HandleQuitActionTriggered); m_ShowPreferencesAction = new QAction(Gui.LoadIcon("preferences-desktop"), "Preferences", this); QObject.Connect(m_ShowPreferencesAction, Qt.SIGNAL("triggered()"), HandleShowPreferencesActionTriggered); m_SendFeedbackAction = new QAction("Send Feedback...", this); QObject.Connect(m_SendFeedbackAction, Qt.SIGNAL("triggered()"), HandleSendFeedbackActionTriggered); m_ShowBrowserAction = new QAction(Gui.LoadIcon("system-search"), "Discover Services...", this); QObject.Connect(m_ShowBrowserAction, Qt.SIGNAL("triggered()"), HandleShowBrowserActionTriggered); m_NewMessageAction = new QAction(Gui.LoadIcon("document-new"), "New Message...", this); m_JoinMucAction = new QAction(Gui.LoadIcon("internet-group-chat"), "Create/Join Conference...", this); m_EditProfileAction = new QAction(Gui.LoadIcon("user-info"), "Edit Profile...", this); QObject.Connect(m_EditProfileAction, Qt.SIGNAL("triggered()"), HandleEditProfileActionTriggered); m_AboutAction = new QAction(Gui.LoadIcon("help-about"), "About", this); QObject.Connect(m_AboutAction, Qt.SIGNAL("triggered()"), HandleAboutActionTriggered); m_PresenceMenu = new QMenu(); QActionGroup group = new QActionGroup(this); group.Exclusive = true; m_AvailableAction = m_PresenceMenu.AddAction("Available"); group.AddAction(m_AvailableAction); m_AvailableAction.Checkable = true; m_FreeToChatAction = m_PresenceMenu.AddAction("Free To Chat"); group.AddAction(m_FreeToChatAction); m_FreeToChatAction.Checkable = true; m_AwayAction = m_PresenceMenu.AddAction("Away"); group.AddAction(m_AwayAction); m_AwayAction.Checkable = true; m_ExtendedAwayAction = m_PresenceMenu.AddAction("Extended Away"); group.AddAction(m_ExtendedAwayAction); m_ExtendedAwayAction.Checkable = true; m_DoNotDisturbAction = m_PresenceMenu.AddAction("Do Not Disturb"); group.AddAction(m_DoNotDisturbAction); m_DoNotDisturbAction.Checkable = true; m_PresenceMenu.AddSeparator(); m_OfflineAction = m_PresenceMenu.AddAction("Offline"); group.AddAction(m_OfflineAction); m_OfflineAction.Checkable = true; m_ChangeStatusAction = new QAction("Change Status", this); m_ChangeStatusAction.SetMenu(m_PresenceMenu); }
public RosterWidget(QWidget parent) : base(parent) { SetupUi(); var settingsService = ServiceManager.Get <SettingsService>(); m_RosterModel = new RosterAvatarGridModel(); m_RosterModel.ShowTransports = settingsService.Get <bool>("RosterShowTransports"); m_RosterModel.ShowOffline = settingsService.Get <bool>("RosterShowOffline"); rosterGrid.Model = m_RosterModel; rosterGrid.ItemActivated += HandleItemActivated; rosterGrid.ShowGroupCounts = true; rosterGrid.InstallEventFilter(new KeyPressEater(delegate(QKeyEvent evnt) { if (!String.IsNullOrEmpty(evnt.Text())) { rosterSearchButton.Checked = true; friendSearchLineEdit.Text += evnt.Text(); friendSearchLineEdit.SetFocus(); return(true); } return(false); }, this)); if (settingsService.Has("RosterIconSize")) { rosterGrid.IconSize = settingsService.Get <int>("RosterIconSize"); } var accountService = ServiceManager.Get <AccountService>(); accountService.AccountAdded += HandleAccountAdded; accountService.AccountRemoved += HandleAccountRemoved; foreach (Account account in accountService.Accounts) { HandleAccountAdded(account); } m_ActivityFeedItems = new Dictionary <string, IActivityFeedItem>(); rosterGrid.ContextMenuPolicy = Qt.ContextMenuPolicy.CustomContextMenu; m_RosterMenu = new QMenu(this); QObject.Connect <QAction>(m_RosterMenu, Qt.SIGNAL("triggered(QAction*)"), HandleRosterMenuTriggered); var rosterViewActionGroup = new QActionGroup(this); QObject.Connect <QAction>(rosterViewActionGroup, Qt.SIGNAL("triggered(QAction *)"), RosterViewActionGroupTriggered); m_GridModeAction = new QAction("View as Grid", this); m_GridModeAction.SetActionGroup(rosterViewActionGroup); m_GridModeAction.Checkable = true; m_RosterMenu.AddAction(m_GridModeAction); m_ListModeAction = new QAction("View as List", this); m_ListModeAction.SetActionGroup(rosterViewActionGroup); m_ListModeAction.Checkable = true; m_RosterMenu.AddAction(m_ListModeAction); if (settingsService.Get <bool>("RosterListMode")) { rosterGrid.ListMode = true; m_ListModeAction.Checked = true; } else { rosterGrid.ListMode = false; m_GridModeAction.Checked = true; } m_RosterMenu.AddSeparator(); m_ShowOfflineAction = new QAction("Show Offline Friends", this); m_ShowOfflineAction.Checkable = true; m_RosterMenu.AddAction(m_ShowOfflineAction); m_ShowTransportsAction = new QAction("Show Transports", this); m_ShowTransportsAction.Checkable = true; m_RosterMenu.AddAction(m_ShowTransportsAction); m_RosterMenu.AddSeparator(); var sliderAction = new AvatarGridZoomAction <Synapse.UI.RosterItem>(rosterGrid); sliderAction.ValueChanged += delegate(int value) { rosterGrid.IconSize = value; settingsService.Set("RosterIconSize", value); }; m_RosterMenu.AddAction(sliderAction); m_InviteActions = new List <QAction>(); m_InviteMenu = new QMenu(this); m_InviteMenu.MenuAction().Text = "Invite To"; m_InviteMenu.AddAction("New Conference..."); m_RosterItemMenu = new QMenu(this); QObject.Connect <QAction>(m_RosterItemMenu, Qt.SIGNAL("triggered(QAction*)"), HandleRosterItemMenuTriggered); QObject.Connect(m_RosterItemMenu, Qt.SIGNAL("aboutToShow()"), RosterItemMenuAboutToShow); QObject.Connect(m_RosterItemMenu, Qt.SIGNAL("aboutToHide()"), RosterItemMenuAboutToHide); m_ViewProfileAction = new QAction("View Profile", m_RosterItemMenu); m_RosterItemMenu.AddAction(m_ViewProfileAction); m_IMAction = new QAction("IM", m_RosterItemMenu); m_RosterItemMenu.AddAction(m_IMAction); m_RosterItemMenu.AddAction("Send File..."); m_RosterItemMenu.AddMenu(m_InviteMenu); m_RosterItemMenu.AddAction("View History"); foreach (IActionCodon node in AddinManager.GetExtensionNodes("/Synapse/QtClient/Roster/FriendActions")) { m_RosterItemMenu.AddAction((QAction)node.CreateInstance(this)); } m_RosterItemMenu.AddSeparator(); m_EditGroupsAction = new QAction("Edit Groups", m_RosterItemMenu); m_RosterItemMenu.AddAction(m_EditGroupsAction); m_RemoveAction = new QAction("Remove", m_RosterItemMenu); m_RosterItemMenu.AddAction(m_RemoveAction); friendSearchLineEdit.InstallEventFilter(new KeyPressEater(delegate(QKeyEvent evnt) { if (evnt.Key() == (int)Key.Key_Escape) { friendSearchLineEdit.Clear(); rosterSearchButton.Checked = false; rosterGrid.SetFocus(); return(true); } return(false); }, this)); //QSizeGrip grip = new QSizeGrip(tabWidget); //tabWidget.SetCornerWidget(grip, Qt.Corner.BottomRightCorner); 0.UpTo(9).ForEach(num => { QAction action = new QAction(this); action.Shortcut = new QKeySequence("Alt+" + num.ToString()); QObject.Connect(action, Qt.SIGNAL("triggered(bool)"), delegate { tabWidget.CurrentIndex = num - 1; }); this.AddAction(action); }); var jsWindowObject = new SynapseJSObject(this); m_ActivityWebView.Page().linkDelegationPolicy = QWebPage.LinkDelegationPolicy.DelegateAllLinks; QObject.Connect <QUrl>(m_ActivityWebView, Qt.SIGNAL("linkClicked(QUrl)"), HandleActivityLinkClicked); QObject.Connect <bool>(m_ActivityWebView.Page(), Qt.SIGNAL("loadFinished(bool)"), HandleActivityPageLoadFinished); QObject.Connect(m_ActivityWebView.Page().MainFrame(), Qt.SIGNAL("javaScriptWindowObjectCleared()"), delegate { m_ActivityWebView.Page().MainFrame().AddToJavaScriptWindowObject("Synapse", jsWindowObject); }); m_ActivityWebView.Page().MainFrame().Load("resource:/feed.html"); //friendMucListWebView.Page().MainFrame().Load("resource:/friend-muclist.html"); //quickJoinMucContainer.Hide(); shoutContainer.Hide(); QObject.Connect(shoutLineEdit, Qt.SIGNAL("textChanged(const QString &)"), delegate { shoutCharsLabel.Text = (140 - shoutLineEdit.Text.Length).ToString(); }); QObject.Connect(shoutLineEdit, Qt.SIGNAL("returnPressed()"), delegate { SendShout(); }); QVBoxLayout layout = new QVBoxLayout(m_AccountsContainer); layout.Margin = 0; m_AccountsContainer.SetLayout(layout); m_MucModel = new BookmarkedMUCsModel(); mucTree.SetModel(m_MucModel); friendSearchContainer.Hide(); rosterViewButton.icon = new QIcon(new QPixmap("resource:/view-grid.png")); rosterSearchButton.icon = new QIcon(new QPixmap("resource:/simple-search.png")); addFriendButton.icon = new QIcon(new QPixmap("resource:/simple-add.png")); addMucBookmarkButton.icon = new QIcon(new QPixmap("resource:/simple-add.png")); feedFilterButton.icon = new QIcon(new QPixmap("resource:/simple-search.png")); m_CollapseIcon = new QIcon(new QPixmap("resource:/collapse.png")); m_ExpandIcon = new QIcon(new QPixmap("resource:/expand.png")); toggleJoinMucButton.icon = m_CollapseIcon; UpdateOnlineCount(); var shoutService = ServiceManager.Get <ShoutService>(); shoutService.HandlerAdded += HandleShoutHandlerAdded; shoutService.HandlerRemoved += HandleShoutHandlerRemoved; if (shoutService.Handlers.Count() > 0) { foreach (IShoutHandler handler in shoutService.Handlers) { HandleShoutHandlerAdded(handler); } } else { shoutHandlersBox.Hide(); } m_FeedFilterMenu = new QMenu(this); QObject.Connect(m_FeedFilterMenu, Qt.SIGNAL("triggered(QAction*)"), delegate(QAction action) { string js = Util.CreateJavascriptCall("ActivityFeed.setCategoryVisibility", action.Text.ToLower().Replace(" ", "-"), action.Checked); m_ActivityWebView.Page().MainFrame().EvaluateJavaScript(js); }); var feedService = ServiceManager.Get <ActivityFeedService>(); feedService.NewItem += delegate(IActivityFeedItem item) { lock (m_FeedItemQueue) { if (!m_FeedIsLoaded) { m_FeedItemQueue.Enqueue(item); } else { AddActivityFeedItem(item); } } }; feedService.CategoryAdded += delegate(string category) { QApplication.Invoke(delegate { HandleCategoryAdded(category); }); }; foreach (string category in feedService.Categories) { HandleCategoryAdded(category); } }
public void SetupUi(QMainWindow MainWindow) { if (MainWindow.ObjectName == "") { MainWindow.ObjectName = "MainWindow"; } QSize Size = new QSize(631, 570); Size = Size.ExpandedTo(MainWindow.MinimumSizeHint()); MainWindow.Size = Size; MainWindow.MinimumSize = new QSize(600, 450); MainWindow.WindowIcon = new QIcon(":/main/resources/monosim_128.png"); MenuFileNew = new QAction(MainWindow); MenuFileNew.ObjectName = "MenuFileNew"; MenuFileNew.icon = new QIcon(":/toolbar/resources/qt/document-new.png"); MenuFileOpen = new QAction(MainWindow); MenuFileOpen.ObjectName = "MenuFileOpen"; MenuFileOpen.icon = new QIcon(":/toolbar/resources/qt/document-open.png"); MenuFileSaveFile = new QAction(MainWindow); MenuFileSaveFile.ObjectName = "MenuFileSaveFile"; MenuFileSaveFile.Enabled = false; MenuFileSaveFile.icon = new QIcon(":/toolbar/resources/qt/document-save.png"); MenuFileSaveSim = new QAction(MainWindow); MenuFileSaveSim.ObjectName = "MenuFileSaveSim"; MenuFileSaveSim.Enabled = false; MenuFileSaveSim.icon = new QIcon(":/main/resources/chip_32.png"); MenuFileClose = new QAction(MainWindow); MenuFileClose.ObjectName = "MenuFileClose"; MenuFileClose.Enabled = false; MenuFileClose.icon = new QIcon(":/toolbar/resources/qt/document-close.png"); MenuFileSettings = new QAction(MainWindow); MenuFileSettings.ObjectName = "MenuFileSettings"; MenuFileSettings.icon = new QIcon(":/toolbar/resources/qt/configure.png"); MenuFileExit = new QAction(MainWindow); MenuFileExit.ObjectName = "MenuFileExit"; MenuFileExit.icon = new QIcon(":/toolbar/resources/qt/application-exit.png"); MenuSimConnect = new QAction(MainWindow); MenuSimConnect.ObjectName = "MenuSimConnect"; MenuSimConnect.icon = new QIcon(":/toolbar/resources/qt/network-connect.png"); MenuSimPin = new QAction(MainWindow); MenuSimPin.ObjectName = "MenuSimPin"; MenuSimPin.Enabled = false; MenuSimPin.icon = new QIcon(":/toolbar/resources/qt/document-encrypt.png"); MenuSimSaveFile = new QAction(MainWindow); MenuSimSaveFile.ObjectName = "MenuSimSaveFile"; MenuSimSaveFile.Enabled = false; MenuSimSaveFile.icon = new QIcon(":/toolbar/resources/qt/document-save.png"); MenuSimSaveSim = new QAction(MainWindow); MenuSimSaveSim.ObjectName = "MenuSimSaveSim"; MenuSimSaveSim.Enabled = false; MenuSimSaveSim.icon = new QIcon(":/main/resources/chip_32.png"); MenuSimDeleteAll = new QAction(MainWindow); MenuSimDeleteAll.ObjectName = "MenuSimDeleteAll"; MenuSimDeleteAll.Enabled = false; MenuSimDeleteAll.icon = new QIcon(":/toolbar/resources/qt/edit-delete.png"); MenuSimDisconnect = new QAction(MainWindow); MenuSimDisconnect.ObjectName = "MenuSimDisconnect"; MenuSimDisconnect.Enabled = false; MenuSimDisconnect.icon = new QIcon(":/toolbar/resources/qt/network-disconnect.png"); MenuAboutInfo = new QAction(MainWindow); MenuAboutInfo.ObjectName = "MenuAboutInfo"; MenuAboutInfo.icon = new QIcon(":/toolbar/resources/qt/dialog-information.png"); centralwidget = new QWidget(MainWindow); centralwidget.ObjectName = "centralwidget"; gridLayout = new QGridLayout(centralwidget); gridLayout.ObjectName = "gridLayout"; splitter = new QSplitter(centralwidget); splitter.ObjectName = "splitter"; splitter.Orientation = Qt.Orientation.Vertical; splitter.ChildrenCollapsible = false; FrameFile = new QGroupBox(splitter); FrameFile.ObjectName = "FrameFile"; FrameFile.MinimumSize = new QSize(0, 100); gridLayout1 = new QGridLayout(FrameFile); gridLayout1.ObjectName = "gridLayout1"; LstFileContacts = new QTreeWidget(FrameFile); LstFileContacts.ObjectName = "LstFileContacts"; LstFileContacts.Enabled = false; LstFileContacts.EditTriggers = Qyoto.Qyoto.GetCPPEnumValue("QAbstractItemView", "NoEditTriggers"); LstFileContacts.selectionMode = QAbstractItemView.SelectionMode.ExtendedSelection; LstFileContacts.ItemsExpandable = false; LstFileContacts.ExpandsOnDoubleClick = false; gridLayout1.AddWidget(LstFileContacts, 0, 0, 1, 1); splitter.AddWidget(FrameFile); FrameSim = new QGroupBox(splitter); FrameSim.ObjectName = "FrameSim"; FrameSim.MinimumSize = new QSize(0, 100); gridLayout2 = new QGridLayout(FrameSim); gridLayout2.ObjectName = "gridLayout2"; LstSimContacts = new QTreeWidget(FrameSim); LstSimContacts.ObjectName = "LstSimContacts"; LstSimContacts.Enabled = false; LstSimContacts.EditTriggers = Qyoto.Qyoto.GetCPPEnumValue("QAbstractItemView", "NoEditTriggers"); LstSimContacts.selectionMode = QAbstractItemView.SelectionMode.ExtendedSelection; LstSimContacts.ItemsExpandable = false; LstSimContacts.ExpandsOnDoubleClick = false; gridLayout2.AddWidget(LstSimContacts, 0, 0, 1, 1); splitter.AddWidget(FrameSim); gridLayout.AddWidget(splitter, 0, 0, 1, 1); MainWindow.SetCentralWidget(centralwidget); MainMenu = new QMenuBar(MainWindow); MainMenu.ObjectName = "MainMenu"; MainMenu.Geometry = new QRect(0, 0, 631, 24); MenuFileItem = new QMenu(MainMenu); MenuFileItem.ObjectName = "MenuFileItem"; MenuReaderItem = new QMenu(MainMenu); MenuReaderItem.ObjectName = "MenuReaderItem"; MenuAboutItem = new QMenu(MainMenu); MenuAboutItem.ObjectName = "MenuAboutItem"; MenuSimItem = new QMenu(MainMenu); MenuSimItem.ObjectName = "MenuSimItem"; MainWindow.SetMenuBar(MainMenu); StatusBar = new QStatusBar(MainWindow); StatusBar.ObjectName = "StatusBar"; MainWindow.SetStatusBar(StatusBar); TopToolBar = new QToolBar(MainWindow); TopToolBar.ObjectName = "TopToolBar"; TopToolBar.Movable = false; TopToolBar.Floatable = false; MainWindow.AddToolBar(Qt.ToolBarArea.TopToolBarArea, TopToolBar); MainMenu.AddAction(MenuFileItem.MenuAction()); MainMenu.AddAction(MenuReaderItem.MenuAction()); MainMenu.AddAction(MenuSimItem.MenuAction()); MainMenu.AddAction(MenuAboutItem.MenuAction()); MenuFileItem.AddAction(MenuFileNew); MenuFileItem.AddAction(MenuFileOpen); MenuFileItem.AddAction(MenuFileSaveFile); MenuFileItem.AddAction(MenuFileSaveSim); MenuFileItem.AddAction(MenuFileClose); MenuFileItem.AddSeparator(); MenuFileItem.AddAction(MenuFileSettings); MenuFileItem.AddSeparator(); MenuFileItem.AddAction(MenuFileExit); MenuAboutItem.AddAction(MenuAboutInfo); MenuSimItem.AddAction(MenuSimConnect); MenuSimItem.AddAction(MenuSimPin); MenuSimItem.AddSeparator(); MenuSimItem.AddAction(MenuSimSaveFile); MenuSimItem.AddAction(MenuSimSaveSim); MenuSimItem.AddAction(MenuSimDeleteAll); MenuSimItem.AddSeparator(); MenuSimItem.AddAction(MenuSimDisconnect); TopToolBar.AddAction(MenuFileNew); TopToolBar.AddAction(MenuFileOpen); TopToolBar.AddAction(MenuFileSaveFile); TopToolBar.AddAction(MenuFileSaveSim); TopToolBar.AddAction(MenuFileClose); TopToolBar.AddSeparator(); TopToolBar.AddAction(MenuFileSettings); TopToolBar.AddAction(MenuSimConnect); TopToolBar.AddAction(MenuSimPin); TopToolBar.AddAction(MenuSimSaveFile); TopToolBar.AddAction(MenuSimSaveSim); TopToolBar.AddAction(MenuSimDisconnect); TopToolBar.AddSeparator(); TopToolBar.AddAction(MenuAboutInfo); TopToolBar.AddAction(MenuFileExit); RetranslateUi(MainWindow); QMetaObject.ConnectSlotsByName(MainWindow); } // SetupUi
public static void Execute() { menuIni = new Menu("Darius", "Darius#", true); menuIni.Add(new MenuSeparator("note", "Darius The Dank Memes Master!")); menuIni.Add(new MenuSeparator("setting", "Global Settings")); //menuIni.Add("Items", new CheckBox("Use Items?")); menuIni.Add(new MenuBool("Combo", "Use Combo?")); menuIni.Add(new MenuBool("Harass", "Use Harass?")); menuIni.Add(new MenuBool("Clear", "Use Clear?")); menuIni.Add(new MenuBool("Drawings", "Use Drawings?")); menuIni.Add(new MenuBool("KillSteal", "Use KillSteal?")); QMenu = menuIni.Add(new Menu("qset", "Q Settings")); QMenu.Add(new MenuSeparator("qset1", "Q Settings")); QMenu.Add(new MenuBool("Combo", "Q Combo")); QMenu.Add(new MenuBool("Harass", "Q Harass")); QMenu.Add(new MenuSeparator("qset2", "Q LaneClear Settings")); QMenu.Add(new MenuBool("Clear", "Q LaneClear")); QMenu.Add(new MenuSlider("Qlc", "Q On Hit Minions >=", 3, 1, 10)); QMenu.Add(new MenuSeparator("extset", "Extra Settings")); QMenu.Add(new MenuBool("QE", "Always Q Before E", false)); QMenu.Add(new MenuBool("Stick", "Stick to Target while Casting Q")); QMenu.Add(new MenuBool("QAA", "Use Q if AA is in Cooldown", false)); QMenu.Add(new MenuBool("range", "Dont Cast Q when Enemy in AA range", false)); QMenu.Add(new MenuBool("Flee", "Q On Flee (Ignores Stick to target)")); QMenu.Add(new MenuSlider("QFlee", "Cast Q flee When HP is below %", 90)); QMenu.Add(new MenuBool("Qaoe", "Auto Q AoE")); QMenu.Add(new MenuSlider("Qhit", "Q Aoe Hit >=", 3, 1, 5)); WMenu = menuIni.Add(new Menu("wset", "W Settings")); WMenu.Add(new MenuSeparator("w", "W Settings")); WMenu.Add(new MenuBool("Combo", "W Combo")); WMenu.Add(new MenuBool("Harass", "W Harass")); WMenu.Add(new MenuBool("Clear", "W LaneClear")); WMenu.Add(new MenuSeparator("w2", "Extra Settings")); WMenu.Add(new MenuBool("AAr", "W AA Reset")); EMenu = menuIni.Add(new Menu("eset", "E Settings")); EMenu.Add(new MenuSeparator("e1", "E Settings")); EMenu.Add(new MenuBool("Combo", "E Combo")); EMenu.Add(new MenuBool("Harass", "E Harass")); EMenu.Add(new MenuSeparator("e2", "Extra Settings")); EMenu.Add(new MenuBool("Interrupt", "E To Interrupt")); RMenu = menuIni.Add(new Menu("rset", "R Settings")); RMenu.Add(new MenuSeparator("r1", "R Settings")); RMenu.Add(new MenuBool("Combo", "R Combo Finisher")); RMenu.Add(new MenuBool("stack", "Use R On Stacks", false)); RMenu.Add(new MenuSlider("count", "Cast R On Stacks >=", 5, 0, 5)); RMenu.Add(new MenuBool("SaveR", "Dont Ult if target killable with AA", false)); RMenu.Add(new MenuSlider("SR", "Dont Use Ult if target can be kill With X AA", 1, 0, 6)); RMenu.Add(new MenuKeyBind("semiR", "Semi-Auto R", System.Windows.Forms.Keys.T, KeyBindType.Press)); KillStealMenu = menuIni.Add(new Menu("ksset", "KillSteal")); KillStealMenu.Add(new MenuSeparator("k1", "KillSteal Settings")); KillStealMenu.Add(new MenuBool("Rks", "R KillSteal")); if (ObjectManager.Player.Spellbook.Spells.FirstOrDefault(o => o.SData.Name.Contains("SummonerDot")) != null) { KillStealMenu.Add(new MenuBool("IGP", "Ignite + Passive Kill")); KillStealMenu.Add(new MenuBool("IG", "Ignite Only", false)); KillStealMenu.Add(new MenuSeparator("k2", "Iginte + Passive takes in account Max Ignite + Passive dmg")); Ignite = new Spell(ObjectManager.Player.GetSpellSlot("summonerdot"), 600); } ManaMenu = menuIni.Add(new Menu("manaset", "Mana Manager")); ManaMenu.Add(new MenuSeparator("hmana", "Harass")); ManaMenu.Add(new MenuSlider("harassmana", "Harass Mana %", 75)); ManaMenu.Add(new MenuSeparator("lclear", "Lane Clear")); ManaMenu.Add(new MenuSlider("lanemana", "Lane Clear Mana %", 60)); DrawMenu = menuIni.Add(new Menu("drawing", "Drawings")); DrawMenu.Add(new MenuSeparator("d1", "Drawing Settings")); DrawMenu.Add(new MenuBool("Q", "Draw Q")); DrawMenu.Add(new MenuBool("W", "Draw W")); DrawMenu.Add(new MenuBool("E", "Draw E")); DrawMenu.Add(new MenuBool("R", "Draw R")); DrawMenu.Add(new MenuSeparator("d2", "Ultimate Drawings")); DrawMenu.Add(new MenuBool("DrawD", "Draw R Damage")); DrawMenu.Add(new MenuBool("Killable", "Draw Killable")); DrawMenu.Add(new MenuBool("Stacks", "Draw Passive Stacks")); DrawMenu.Add(new MenuSlider("PPx", "Passive Stacks Position X", 100, 0, 150)); DrawMenu.Add(new MenuSlider("PPy", "Passive Stacks Position Y", 100, 0, 150)); DrawMenu.Add(new MenuBool("RHealth", "Draw After R health")); DrawMenu.Add(new MenuSlider("RHx", "After R health Position", 135, 0, 150)); menuIni.Attach(); Q = new Spell(SpellSlot.Q, 400f); W = new Spell(SpellSlot.W, 300f); E = new Spell(SpellSlot.E, 550f); R = new Spell(SpellSlot.R, 475f); E.SetSkillshot(0.25f, 80f, 1000f, false, SkillshotType.Cone); R.SetTargetted(0.5f, 1000f); //AIBaseClient.OnBuffGain += AIBaseClient_OnBuffGain; Game.OnUpdate += OnUpdate; Drawing.OnDraw += OnDraw; Drawing.OnEndScene += OnEndScene; Orbwalker.OnAction += OnAfterAttack; //Orbwalk.OnPostAttack += Orbwalk_OnPostAttack; AIBaseClient.OnProcessSpellCast += AIBaseClient_OnProcessSpellCast; Interrupter.OnInterrupterSpell += Interrupter_OnInterrupterSpell; }
public AccountStatusWidget(Account account, RosterWidget parent, MainWindow parentWindow) : base(parent) { SetupUi(); m_ParentWindow = parentWindow; m_EditProfileDialog = new EditProfileDialog(account, this.TopLevelWidget()); m_AvatarLabel.Cursor = new QCursor(CursorShape.PointingHandCursor); m_AvatarLabel.Clicked += delegate { if (m_Account.ConnectionState == AccountConnectionState.Connected) { m_EditProfileDialog.Show(2); m_EditProfileDialog.ActivateWindow(); } else { // FIXME: It really wouldn't be so hard to make this work. // On connect, check to see if it was changed and update server. QMessageBox.Warning(this.TopLevelWidget(), "Synapse", "Cannot edit avatar when you're not connected."); } }; m_Account = account; m_Account.ConnectionStateChanged += OnAccountStateChanged; m_Account.StatusChanged += OnAccountStateChanged; m_Account.MyVCardUpdated += HandleMyVCardUpdated; m_Account.AvatarManager.AvatarUpdated += HandleAvatarUpdated; OnAccountStateChanged(account); HandleAvatarUpdated(m_Account.Jid.Bare, null); HandleMyVCardUpdated(null, EventArgs.Empty); m_NameLabel.TextFormat = TextFormat.RichText; HandleAvatarUpdated(m_Account.Jid.Bare, m_Account.GetProperty("AvatarHash")); m_PresenceMenu = new QMenu(this); QObject.Connect(m_PresenceMenu, Qt.SIGNAL("aboutToShow()"), HandlePresenceMenuAboutToShow); QObject.Connect <QAction>(m_PresenceMenu, Qt.SIGNAL("triggered(QAction*)"), HandlePresenceMenuTriggered); QActionGroup group = new QActionGroup(this); group.Exclusive = true; m_AvailableAction = m_PresenceMenu.AddAction("Available"); group.AddAction(m_AvailableAction); m_AvailableAction.Checkable = true; m_FreeToChatAction = m_PresenceMenu.AddAction("Free To Chat"); group.AddAction(m_FreeToChatAction); m_FreeToChatAction.Checkable = true; m_AwayAction = m_PresenceMenu.AddAction("Away"); group.AddAction(m_AwayAction); m_AwayAction.Checkable = true; m_ExtendedAwayAction = m_PresenceMenu.AddAction("Extended Away"); group.AddAction(m_ExtendedAwayAction); m_ExtendedAwayAction.Checkable = true; m_DoNotDisturbAction = m_PresenceMenu.AddAction("Do Not Disturb"); group.AddAction(m_DoNotDisturbAction); m_DoNotDisturbAction.Checkable = true; m_PresenceMenu.AddSeparator(); m_OfflineAction = m_PresenceMenu.AddAction("Offline"); group.AddAction(m_OfflineAction); m_OfflineAction.Checkable = true; }
public TabbedChatsWindow() { // FIXME: This doesn't work very well in most themes... //this.SetStyleSheet("QTabWidget::pane { border: 0px; }"); // The tab widget messes up this background color. this.SetStyleSheet("QTabWidget > QWidget { background: palette(window); }"); m_Tabs = new QTabWidget(); m_Tabs.tabPosition = QTabWidget.TabPosition.South; QToolButton newTabButton = new QToolButton(m_Tabs); newTabButton.AutoRaise = true; newTabButton.SetDefaultAction(new QAction(Gui.LoadIcon("tab-new", 16), "New Tab", newTabButton)); newTabButton.SetToolButtonStyle(Qt.ToolButtonStyle.ToolButtonIconOnly); QObject.Connect <QAction>(newTabButton, Qt.SIGNAL("triggered(QAction*)"), HandleNewTab); m_Tabs.SetCornerWidget(newTabButton, Qt.Corner.BottomLeftCorner); QHBoxLayout rightButtonsLayout = new QHBoxLayout(); rightButtonsLayout.SetContentsMargins(0, 0, 0, 0); rightButtonsLayout.Spacing = 0; QToolButton closeTabButton = new QToolButton(m_Tabs); closeTabButton.SetToolButtonStyle(Qt.ToolButtonStyle.ToolButtonIconOnly); closeTabButton.AutoRaise = true; closeTabButton.SetDefaultAction(new QAction(Gui.LoadIcon("window-close", 16), "Close Tab", closeTabButton)); QObject.Connect <QAction>(closeTabButton, Qt.SIGNAL("triggered(QAction*)"), HandleCloseTab); rightButtonsLayout.AddWidget(closeTabButton); QMenu menu = new QMenu(this); menu.AddAction(new QIcon(), "No Recently Closed Tabs"); QToolButton trashButton = new QToolButton(m_Tabs); trashButton.SetToolButtonStyle(Qt.ToolButtonStyle.ToolButtonIconOnly); trashButton.AutoRaise = true; trashButton.PopupMode = QToolButton.ToolButtonPopupMode.InstantPopup; trashButton.SetMenu(menu); trashButton.SetDefaultAction(new QAction(Gui.LoadIcon("user-trash", 16), "Recently Closed Tabs", trashButton)); rightButtonsLayout.AddWidget(trashButton); // FIXME: This looks bad. //rightButtonsLayout.AddWidget(new QSizeGrip(this)); QWidget rightButtonsContainer = new QWidget(m_Tabs); rightButtonsContainer.SetLayout(rightButtonsLayout); m_Tabs.SetCornerWidget(rightButtonsContainer, Qt.Corner.BottomRightCorner); QVBoxLayout layout = new QVBoxLayout(this); layout.SetContentsMargins(0, 0, 0, 0); layout.AddWidget(m_Tabs, 1, 0); this.SetLayout(layout); QObject.Connect <int>(m_Tabs, Qt.SIGNAL("currentChanged(int)"), HandleCurrentChanged); this.SetGeometry(0, 0, 445, 370); Gui.CenterWidgetOnScreen(this); QAction closeAction = new QAction(this); QObject.Connect <bool>(closeAction, Qt.SIGNAL("triggered(bool)"), HandleCloseActionTriggered); closeAction.Shortcut = new QKeySequence("Ctrl+w"); this.AddAction(closeAction); 0.UpTo(9).ForEach(num => { QAction action = new QAction(this); action.Shortcut = new QKeySequence("Alt+" + num.ToString()); QObject.Connect(action, Qt.SIGNAL("triggered(bool)"), delegate { m_Tabs.CurrentIndex = num - 1; }); this.AddAction(action); }); QAction nextTabAction = new QAction(this); nextTabAction.Shortcut = new QKeySequence(QKeySequence.StandardKey.NextChild); QObject.Connect(nextTabAction, Qt.SIGNAL("triggered(bool)"), delegate { if (m_Tabs.CurrentIndex == m_Tabs.Count - 1) { m_Tabs.CurrentIndex = 0; } else { m_Tabs.CurrentIndex += 1; } }); this.AddAction(nextTabAction); QAction prevTabAction = new QAction(this); prevTabAction.Shortcut = new QKeySequence(QKeySequence.StandardKey.PreviousChild); QObject.Connect(prevTabAction, Qt.SIGNAL("triggered(bool)"), delegate { if (m_Tabs.CurrentIndex == 0) { m_Tabs.CurrentIndex = m_Tabs.Count - 1; } else { m_Tabs.CurrentIndex -= 1; } }); var accountService = ServiceManager.Get <AccountService>(); accountService.AccountAdded += HandleAccountAdded; accountService.AccountRemoved += HandleAccountRemoved; foreach (Account account in accountService.Accounts) { HandleAccountAdded(account); } var settingsService = ServiceManager.Get <SettingsService>(); if (settingsService.Has("ChatsWindowGeometry")) { var geometry = settingsService.Get <byte[]>("ChatsWindowGeometry"); base.RestoreGeometry(QByteArrayConverter.FromArray(geometry)); } }
public void SetupUi(QMainWindow MainWindow) { if (MainWindow.ObjectName == "") MainWindow.ObjectName = "MainWindow"; QSize Size = new QSize(631, 570); Size = Size.ExpandedTo(MainWindow.MinimumSizeHint()); MainWindow.Size = Size; MainWindow.MinimumSize = new QSize(600, 550); MainWindow.WindowIcon = new QIcon(":/main/resources/Images/comex_256.png"); action_Open = new QAction(MainWindow); action_Open.ObjectName = "action_Open"; action_Open.icon = new QIcon(":/main/resources/Images/document-open.png"); action_Close = new QAction(MainWindow); action_Close.ObjectName = "action_Close"; action_Close.Enabled = false; action_Close.icon = new QIcon(":/main/resources/Images/document-close.png"); action_Exit = new QAction(MainWindow); action_Exit.ObjectName = "action_Exit"; action_Exit.icon = new QIcon(":/main/resources/Images/application-exit.png"); action_Info = new QAction(MainWindow); action_Info.ObjectName = "action_Info"; action_Info.icon = new QIcon(":/main/resources/Images/dialog-information.png"); action_ATR = new QAction(MainWindow); action_ATR.ObjectName = "action_ATR"; action_ATR.icon = new QIcon(":/main/resources/Images/quickopen.png"); action_Exec_Command = new QAction(MainWindow); action_Exec_Command.ObjectName = "action_Exec_Command"; action_SerialSettings = new QAction(MainWindow); action_SerialSettings.ObjectName = "action_SerialSettings"; action_SerialSettings.icon = new QIcon(":/main/resources/Images/configure.png"); centralwidget = new QWidget(MainWindow); centralwidget.ObjectName = "centralwidget"; gridLayout = new QGridLayout(centralwidget); gridLayout.ObjectName = "gridLayout"; FrameATR = new QGroupBox(centralwidget); FrameATR.ObjectName = "FrameATR"; QSizePolicy sizePolicy = new QSizePolicy(QSizePolicy.Policy.Preferred, QSizePolicy.Policy.Fixed); sizePolicy.SetHorizontalStretch(0); sizePolicy.SetVerticalStretch(0); sizePolicy.SetHeightForWidth(FrameATR.SizePolicy.HasHeightForWidth()); FrameATR.SizePolicy = sizePolicy; gridLayout1 = new QGridLayout(FrameATR); gridLayout1.ObjectName = "gridLayout1"; TxtATR = new QLineEdit(FrameATR); TxtATR.ObjectName = "TxtATR"; TxtATR.StyleSheet = "color: rgb(30, 109, 30);"; TxtATR.ReadOnly = true; gridLayout1.AddWidget(TxtATR, 0, 0, 1, 1); gridLayout.AddWidget(FrameATR, 0, 0, 1, 1); FrameFile = new QGroupBox(centralwidget); FrameFile.ObjectName = "FrameFile"; gridLayout2 = new QGridLayout(FrameFile); gridLayout2.ObjectName = "gridLayout2"; LstCommands = new QListWidget(FrameFile); LstCommands.ObjectName = "LstCommands"; LstCommands.EditTriggers = Qyoto.Qyoto.GetCPPEnumValue("QAbstractItemView", "NoEditTriggers"); gridLayout2.AddWidget(LstCommands, 0, 0, 1, 1); gridLayout.AddWidget(FrameFile, 1, 0, 1, 1); FrameExchange = new QGroupBox(centralwidget); FrameExchange.ObjectName = "FrameExchange"; sizePolicy.SetHeightForWidth(FrameExchange.SizePolicy.HasHeightForWidth()); FrameExchange.SizePolicy = sizePolicy; gridLayout3 = new QGridLayout(FrameExchange); gridLayout3.ObjectName = "gridLayout3"; LblCommand = new QLabel(FrameExchange); LblCommand.ObjectName = "LblCommand"; gridLayout3.AddWidget(LblCommand, 0, 0, 1, 1); TxtCmd = new QLineEdit(FrameExchange); TxtCmd.ObjectName = "TxtCmd"; TxtCmd.StyleSheet = "color: rgb(30, 109, 30);"; gridLayout3.AddWidget(TxtCmd, 0, 1, 1, 1); BtnSend = new QPushButton(FrameExchange); BtnSend.ObjectName = "BtnSend"; BtnSend.icon = new QIcon(":/main/resources/Images/arrow-right.png"); gridLayout3.AddWidget(BtnSend, 0, 2, 1, 1); LblResponse = new QLabel(FrameExchange); LblResponse.ObjectName = "LblResponse"; gridLayout3.AddWidget(LblResponse, 1, 0, 1, 1); TxtResp = new QLineEdit(FrameExchange); TxtResp.ObjectName = "TxtResp"; TxtResp.StyleSheet = "color: rgb(0, 0, 255);"; TxtResp.ReadOnly = true; gridLayout3.AddWidget(TxtResp, 1, 1, 1, 1); gridLayout.AddWidget(FrameExchange, 2, 0, 1, 1); MainWindow.SetCentralWidget(centralwidget); menubar = new QMenuBar(MainWindow); menubar.ObjectName = "menubar"; menubar.Geometry = new QRect(0, 0, 631, 24); menu_File = new QMenu(menubar); menu_File.ObjectName = "menu_File"; menu_Reader = new QMenu(menubar); menu_Reader.ObjectName = "menu_Reader"; menu_About = new QMenu(menubar); menu_About.ObjectName = "menu_About"; MainWindow.SetMenuBar(menubar); statusbar = new QStatusBar(MainWindow); statusbar.ObjectName = "statusbar"; MainWindow.SetStatusBar(statusbar); toolBar = new QToolBar(MainWindow); toolBar.ObjectName = "toolBar"; toolBar.Movable = false; toolBar.ToolButtonStyle = Qt.ToolButtonStyle.ToolButtonTextBesideIcon; toolBar.Floatable = false; MainWindow.AddToolBar(Qt.ToolBarArea.TopToolBarArea, toolBar); menubar.AddAction(menu_File.MenuAction()); menubar.AddAction(menu_Reader.MenuAction()); menubar.AddAction(menu_About.MenuAction()); menu_File.AddAction(action_Open); menu_File.AddAction(action_Close); menu_File.AddSeparator(); menu_File.AddAction(action_SerialSettings); menu_File.AddSeparator(); menu_File.AddAction(action_Exit); menu_About.AddAction(action_Info); toolBar.AddAction(action_Open); toolBar.AddAction(action_Close); toolBar.AddAction(action_SerialSettings); toolBar.AddAction(action_ATR); toolBar.AddAction(action_Info); toolBar.AddSeparator(); toolBar.AddAction(action_Exit); RetranslateUi(MainWindow); QMetaObject.ConnectSlotsByName(MainWindow); }
public static void LoadOKTW() { Q = new Spell(SpellSlot.Q, 625f); W = new Spell(SpellSlot.W, 550f); E = new Spell(SpellSlot.E); R = new Spell(SpellSlot.R, 625f); FR = new Spell(SpellSlot.R, 1000f); Q.SetTargetted(0.25f, 1400f); W.SetSkillshot(0.3f, 80f, float.MaxValue, false, SkillshotType.SkillshotLine); R.SetSkillshot(0.20f, 250f, float.MaxValue, false, SkillshotType.SkillshotCircle); FR.SetSkillshot(0.20f, 250f, float.MaxValue, false, SkillshotType.SkillshotCircle); flash = Player.GetSpellSlot("summonerflash"); drawMenu = Config.AddSubMenu("Draw"); drawMenu.Add("qRange", new CheckBox("Q range")); drawMenu.Add("wRange", new CheckBox("W range")); drawMenu.Add("rRange", new CheckBox("R range")); drawMenu.Add("onlyRdy", new CheckBox("Draw only ready spells")); QMenu = Config.AddSubMenu("Q Config"); QMenu.Add("autoQ", new CheckBox("Auto Q")); QMenu.Add("harrasQ", new CheckBox("Harass Q")); WMenu = Config.AddSubMenu("W Config"); WMenu.Add("autoW", new CheckBox("Auto W")); WMenu.Add("harrasW", new CheckBox("Harass W")); EMenu = Config.AddSubMenu("E Config"); EMenu.Add("autoE", new CheckBox("Auto E stack stun")); RMenu = Config.AddSubMenu("R Config"); RMenu.AddLabel("0 : Normal"); RMenu.AddLabel("1 : Always"); RMenu.AddLabel("2 : Never"); RMenu.AddLabel("3 : Always Stun"); foreach (var enemy in ObjectManager.Get <AIHeroClient>().Where(enemy => enemy.IsEnemy)) { RMenu.Add("UM" + enemy.NetworkId, new Slider(enemy.ChampionName, 0, 0, 3)); } RMenu.AddSeparator(); RMenu.Add("autoRks", new CheckBox("Auto R KS")); RMenu.Add("autoRcombo", new CheckBox("Auto R Combo if stun is ready")); RMenu.Add("rCount", new Slider("Auto R x enemies", 3, 2, 5)); RMenu.Add("tibers", new CheckBox("Tibbers Auto Pilot")); if (flash != SpellSlot.Unknown) { RMenu.Add("rCountFlash", new Slider("Auto flash + R stun x enemies", 4, 2, 5)); } FarmMenu = Config.AddSubMenu("Farm"); FarmMenu.Add("farmQ", new CheckBox("Farm Q")); FarmMenu.Add("farmW", new CheckBox("Lane clear W")); FarmMenu.Add("Mana", new Slider("LaneClear Mana", 60)); Game.OnUpdate += Game_OnGameUpdate; GameObject.OnCreate += Obj_AI_Base_OnCreate; Drawing.OnDraw += Drawing_OnDraw; }
internal ChatWindow(IChatHandler handler) { if (handler == null) { throw new ArgumentNullException("handler"); } m_Handler = handler; var settingsService = ServiceManager.Get <SettingsService>(); SetupUi(); if (handler is MucHandler) { m_ParticipantsMenu = new QMenu(this); QObject.Connect(m_ParticipantsMenu, Qt.SIGNAL("aboutToShow()"), HandleMenuAboutToShow); QObject.Connect(m_ParticipantsMenu, Qt.SIGNAL("aboutToHide()"), HandleMenuAboutToHide); var mucHandler = (MucHandler)handler; participantsGrid.Model = mucHandler.GridModel; participantsGrid.ContextMenuPolicy = Qt.ContextMenuPolicy.CustomContextMenu; participantsGrid.ItemActivated += HandleItemActivated; participantsGrid.ListMode = settingsService.Get <bool>("MucListMode"); if (settingsService.Has("MucIconSize")) { participantsGrid.IconSize = settingsService.Get <int>("MucIconSize"); } var group = new QActionGroup(this); var gridModeAction = new QAction("View as Grid", this); QObject.Connect(gridModeAction, Qt.SIGNAL("triggered()"), HandleGridModeActionTriggered); gridModeAction.SetActionGroup(group); gridModeAction.Checkable = true; gridModeAction.Checked = true; m_ParticipantsMenu.AddAction(gridModeAction); var listModeAction = new QAction("View as List", this); QObject.Connect(listModeAction, Qt.SIGNAL("triggered()"), HandleListModeActionTriggered); listModeAction.SetActionGroup(group); listModeAction.Checkable = true; listModeAction.Checked = participantsGrid.ListMode; m_ParticipantsMenu.AddAction(listModeAction); var separatorAction = new QAction(participantsGrid); separatorAction.SetSeparator(true); m_ParticipantsMenu.AddAction(separatorAction); var sliderAction = new AvatarGridZoomAction <jabber.connection.RoomParticipant>(participantsGrid); sliderAction.ValueChanged += delegate(int value) { participantsGrid.IconSize = value; settingsService.Set("MucIconSize", value); }; m_ParticipantsMenu.AddAction(sliderAction); m_ParticipantItemMenu = new QMenu(this); QObject.Connect(m_ParticipantItemMenu, Qt.SIGNAL("aboutToShow()"), HandleMenuAboutToShow); QObject.Connect(m_ParticipantItemMenu, Qt.SIGNAL("aboutToHide()"), HandleMenuAboutToHide); var mucViewProfileAction = new QAction("View Profile", this); QObject.Connect(mucViewProfileAction, Qt.SIGNAL("triggered()"), HandleMucViewProfileActionTriggered); m_ParticipantItemMenu.AddAction(mucViewProfileAction); var mucPrivateMessageAction = new QAction("IM", this); QObject.Connect(mucPrivateMessageAction, Qt.SIGNAL("triggered()"), HandleMucPrivateMessageTriggered); m_ParticipantItemMenu.AddAction(mucPrivateMessageAction); var mucSendFileAction = new QAction("Send File...", this); QObject.Connect(mucSendFileAction, Qt.SIGNAL("triggered()"), HandleMucSendFileActionTriggered); m_ParticipantItemMenu.AddAction(mucSendFileAction); var mucViewHistoryAction = new QAction("View History", this); QObject.Connect(mucViewHistoryAction, Qt.SIGNAL("triggered()"), HandleMucViewHistoryActionTriggered); m_ParticipantItemMenu.AddAction(mucViewHistoryAction); m_ModeratorActionsMenu = new QMenu("Moderator Actions", this); var roomRoleActionGroup = new QActionGroup(this); QObject.Connect(roomRoleActionGroup, Qt.SIGNAL("triggered(QAction*)"), this, Qt.SLOT("HandleRoomRoleActionGroupTriggered(QAction*)")); m_ModeratorAction = new QAction("Moderator",this); roomRoleActionGroup.AddAction(m_ModeratorAction); m_ModeratorAction.Checkable = true; m_ModeratorActionsMenu.AddAction(m_ModeratorAction); m_ParticipantAction = new QAction("Participant",this); roomRoleActionGroup.AddAction(m_ParticipantAction); m_ParticipantAction.Checkable = true; m_ModeratorActionsMenu.AddAction(m_ParticipantAction); m_VisitorAction = new QAction("Visitor",this); roomRoleActionGroup.AddAction(m_VisitorAction); m_VisitorAction.Checkable = true; m_ModeratorActionsMenu.AddAction(m_VisitorAction); m_ModeratorActionsMenu.AddSeparator(); var mucKickAction = new QAction("Kick...",this); QObject.Connect(mucKickAction,Qt.SIGNAL("triggered()"),HandleMucKickActionTriggered); m_ModeratorActionsMenu.AddAction(mucKickAction); var mucBanAction = new QAction("Ban...",this); QObject.Connect(mucBanAction,Qt.SIGNAL("triggered()"),HandleMucBanActionTriggered); m_ModeratorActionsMenu.AddAction(mucBanAction); m_ModeratorActionsMenu.AddSeparator(); m_ChangeAffiliationAction = new QAction("Change Affiliation...",this); QObject.Connect(m_ChangeAffiliationAction,Qt.SIGNAL("triggered()"),HandleChangeAffiliationTriggered); m_ModeratorActionsMenu.AddAction(m_ChangeAffiliationAction); m_ParticipantItemMenu.AddSeparator(); m_ParticipantItemMenu.AddMenu(m_ModeratorActionsMenu); m_ParticipantItemMenu.AddSeparator(); m_AddAsFriendAction = new QAction("Add as Friend",this); m_ParticipantItemMenu.AddAction(m_AddAsFriendAction); this.WindowTitle = mucHandler.Room.JID.User; // FIXME: Show only "user" in tab, show full room jid in title? this.WindowIcon = Gui.LoadIcon("internet-group-chat"); } else { var chatHandler = (ChatHandler)handler; rightContainer.Hide(); if (((ChatHandler)handler).IsMucMessage) { this.WindowTitle = chatHandler.Jid.Resource; } else { this.WindowTitle = chatHandler.Account.GetDisplayName(chatHandler.Jid); } this.WindowIcon = new QIcon((QPixmap)Synapse.Xmpp.AvatarManager.GetAvatar(chatHandler.Jid)); } m_ConversationWidget.ChatHandler = handler; handler.ReadyChanged += HandleReadyChanged; splitter.SetStretchFactor(1,0); splitter_2.SetStretchFactor(1,0); if (settingsService.Has("MucSplitterState")) { byte[] state = settingsService.Get <byte[]>("MucSplitterState"); splitter_2.RestoreState(QByteArrayConverter.FromArray(state)); } KeyPressEater eater = new KeyPressEater(this); eater.KeyEvent += HandleKeyEvent; textEdit.InstallEventFilter(eater); QToolBar toolbar = new QToolBar(this); toolbar.IconSize = new QSize(16,16); var formatMenuButton = new QToolButton(this); var formatMenu = new QMenu(this); QObject.Connect <QAction>(formatMenu,Qt.SIGNAL("triggered(QAction*)"),HandleFormatMenuActionTriggered); formatMenuButton.ToolButtonStyle = ToolButtonStyle.ToolButtonTextBesideIcon; formatMenuButton.Text = "Format"; formatMenuButton.icon = Gui.LoadIcon("preferences-desktop-font",16); formatMenuButton.PopupMode = QToolButton.ToolButtonPopupMode.InstantPopup; formatMenuButton.SetMenu(formatMenu); toolbar.AddWidget(formatMenuButton); m_BoldAction = new QAction(Gui.LoadIcon("format-text-bold",16),"Bold",this); m_BoldAction.Shortcut = "Ctrl+B"; m_BoldAction.Checkable = true; formatMenu.AddAction(m_BoldAction); m_ItalicAction = new QAction(Gui.LoadIcon("format-text-italic",16),"Italic",this); m_ItalicAction.Shortcut = "Ctrl+I"; m_ItalicAction.Checkable = true; formatMenu.AddAction(m_ItalicAction); m_UnderlineAction = new QAction(Gui.LoadIcon("format-text-underline",16),"Underline",this); m_UnderlineAction.Shortcut = "Ctrl+U"; m_UnderlineAction.Checkable = true; formatMenu.AddAction(m_UnderlineAction); m_StrikethroughAction = new QAction(Gui.LoadIcon("format-text-strikethrough",16),"Strikethrough",this); m_StrikethroughAction.Shortcut = "Ctrl+S"; m_StrikethroughAction.Checkable = true; formatMenu.AddAction(m_StrikethroughAction); formatMenu.AddSeparator(); m_ClearFormattingAction = new QAction(Gui.LoadIcon("edit-clear",16),"Clear Formatting",this); formatMenu.AddAction(m_ClearFormattingAction); var insertMenu = new QMenu(this); var insertMenuButton = new QToolButton(this); insertMenuButton.ToolButtonStyle = ToolButtonStyle.ToolButtonTextBesideIcon; insertMenuButton.Text = "Insert"; insertMenuButton.icon = Gui.LoadIcon("image-x-generic",16); insertMenuButton.PopupMode = QToolButton.ToolButtonPopupMode.InstantPopup; insertMenuButton.SetMenu(insertMenu); toolbar.AddWidget(insertMenuButton); m_InsertPhotoAction = new QAction(Gui.LoadIcon("insert-image",16),"Photo...",this); QObject.Connect(m_InsertPhotoAction,Qt.SIGNAL("triggered()"),HandleInsertImageActionTriggered); insertMenu.AddAction(m_InsertPhotoAction); m_InsertLinkAction = new QAction(Gui.LoadIcon("insert-link",16),"Link...",this); QObject.Connect(m_InsertLinkAction,Qt.SIGNAL("triggered()"),HandleInsertLinkActionTriggered); insertMenu.AddAction(m_InsertLinkAction); foreach (IActionCodon node in AddinManager.GetExtensionNodes("/Synapse/QtClient/ChatWindow/InsertActions")) { insertMenu.AddAction((QAction)node.CreateInstance(this)); } toolbar.AddSeparator(); var activitiesMenu = new QMenu(this); var activitiesMenuButton = new QToolButton(this); activitiesMenuButton.ToolButtonStyle = ToolButtonStyle.ToolButtonTextBesideIcon; activitiesMenuButton.Text = "Activities"; activitiesMenuButton.icon = Gui.LoadIcon("applications-games",16); // FIXME: Not a good icon. activitiesMenuButton.PopupMode = QToolButton.ToolButtonPopupMode.InstantPopup; activitiesMenuButton.SetMenu(activitiesMenu); toolbar.AddWidget(activitiesMenuButton); m_InviteToMucAction = new QAction(Gui.LoadIcon("internet-group-chat",16),"Invite to Conference...",this); QObject.Connect(m_InviteToMucAction,Qt.SIGNAL("triggered()"),HandleInviteToMucActionTriggered); activitiesMenu.AddAction(m_InviteToMucAction); activitiesMenu.AddSeparator(); activitiesMenu.AddAction(Gui.LoadIcon("applications-graphics",16),"Launch Whiteboard..."); activitiesMenu.AddAction(Gui.LoadIcon("user-desktop",16),"Share Desktop..."); var spacerWidget = new QWidget(toolbar); spacerWidget.SetSizePolicy(QSizePolicy.Policy.Expanding,QSizePolicy.Policy.Fixed); toolbar.AddWidget(spacerWidget); var toContainer = new QWidget(toolbar); var layout = new QHBoxLayout(toContainer); layout.SetContentsMargins(0,0,4,0); m_ToComboBox = new QComboBox(toContainer); layout.AddWidget(new QLabel("To:",toContainer)); layout.AddWidget(m_ToComboBox); QAction toWidgetAction = (QWidgetAction)toolbar.AddWidget(toContainer); m_ToComboBox.AddItem("Automatic","auto"); m_ToComboBox.InsertSeparator(1); ((QVBoxLayout)bottomContainer.Layout()).InsertWidget(0,toolbar); if (handler is ChatHandler) { var chatHandler = (ChatHandler)handler; handler.Account.Client.OnPresence += delegate(object sender,Presence pres) { if (pres.From.Bare != chatHandler.Jid.Bare || pres.Priority == "-1") { return; } QApplication.Invoke(delegate { if (!String.IsNullOrEmpty(pres.From.Resource)) { if (pres.Type == PresenceType.available) { string text = String.Format("{0} ({1})",Helper.GetResourceDisplay(pres),Helper.GetPresenceDisplay(pres)); int i = m_ToComboBox.FindData(pres.From.Resource); if (i == -1) { m_ToComboBox.AddItem(text,pres.From.Resource); } else { m_ToComboBox.SetItemText(i,text); } } else if (pres.Type == PresenceType.unavailable) { int i = m_ToComboBox.FindData(pres.From.Resource); if (i > -1) { m_ToComboBox.RemoveItem(i); m_ToComboBox.CurrentIndex = 0; } } } if (chatHandler.IsMucMessage) { toWidgetAction.Visible = false; } else { string title = null; if (handler.Account.PresenceManager[pres.From.BareJID] == null) { title = String.Format("{0} (Offline)",chatHandler.Account.GetDisplayName(chatHandler.Jid)); } else { title = chatHandler.Account.GetDisplayName(chatHandler.Jid); } Gui.TabbedChatsWindow.SetTabTitle(this,title); } }); }; foreach (var presence in chatHandler.Account.PresenceManager.GetAll(chatHandler.Jid)) { if (presence.Priority != "-1" && !String.IsNullOrEmpty(presence.From.Resource)) { string text = String.Format("{0} ({1})",Helper.GetResourceDisplay(presence),Helper.GetPresenceDisplay(presence)); m_ToComboBox.AddItem(text,presence.From.Resource); } } // FIXME: Make this a menu with "View Profile" and "View History". var viewProfileAction = new QAction(Gui.LoadIcon("info",16),"View Profile",this); QObject.Connect(viewProfileAction,Qt.SIGNAL("triggered()"),HandleViewProfileActionTriggered); toolbar.AddAction(viewProfileAction); } else { toWidgetAction.Visible = false; } QObject.Connect <bool>(m_ConversationWidget.Page(),Qt.SIGNAL("loadFinished(bool)"),delegate(bool ok) { if (!ok) { throw new Exception("Failed to load chat html."); } handler.NewContent += HandleNewContent; m_Handler.FireQueued(); }); var settings = ServiceManager.Get <SettingsService>(); m_ConversationWidget.ShowHeader = settings.Get <bool>("MessageShowHeader"); m_ConversationWidget.ShowUserIcons = settings.Get <bool>("MessageShowAvatars"); m_ConversationWidget.LoadTheme(settings.Get <string>("MessageTheme"),settings.Get <string>("MessageThemeVariant")); }
public static void Execute() { if (Player.Instance.ChampionName != ChampName) { return; } menuIni = MainMenu.AddMenu("KappaDarius", "KappaDarius"); menuIni.AddGroupLabel("Darius The Dank Memes Master!"); menuIni.AddGroupLabel("Global Settings"); menuIni.Add("Items", new CheckBox("Use Items?")); menuIni.Add("Combo", new CheckBox("Use Combo?")); menuIni.Add("Harass", new CheckBox("Use Harass?")); menuIni.Add("Clear", new CheckBox("Use Clear?")); menuIni.Add("Drawings", new CheckBox("Use Drawings?")); menuIni.Add("KillSteal", new CheckBox("Use KillSteal?")); QMenu = menuIni.AddSubMenu("Q Settings"); QMenu.AddGroupLabel("Q Settings"); QMenu.Add("Combo", new CheckBox("Q Combo")); QMenu.Add("Harass", new CheckBox("Q Harass")); QMenu.AddGroupLabel("Q LaneClear Settings"); QMenu.Add("Clear", new CheckBox("Q LaneClear")); QMenu.Add("Qlc", new Slider("Q On Hit Minions >=", 3, 1, 10)); QMenu.AddSeparator(); QMenu.AddGroupLabel("Extra Settings"); QMenu.Add("QE", new CheckBox("Always Q Before E", false)); QMenu.Add("Stick", new CheckBox("Stick to Target while Casting Q")); QMenu.Add("QAA", new CheckBox("Use Q if AA is in Cooldown", false)); QMenu.Add("range", new CheckBox("Dont Cast Q when Enemy in AA range", false)); QMenu.Add("Flee", new CheckBox("Q On Flee (Ignores Stick to target)")); QMenu.Add("QFlee", new Slider("Cast Q flee When HP is below %", 90, 0, 100)); QMenu.Add("Qaoe", new CheckBox("Auto Q AoE")); QMenu.Add("Qhit", new Slider("Q Aoe Hit >=", 3, 1, 5)); WMenu = menuIni.AddSubMenu("W Settings"); WMenu.AddGroupLabel("W Settings"); WMenu.Add("Combo", new CheckBox("W Combo")); WMenu.Add("Harass", new CheckBox("W Harass")); WMenu.Add("Clear", new CheckBox("W LaneClear")); WMenu.AddGroupLabel("Extra Settings"); WMenu.Add("AAr", new CheckBox("W AA Reset")); EMenu = menuIni.AddSubMenu("E Settings"); EMenu.AddGroupLabel("E Settings"); EMenu.Add("Combo", new CheckBox("E Combo")); EMenu.Add("Harass", new CheckBox("E Harass")); EMenu.AddGroupLabel("Extra Settings"); EMenu.Add("Interrupt", new CheckBox("E To Interrupt")); RMenu = menuIni.AddSubMenu("R Settings"); RMenu.AddGroupLabel("R Settings"); RMenu.Add("Combo", new CheckBox("R Combo Finisher")); RMenu.Add("stack", new CheckBox("Use R On Stacks", false)); RMenu.Add("count", new Slider("Cast R On Stacks >=", 5, 0, 5)); RMenu.Add("SaveR", new CheckBox("Dont Ult if target killable with AA", false)); RMenu.Add("SR", new Slider("Dont Use Ult if target can be kill With X AA", 1, 0, 6)); RMenu.Add("semiR", new KeyBind("Semi-Auto R", false, KeyBind.BindTypes.HoldActive)); KillStealMenu = menuIni.AddSubMenu("KillSteal"); KillStealMenu.AddGroupLabel("KillSteal Settings"); KillStealMenu.Add("Rks", new CheckBox("R KillSteal")); if (Player.Spells.FirstOrDefault(o => o.SData.Name.Contains("SummonerDot")) != null) { KillStealMenu.Add("IGP", new CheckBox("Ignite + Passive Kill")); KillStealMenu.Add("IG", new CheckBox("Ignite Only", false)); KillStealMenu.AddLabel("Iginte + Passive takes in account Max Ignite + Passive dmg"); Ignite = new Spell.Targeted(ObjectManager.Player.GetSpellSlotFromName("summonerdot"), 600); } ManaMenu = menuIni.AddSubMenu("Mana Manager"); ManaMenu.AddGroupLabel("Harass"); ManaMenu.Add("harassmana", new Slider("Harass Mana %", 75, 0, 100)); ManaMenu.AddGroupLabel("Lane Clear"); ManaMenu.Add("lanemana", new Slider("Lane Clear Mana %", 60, 0, 100)); ItemsMenu = menuIni.AddSubMenu("Items"); ItemsMenu.AddGroupLabel("Items Settings"); ItemsMenu.Add("Hydra", new CheckBox("Use Hydra / Timat / Titanic")); ItemsMenu.Add("useGhostblade", new CheckBox("Use Youmuu's Ghostblade")); ItemsMenu.Add("UseBOTRK", new CheckBox("Use Blade of the Ruined King")); ItemsMenu.Add("UseBilge", new CheckBox("Use Bilgewater Cutlass")); ItemsMenu.AddSeparator(); ItemsMenu.Add("eL", new Slider("Use On Enemy health", 65, 0, 100)); ItemsMenu.Add("oL", new Slider("Use On My health", 65, 0, 100)); DrawMenu = menuIni.AddSubMenu("Drawings"); DrawMenu.AddGroupLabel("Drawing Settings"); DrawMenu.Add("Q", new CheckBox("Draw Q")); DrawMenu.Add("W", new CheckBox("Draw W")); DrawMenu.Add("E", new CheckBox("Draw E")); DrawMenu.Add("R", new CheckBox("Draw R")); DrawMenu.AddSeparator(); DrawMenu.AddGroupLabel("Ultimate Drawings"); DrawMenu.Add("DrawD", new CheckBox("Draw R Damage")); DrawMenu.Add("Killable", new CheckBox("Draw Killable")); DrawMenu.Add("Stacks", new CheckBox("Draw Passive Stacks")); DrawMenu.Add("PPx", new Slider("Passive Stacks Position X", 100, 0, 150)); DrawMenu.Add("PPy", new Slider("Passive Stacks Position Y", 100, 0, 150)); DrawMenu.Add("RHealth", new CheckBox("Draw After R health")); DrawMenu.Add("RHx", new Slider("After R health Position", 135, 0, 150)); Q = new Spell.Active(SpellSlot.Q, 400); W = new Spell.Active(SpellSlot.W, 300); E = new Spell.Skillshot(SpellSlot.E, 550, SkillShotType.Cone, 250, 666, 100); R = new Spell.Targeted(SpellSlot.R, 460); Game.OnUpdate += OnUpdate; Drawing.OnDraw += OnDraw; Drawing.OnEndScene += OnEndScene; Orbwalker.OnPostAttack += OnAfterAttack; Obj_AI_Base.OnSpellCast += Obj_AI_Base_OnSpellCast; Interrupter.OnInterruptableSpell += OnInterruptableTarget; }
private static void OnLoaded(EventArgs args) { if (Player.Instance.ChampionName != "Morgana") { return; } Bootstrap.Init(null); Q = new Spell.Skillshot(SpellSlot.Q, 1200, SkillShotType.Linear, (int)250f, (int)1200f, (int)80f); W = new Spell.Skillshot(SpellSlot.W, 900, SkillShotType.Circular, (int)250f, (int)2200f, (int)400f); E = new Spell.Targeted(SpellSlot.E, 750); R = new Spell.Active(SpellSlot.R, 600); MorgMenu = MainMenu.AddMenu("B.Morgana", "bloodimirmorgana"); MorgMenu.AddGroupLabel("Bloodimir.Morgana"); MorgMenu.AddSeparator(); MorgMenu.AddLabel("An Addon made my Bloodimir/turkey"); ComboMenu = MorgMenu.AddSubMenu("Combo", "sbtw"); ComboMenu.AddGroupLabel("Combo Settings"); ComboMenu.AddSeparator(); ComboMenu.Add("usecomboq", new CheckBox("Use Q")); ComboMenu.Add("usecombow", new CheckBox("Use W")); ComboMenu.Add("usecombor", new CheckBox("Use R")); ComboMenu.AddSeparator(); ComboMenu.Add("rslider", new Slider("Minimum people for R", 1, 0, 5)); QMenu = MorgMenu.AddSubMenu("Q Settings", "qsettings"); QMenu.AddGroupLabel("Q Settings"); QMenu.AddSeparator(); QMenu.Add("qmin", new Slider("Min Range", 200, 0, (int)Q.Range)); QMenu.Add("qmax", new Slider("Max Range", (int)Q.Range, 0, (int)Q.Range)); QMenu.AddSeparator(); foreach (var obj in ObjectManager.Get <AIHeroClient>().Where(obj => obj.Team != Me.Team)) { QMenu.Add("bind" + obj.ChampionName.ToLower(), new CheckBox("Bind " + obj.ChampionName)); } QMenu.AddSeparator(); QMenu.AddLabel("EB's common prediction and hitchance is still beta and sometimes it wont cast Q." + Environment.NewLine + "But it works just fine if you use Medium hitchance prediction." + Environment.NewLine + "This allows Q to cast more but also a slightly smaller bind success percentage."); QMenu.AddSeparator(); QMenu.Add("mediumpred", new CheckBox("MEDIUM Bind Hitchance Prediction / Disabled = High", false)); WMenu = MorgMenu.AddSubMenu("W Settings", "wsettings"); WMenu.AddGroupLabel("W Settings"); WMenu.AddSeparator(); WMenu.Add("wmax", new Slider("Max Range", (int)W.Range, 0, (int)W.Range)); WMenu.Add("wmin", new Slider("Min Range", 124, 0, (int)W.Range)); WMenu.AddSeparator(); WMenu.Add("mediumpred", new CheckBox("MEDIUM Soil Hitchance Prediction / Disabled = High")); SkinMenu = MorgMenu.AddSubMenu("Skin Changer", "skin"); SkinMenu.AddGroupLabel("Choose the desired skin"); var skinchange = SkinMenu.Add("sID", new Slider("Skin", 0, 0, 6)); var sID = new[] { "Default", "Exiled", "Sinful Succulence", "Blade Mistress", "Blackthorn", "Ghost Bride", "Victorius" }; skinchange.DisplayName = sID[skinchange.CurrentValue]; skinchange.OnValueChange += delegate(ValueBase <int> sender, ValueBase <int> .ValueChangeArgs changeArgs) { sender.DisplayName = sID[changeArgs.NewValue]; if (MiscMenu["debug"].Cast <CheckBox>().CurrentValue) { Chat.Print("skin-changed"); } }; MiscMenu = MorgMenu.AddSubMenu("Misc", "misc"); MiscMenu.AddGroupLabel("KS"); MiscMenu.AddSeparator(); MiscMenu.Add("ksq", new CheckBox("KS with Q")); MiscMenu.AddSeparator(); MiscMenu.AddGroupLabel("Interrupt"); MiscMenu.AddSeparator(); MiscMenu.Add("intq", new CheckBox("Q to Interrupt")); MiscMenu.Add("dashq", new CheckBox("Q on Dashing")); MiscMenu.Add("immoq", new CheckBox("Q on Immobile")); MiscMenu.Add("immow", new CheckBox("W on Immobile")); MiscMenu.AddSeparator(); MiscMenu.Add("support", new CheckBox("Support Mode", false)); MiscMenu.Add("debug", new CheckBox("Debug", false)); DrawMenu = MorgMenu.AddSubMenu("Drawings", "drawings"); DrawMenu.AddGroupLabel("Drawings"); DrawMenu.AddSeparator(); DrawMenu.Add("drawq", new CheckBox("Draw Q")); DrawMenu.Add("draww", new CheckBox("Draw W")); LaneClear = MorgMenu.AddSubMenu("Lane Clear", "laneclear"); LaneClear.AddGroupLabel("Lane Clear Settings"); LaneClear.Add("LCW", new CheckBox("Use W")); Interrupter.OnInterruptableSpell += Interrupter_OnInterruptableSpell; Game.OnTick += Tick; Drawing.OnDraw += OnDraw; Orbwalker.OnPreAttack += Orbwalker_OnPreAttack; }
public static void LoadOKTW() { Q = new Spell(SpellSlot.Q, 625f); W = new Spell(SpellSlot.W, 550f); E = new Spell(SpellSlot.E); R = new Spell(SpellSlot.R, 625f); FR = new Spell(SpellSlot.R, 1000f); Q.SetTargetted(0.25f, 1400f); W.SetSkillshot(0.3f, 80f, float.MaxValue, false, SkillshotType.SkillshotLine); R.SetSkillshot(0.25f, 180f, float.MaxValue, false, SkillshotType.SkillshotCircle); FR.SetSkillshot(0.25f, 180f, float.MaxValue, false, SkillshotType.SkillshotCircle); flash = Player.GetSpellSlot("summonerflash"); drawMenu = Config.AddSubMenu("线圈"); drawMenu.Add("qRange", new CheckBox("Q 范围")); drawMenu.Add("wRange", new CheckBox("W 范围")); drawMenu.Add("rRange", new CheckBox("R 范围")); drawMenu.Add("onlyRdy", new CheckBox("只显示无冷却技能")); QMenu = Config.AddSubMenu("Q 设置"); QMenu.Add("autoQ", new CheckBox("自动 Q")); QMenu.Add("harrasQ", new CheckBox("骚扰 Q")); WMenu = Config.AddSubMenu("W 设置"); WMenu.Add("autoW", new CheckBox("自动 W")); WMenu.Add("harrasW", new CheckBox("骚扰 W")); EMenu = Config.AddSubMenu("E 设置"); EMenu.Add("autoE", new CheckBox("自动叠加E")); RMenu = Config.AddSubMenu("R 设置"); RMenu.AddLabel("0 : 普通"); RMenu.AddLabel("1 : 一直"); RMenu.AddLabel("2 : 从不"); RMenu.AddLabel("3 : 可晕眩时"); foreach (var enemy in ObjectManager.Get <AIHeroClient>().Where(enemy => enemy.IsEnemy)) { RMenu.Add("UM" + enemy.NetworkId, new Slider(enemy.ChampionName, 0, 0, 3)); } RMenu.AddSeparator(); RMenu.Add("autoRks", new CheckBox("自动 R 抢头")); RMenu.Add("autoRcombo", new CheckBox("连招自动R,如果可晕眩")); RMenu.Add("rCount", new Slider("自动 R X 数量", 3, 2, 5)); RMenu.Add("tibers", new CheckBox("自动移动熊")); if (flash != SpellSlot.Unknown) { RMenu.Add("rCountFlash", new Slider("自动闪现 + R 可击晕敌人数量", 4, 2, 5)); } FarmMenu = Config.AddSubMenu("农兵"); FarmMenu.Add("farmQ", new CheckBox("尾兵 Q")); FarmMenu.Add("farmW", new CheckBox("清线 W")); FarmMenu.Add("Mana", new Slider("清线蓝量", 60)); Game.OnUpdate += Game_OnGameUpdate; GameObject.OnCreate += Obj_AI_Base_OnCreate; Drawing.OnDraw += Drawing_OnDraw; }
public static void Execute() { if (Player.Instance.ChampionName != ChampName) { return; } menuIni = MainMenu.AddMenu("KappaDarius", "KappaDarius"); menuIni.AddGroupLabel("Darius The Dank Memes Master!"); menuIni.AddGroupLabel("Global Settings"); menuIni.Add("Items", new CheckBox("Item Kullanilsin?")); menuIni.Add("Combo", new CheckBox("Kullan Kombo?")); menuIni.Add("Harass", new CheckBox("Durtme Kullan?")); menuIni.Add("Clear", new CheckBox("Temizleme Kullan?")); menuIni.Add("Drawings", new CheckBox("Gosterge Kullan?")); menuIni.Add("KillSteal", new CheckBox("Oldurme sekli kullan?")); QMenu = menuIni.AddSubMenu("Q Settings"); QMenu.AddGroupLabel("Q Settings"); QMenu.Add("Combo", new CheckBox("Komboda Q")); QMenu.Add("Harass", new CheckBox("Durtmede Q")); QMenu.AddGroupLabel("Q LaneClear Settings"); QMenu.Add("Clear", new CheckBox("Koridor Temizlemede Q")); QMenu.Add("Qlc", new Slider("Minyona son vurus Q >=", 3, 1, 10)); QMenu.AddSeparator(); QMenu.AddGroupLabel("Extra Settings"); QMenu.Add("QE", new CheckBox("E den once surekli Q", false)); QMenu.Add("Stick", new CheckBox("Secili hedefe Q")); QMenu.Add("QAA", new CheckBox("AA beklemede ise Q kullan", false)); QMenu.Add("range", new CheckBox("AA araliginda dusman oldugunda Q atmayin", false)); QMenu.Add("Flee", new CheckBox("Kacarken Q (Secili hedefi yok sayar)")); QMenu.Add("QFlee", new Slider("Kacarken Q canim sundan dusukse %", 90)); QMenu.Add("Qaoe", new CheckBox("Otomatik Q AoE")); QMenu.Add("Qhit", new Slider("Q Aoe Hit >=", 3, 1, 5)); WMenu = menuIni.AddSubMenu("W Settings"); WMenu.AddGroupLabel("W Settings"); WMenu.Add("Combo", new CheckBox("Komboda W")); WMenu.Add("Harass", new CheckBox("Durtmede W")); WMenu.Add("Clear", new CheckBox("Koridor temizlemede W")); WMenu.AddGroupLabel("Extra Settings"); WMenu.Add("AAr", new CheckBox("W ile AA sifirla")); EMenu = menuIni.AddSubMenu("E Settings"); EMenu.AddGroupLabel("E Settings"); EMenu.Add("Combo", new CheckBox("Komboda E")); EMenu.Add("Harass", new CheckBox("Durtmede E")); EMenu.AddGroupLabel("Extra Settings"); EMenu.Add("Interrupt", new CheckBox("Keserken E")); RMenu = menuIni.AddSubMenu("R Settings"); RMenu.AddGroupLabel("R Settings"); RMenu.Add("Combo", new CheckBox("Kombo bitirmede R")); RMenu.Add("stack", new CheckBox("Pasif biriktirmede R", false)); RMenu.Add("count", new Slider("R icin gereken pasif >=", 5, 0, 5)); RMenu.Add("SaveR", new CheckBox("Hedef AA ile olucekse R kullanma", false)); RMenu.Add("SR", new Slider("Dont Use Ult if target can be kill With X AA", 1, 0, 6)); RMenu.Add("semiR", new KeyBind("Yari otomatik R", false, KeyBind.BindTypes.HoldActive)); KillStealMenu = menuIni.AddSubMenu("KillSteal"); KillStealMenu.AddGroupLabel("KillSteal Settings"); KillStealMenu.Add("Rks", new CheckBox("R ile oldur")); if (Player.Spells.FirstOrDefault(o => o.SData.Name.Contains("SummonerDot")) != null) { KillStealMenu.Add("IGP", new CheckBox("Tutustur + Pasif ile oldur")); KillStealMenu.Add("IG", new CheckBox("Sadece Tutustur", false)); KillStealMenu.AddLabel("Tutustur + Pasif, Max Tutustur + Pasif hasarini hesaba katar."); Ignite = new Spell.Targeted(ObjectManager.Player.GetSpellSlotFromName("summonerdot"), 600); } ManaMenu = menuIni.AddSubMenu("Mana Manager"); ManaMenu.AddGroupLabel("Harass"); ManaMenu.Add("harassmana", new Slider("Durtme Mana %", 75)); ManaMenu.AddGroupLabel("Lane Clear"); ManaMenu.Add("lanemana", new Slider("Koridor temizleme Mana %", 60)); ItemsMenu = menuIni.AddSubMenu("Items"); ItemsMenu.AddGroupLabel("Items Settings"); ItemsMenu.Add("Hydra", new CheckBox("Kullan Hydra / Timat / Titanic")); ItemsMenu.Add("useGhostblade", new CheckBox("Kullan Youmuu's Ghostblade")); ItemsMenu.Add("UseBOTRK", new CheckBox("Kullan Mahvolmus")); ItemsMenu.Add("UseBilge", new CheckBox("Kullan Bilgewater Palasi")); ItemsMenu.AddSeparator(); ItemsMenu.Add("eL", new Slider("Use On Enemy health", 65)); ItemsMenu.Add("oL", new Slider("Use On My health", 65)); DrawMenu = menuIni.AddSubMenu("Drawings"); DrawMenu.AddGroupLabel("Drawing Settings"); DrawMenu.Add("Q", new CheckBox("Goster Q")); DrawMenu.Add("W", new CheckBox("Goster W")); DrawMenu.Add("E", new CheckBox("Goster E")); DrawMenu.Add("R", new CheckBox("Goster R")); DrawMenu.AddSeparator(); DrawMenu.AddGroupLabel("Ultimate Drawings"); DrawMenu.Add("DrawD", new CheckBox("Goster R Hasari")); DrawMenu.Add("Killable", new CheckBox("Goster Oldurulebilir")); DrawMenu.Add("Stacks", new CheckBox("Goster Pasif Sayisi")); DrawMenu.Add("PPx", new Slider("Passive Stacks Position X", 100, 0, 150)); DrawMenu.Add("PPy", new Slider("Passive Stacks Position Y", 100, 0, 150)); DrawMenu.Add("RHealth", new CheckBox("Goster R den sonra kalicak cani")); DrawMenu.Add("RHx", new Slider("After R health Position", 135, 0, 150)); Q = new Spell.Active(SpellSlot.Q, 400); W = new Spell.Active(SpellSlot.W, 300); E = new Spell.Skillshot(SpellSlot.E, 550, SkillShotType.Cone, 250, 666, 100); R = new Spell.Targeted(SpellSlot.R, 460); Game.OnUpdate += OnUpdate; Drawing.OnDraw += OnDraw; Drawing.OnEndScene += OnEndScene; Orbwalker.OnPostAttack += OnAfterAttack; Obj_AI_Base.OnSpellCast += Obj_AI_Base_OnSpellCast; Interrupter.OnInterruptableSpell += OnInterruptableTarget; }
public static void LoadOKTW() { Q = new Spell(SpellSlot.Q, 870); W = new Spell(SpellSlot.W, 580); E = new Spell(SpellSlot.E, 950); R = new Spell(SpellSlot.R, 600); Q.SetSkillshot(0.25f, 90, 1550, false, SkillshotType.SkillshotLine); E.SetSkillshot(0.25f, 60, 1550, true, SkillshotType.SkillshotLine); missileManager = new MissileReturn("AhriOrbMissile", "AhriOrbReturn", Q); drawMenu = Config.AddSubMenu("Drawings"); drawMenu.Add("noti", new CheckBox("Show notification & line")); drawMenu.Add("onlyRdy", new CheckBox("Draw only ready spells")); drawMenu.Add("qRange", new CheckBox("Q range", false)); drawMenu.Add("wRange", new CheckBox("W range", false)); drawMenu.Add("eRange", new CheckBox("E range", false)); drawMenu.Add("rRange", new CheckBox("R range", false)); drawMenu.Add("Qhelp", new CheckBox("Show Q helper")); QMenu = Config.AddSubMenu("Q Config"); QMenu.Add("autoQ", new CheckBox("Auto Q")); QMenu.Add("harrasQ", new CheckBox("Harass Q")); QMenu.Add("aimQ", new CheckBox("Auto aim Q missile")); WMenu = Config.AddSubMenu("W Config"); WMenu.Add("autoW", new CheckBox("Auto W")); WMenu.Add("harrasW", new CheckBox("Harass W")); EMenu = Config.AddSubMenu("E Config"); EMenu.Add("autoE", new CheckBox("Auto E")); EMenu.Add("harrasE", new CheckBox("Harras E")); foreach (var enemy in ObjectManager.Get <AIHeroClient>().Where(enemy => enemy.IsEnemy)) { EMenu.Add("Eon" + enemy.NetworkId, new CheckBox("E : " + enemy.ChampionName)); } EMenu.AddSeparator(); foreach (var enemy in ObjectManager.Get <AIHeroClient>().Where(enemy => enemy.IsEnemy)) { EMenu.Add("Egapcloser" + enemy.NetworkId, new CheckBox("Gapclose : " + enemy.ChampionName)); } RMenu = Config.AddSubMenu("R Config"); RMenu.Add("autoR", new CheckBox("R KS ")); RMenu.Add("autoR2", new CheckBox("auto R fight logic + aim Q")); harassMenu = Config.AddSubMenu("Harass"); foreach (var enemy in ObjectManager.Get <AIHeroClient>().Where(enemy => enemy.IsEnemy)) { harassMenu.Add("harras" + enemy.NetworkId, new CheckBox(enemy.ChampionName)); } FarmMenu = Config.AddSubMenu("Farm"); FarmMenu.Add("farmQ", new CheckBox("Lane clear Q")); FarmMenu.Add("farmW", new CheckBox("Lane clear W", false)); FarmMenu.Add("Mana", new Slider("LaneClear Mana", 80)); FarmMenu.Add("LCminions", new Slider("LaneClear minimum minions", 2, 0, 10)); FarmMenu.Add("jungleQ", new CheckBox("Jungle clear Q")); FarmMenu.Add("jungleW", new CheckBox("Jungle clear W")); Game.OnUpdate += Game_OnGameUpdate; Interrupter2.OnInterruptableTarget += Interrupter2_OnInterruptableTarget; AntiGapcloser.OnEnemyGapcloser += AntiGapcloser_OnEnemyGapcloser; Drawing.OnDraw += Drawing_OnDraw; GameObject.OnCreate += SpellMissile_OnCreateOld; GameObject.OnDelete += Obj_SpellMissile_OnDelete; }
private static void Game_OnTick() { var mana = Me.ManaPercent; if (MiscMenu.GetKeybind("manualQ")) { if (Q.IsReady()) { AIHeroClient target; target = TargetSelector.GetTarget(QMenu.GetSlider("rangeQ"), TargetSelector.DamageType.Magical); if (MiscMenu.GetCheckbox("useDP")) { var location = LinearPrediction(ObjectManager.Player.Position, Q, (AIHeroClient)target); if (target != null && (target.Distance(ObjectManager.Me) > QMenu.GetSlider("minQ")) && !Functions.HasSpellShield(target) && location != DarkPrediction.empt && !DarkPrediction.CollisionChecker(location, ObjectManager.Me.Position, Q)) { Q.Cast(location); } } else { if (target != null && (target.Distance(ObjectManager.Me) > QMenu.GetSlider("minQ")) && !Functions.HasSpellShield(target)) { Q.CastIfHitchanceEquals(target, HitChance.VeryHigh); } } } } if (KillstealMenu.GetCheckbox("enable")) { Killsteal.DoKs(); } if (Orb.ActiveMode == Orbwalker.OrbwalkingMode.Combo && mana >= ComboMenu.GetSlider("mana")) { Combo.DoCombo(); } if (Orb.ActiveMode == Orbwalker.OrbwalkingMode.Harass && mana >= HarassMenu.GetSlider("mana")) { Harass.DoHarass(); } if (Orb.ActiveMode == Orbwalker.OrbwalkingMode.LaneClear && mana >= LaneclearMenu.GetSlider("mana")) { LaneClear.DoLaneClear(); } if (Orb.ActiveMode == Orbwalker.OrbwalkingMode.LastHit && mana >= LasthitMenu.GetSlider("mana")) { LaneClear.DoLaneClear(); } if (Orb.ActiveMode == Orbwalker.OrbwalkingMode.Flee && mana >= FleeMenu.GetSlider("mana")) { Flee.DoFlee(); } //This is a basic fix, due to OnLevelUp being disabled if (_currentLevel == Player.Level) { return; } Leveler(); _currentLevel = Player.Level; }
private static void OnLoaded(EventArgs args) { if (Player.Instance.ChampionName != Hero) { return; } Bootstrap.Init(null); Q = new Spell.Skillshot(SpellSlot.Q, 1175, SkillShotType.Linear, 250, 1200, 80); W = new Spell.Skillshot(SpellSlot.W, 900, SkillShotType.Circular, 250, 2200, 350); E = new Spell.Targeted(SpellSlot.E, 800); R = new Spell.Active(SpellSlot.R, 600); Exhaust = new Spell.Targeted(ObjectManager.Player.GetSpellSlotFromName("summonerexhaust"), 650); Talisman = new Item((int)ItemId.Talisman_of_Ascension); Randuin = new Item((int)ItemId.Randuins_Omen); Zhonia = new Item((int)ItemId.Zhonyas_Hourglass); AbilitySequence = new[] { 1, 3, 2, 1, 1, 4, 1, 2, 1, 2, 4, 2, 2, 3, 3, 4, 3, 3 }; MorgMenu = MainMenu.AddMenu("Bloodimir Morgana", "bmorgana"); MorgMenu.AddGroupLabel("Bloodimir Morgana"); MorgMenu.AddSeparator(); MorgMenu.AddLabel("Bloodimir Morgana v2.1.0.0"); ComboMenu = MorgMenu.AddSubMenu("Combo", "sbtw"); ComboMenu.AddGroupLabel("Combo Settings"); ComboMenu.AddSeparator(); ComboMenu.Add("usecomboq", new CheckBox("Use Q")); ComboMenu.Add("usecombow", new CheckBox("Use W")); AutoCastMenu = MorgMenu.AddSubMenu("Auto Cast", "ac"); AutoCastMenu.AddGroupLabel("Auto Cast"); AutoCastMenu.AddSeparator(); AutoCastMenu.Add("qd", new CheckBox("Auto Q Dashing")); AutoCastMenu.Add("qi", new CheckBox("Auto Q Immobile")); AutoCastMenu.Add("ar", new CheckBox("Auto R")); AutoCastMenu.Add("rslider", new Slider("Minimum people for Auto R", 2, 0, 5)); QMenu = MorgMenu.AddSubMenu("Q Settings", "qsettings"); QMenu.AddGroupLabel("Q Settings"); QMenu.AddSeparator(); QMenu.Add("qmin", new Slider("Min Range", 150, 0, (int)Q.Range)); QMenu.Add("qmax", new Slider("Max Range", (int)Q.Range, 0, (int)Q.Range)); QMenu.AddSeparator(); foreach (var obj in ObjectManager.Get <AIHeroClient>().Where(obj => obj.Team != Me.Team)) { QMenu.Add("bind" + obj.ChampionName.ToLower(), new CheckBox("Bind " + obj.ChampionName)); } QMenu.AddSeparator(); QMenu.Add("mediumpred", new CheckBox("MEDIUM Bind Hitchance Prediction", false)); QMenu.AddSeparator(); QMenu.Add("intq", new CheckBox("Q to Interrupt")); SkinMenu = MorgMenu.AddSubMenu("Skin Changer", "skin"); SkinMenu.AddGroupLabel("Choose the desired skin"); var skinchange = SkinMenu.Add("sID", new Slider("Skin", 5, 0, 7)); var sid = new[] { "Default", "Exiled", "Sinful Succulence", "Blade Mistress", "Blackthorn", "Ghost Bride", "Victorius", "Lunar Wraith" }; skinchange.DisplayName = sid[skinchange.CurrentValue]; skinchange.OnValueChange += delegate(ValueBase <int> sender, ValueBase <int> .ValueChangeArgs changeArgs) { sender.DisplayName = sid[changeArgs.NewValue]; }; MiscMenu = MorgMenu.AddSubMenu("Misc", "misc"); MiscMenu.AddGroupLabel("Misc"); MiscMenu.AddSeparator(); MiscMenu.Add("ksq", new CheckBox("KS with Q")); MiscMenu.Add("antigapcloser", new CheckBox("Anti Gapcloser")); MiscMenu.Add("talisman", new CheckBox("Use Talisman of Ascension")); MiscMenu.Add("randuin", new CheckBox("Use Randuin")); MiscMenu.Add("szhonya", new CheckBox("Smart Zhonya")); MiscMenu.Add("lvlup", new CheckBox("Auto Level Up Spells", false)); MiscMenu.AddSeparator(); MiscMenu.Add("EAllies", new CheckBox("Auto E")); foreach (var obj in ObjectManager.Get <AIHeroClient>().Where(obj => obj.Team == Me.Team)) { MiscMenu.Add("shield" + obj.ChampionName.ToLower(), new CheckBox("Shield " + obj.ChampionName)); } MiscMenu.AddSeparator(); MiscMenu.Add("support", new CheckBox("Support Mode", false)); MiscMenu.Add("useexhaust", new CheckBox("Use Exhaust")); foreach (var source in ObjectManager.Get <AIHeroClient>().Where(a => a.IsEnemy)) { MiscMenu.Add(source.ChampionName + "exhaust", new CheckBox("Exhaust " + source.ChampionName, false)); } DrawMenu = MorgMenu.AddSubMenu("Drawings", "drawings"); DrawMenu.AddGroupLabel("Drawings"); DrawMenu.AddSeparator(); DrawMenu.Add("drawq", new CheckBox("Draw Q")); DrawMenu.Add("draww", new CheckBox("Draw W")); DrawMenu.Add("drawe", new CheckBox("Draw E")); DrawMenu.Add("drawr", new CheckBox("Draw R")); DrawMenu.Add("drawaa", new CheckBox("Draw AA")); DrawMenu.Add("predictions", new CheckBox("Visualize Q Prediction")); LaneClear = MorgMenu.AddSubMenu("Lane Clear", "laneclear"); LaneClear.AddGroupLabel("Lane Clear Settings"); LaneClear.Add("LCW", new CheckBox("Use W")); LastHit = MorgMenu.AddSubMenu("Last Hit", "lasthit"); LastHit.AddGroupLabel("Last Hit Settings"); LastHit.Add("LHQ", new CheckBox("Use Q", false)); Interrupter.OnInterruptableSpell += Interrupter_OnInterruptableSpell; Game.OnUpdate += OnUpdate; Orbwalker.OnPreAttack += Orbwalker_OnPreAttack; Obj_AI_Base.OnProcessSpellCast += Auto_EOnProcessSpell; Gapcloser.OnGapcloser += Gapcloser_OnGapcloser; Drawing.OnDraw += delegate { if (!Me.IsDead) { if (DrawMenu["drawr"].Cast <CheckBox>().CurrentValue&& R.IsLearned) { Circle.Draw(Color.Red, R.Range, Player.Instance.Position); } if (DrawMenu["draww"].Cast <CheckBox>().CurrentValue&& W.IsLearned) { Circle.Draw(Color.Purple, W.Range, Player.Instance.Position); } if (DrawMenu["drawe"].Cast <CheckBox>().CurrentValue&& E.IsLearned) { Circle.Draw(Color.Green, E.Range, Player.Instance.Position); } if (DrawMenu["drawaa"].Cast <CheckBox>().CurrentValue) { Circle.Draw(Color.Blue, Q.Range, Player.Instance.Position); } var predictedPositions = new Dictionary <int, Tuple <int, PredictionResult> >(); var predictions = DrawMenu["predictions"].Cast <CheckBox>().CurrentValue; var qRange = DrawMenu["drawq"].Cast <CheckBox>().CurrentValue; foreach ( var enemy in EntityManager.Heroes.Enemies.Where( enemy => QMenu["bind" + enemy.ChampionName].Cast <CheckBox>().CurrentValue&& enemy.IsValidTarget(Q.Range + 150) && !enemy.HasBuffOfType(BuffType.SpellShield))) { var predictionsq = Q.GetPrediction(enemy); predictedPositions[enemy.NetworkId] = new Tuple <int, PredictionResult>(Environment.TickCount, predictionsq); if (qRange && Q.IsLearned) { Circle.Draw(Q.IsReady() ? Color.Blue : Color.Red, Q.Range, Player.Instance.Position); } if (!predictions) { return; } foreach (var prediction in predictedPositions.ToArray()) { if (Environment.TickCount - prediction.Value.Item1 > 2000) { predictedPositions.Remove(prediction.Key); continue; } Circle.Draw(Color.Red, 75, prediction.Value.Item2.CastPosition); Line.DrawLine(System.Drawing.Color.GreenYellow, Player.Instance.Position, prediction.Value.Item2.CastPosition); Line.DrawLine(System.Drawing.Color.CornflowerBlue, EntityManager.Heroes.Enemies.Find(o => o.NetworkId == prediction.Key).Position, prediction.Value.Item2.CastPosition); Drawing.DrawText(prediction.Value.Item2.CastPosition.WorldToScreen() + new Vector2(0, -20), System.Drawing.Color.LimeGreen, string.Format("Hitchance: {0}%", Math.Ceiling(prediction.Value.Item2.HitChancePercent)), 10); } } ; } ; }; }