Пример #1
0
        public NoVillageAttackContextMenu(AttackManipulatorManager manipulator)
        {
            _manipulator = manipulator;

            _menu = JanusContextMenu.Create();

            _menu.AddToggleCommand(ControlsRes.NoVillageAttackContextMenu_ShowNonActivePlanTargets, _manipulator.Settings.ShowOtherTargets, OnShowOtherTargets);
            _menu.AddToggleCommand(ControlsRes.NoVillageAttackContextMenu_ShowNonActivePlanAttackers, _manipulator.Settings.ShowOtherAttackers, OnShowOtherAttackers);
            _menu.AddSeparator();
            _menu.AddToggleCommand(ControlsRes.NoVillageAttackContextMenu_AlwaysShowAttackPlans, _manipulator.Settings.ShowIfNotActiveManipulator, OnShowIfNotActiveManipulator);
            _menu.AddSeparator();
            _menu.AddToggleCommand(ControlsRes.NoVillageAttackContextMenu_ShowArrivalTimesWhenSentNow, _manipulator.Settings.ShowArrivalTimeWhenSentNow, OnShowArrivalTimeWhenSentNow);
        }
Пример #2
0
        public NoVillageContextMenu(Point gameLocation)
        {
            _gameLocation = gameLocation;

            _menu = JanusContextMenu.Create();
            _menu.AddCommand("Center here", OnMapCenter, Properties.Resources.TeleportIcon);
            _menu.AddCommand("Set Home", OnSetHome, Properties.Resources.HomeIcon);
            _menu.AddSeparator();

            _menu.AddChangeColorCommand("Background color", World.Default.Map.Display.Settings.BackgroundColor, Color.Green, OnBackgroundColor);
            _menu.AddToggleCommand("Show continent lines", World.Default.Map.Display.Settings.ContinentLines, OnContinentLines);
            _menu.AddToggleCommand("Show province lines", World.Default.Map.Display.Settings.ProvinceLines, OnProvinceLines);
            _menu.AddSeparator();

            _menu.AddToggleCommand("Hide all abandoned", World.Default.Map.Display.Settings.HideAbandoned, OnHideAbandoned);
            _menu.AddToggleCommand("Show marked only", World.Default.Map.Display.Settings.MarkedOnly, OnMarkedOnly);
            _menu.AddSeparator();

            var showTooltip = _menu.AddCommand("Show village &tooltip", OnShowTooltip);
            showTooltip.IsChecked = World.Default.Map.Manipulators.CurrentManipulator.TooltipActive;
        }
Пример #3
0
        private void InitializeMenu()
        {
            Marker marker = GetMarker();

            _menu.AddChangeColorCommand(ControlsRes.MarkerContextMenu_MainColor, marker.Settings.Color, OnChangeColor);
            _menu.AddChangeColorCommand(ControlsRes.MarkerContextMenu_InnerColor, marker.Settings.ExtraColor, Color.Transparent, OnChangeExtraColor);

            IEnumerable <string> views = World.Default.Views.GetBackgroundViews(false);

            _menu.AddComboBoxCommand(ControlsRes.MarkerContextMenu_View, views, marker.Settings.View, OnChangeView);
            _menu.AddToggleCommand(marker.Settings.Enabled ? ControlsRes.MarkerContextMenu_Disable : ControlsRes.MarkerContextMenu_Enable, marker.Settings.Enabled, OnChangeEnabled);
        }
Пример #4
0
        public NoVillageContextMenu(Point gameLocation)
        {
            _gameLocation = gameLocation;

            _menu = JanusContextMenu.Create();
            _menu.AddCommand(ControlsRes.NoVillageContextMenu_CenterHere, OnMapCenter, Properties.Resources.TeleportIcon);
            _menu.AddCommand(ControlsRes.NoVillageContextMenu_SetHome, OnSetHome, Properties.Resources.HomeIcon);
            _menu.AddSeparator();

            _menu.AddChangeColorCommand(ControlsRes.NoVillageContextMenu_BackgroundColor, World.Default.Map.Display.Settings.BackgroundColor, Color.Green, OnBackgroundColor);
            _menu.AddToggleCommand(ControlsRes.NoVillageContextMenu_ContinentLines, World.Default.Map.Display.Settings.ContinentLines, OnContinentLines);
            _menu.AddToggleCommand(ControlsRes.NoVillageContextMenu_ProvinceLines, World.Default.Map.Display.Settings.ProvinceLines, OnProvinceLines);
            _menu.AddSeparator();

            _menu.AddToggleCommand(ControlsRes.NoVillageContextMenu_HideAbandoned, World.Default.Map.Display.Settings.HideAbandoned, OnHideAbandoned);
            _menu.AddToggleCommand(ControlsRes.NoVillageContextMenu_ShowMarkedOnly, World.Default.Map.Display.Settings.MarkedOnly, OnMarkedOnly);
            _menu.AddSeparator();

            var showTooltip = _menu.AddCommand(ControlsRes.NoVillageContextMenu_ShowVillageTooltip, OnShowTooltip);

            showTooltip.IsChecked = World.Default.Map.Manipulators.CurrentManipulator.TooltipActive;
        }