예제 #1
0
 private void PlayerTribeSelectorButton_MouseClick(object sender, MouseEventArgs e)
 {
     if (e.Button == MouseButtons.Right)
     {
         if (PlayerTribeSelector.Player != null)
         {
             var cm = new PlayerContextMenu(World.Default.Map, PlayerTribeSelector.Player, true);
             cm.Show(PlayerTribeSelectorButton, e.Location);
         }
         else if (PlayerTribeSelector.Tribe != null)
         {
             var cm = new TribeContextMenu(World.Default.Map, PlayerTribeSelector.Tribe);
             cm.Show(PlayerTribeSelectorButton, e.Location);
         }
     }
     else if (e.Button == MouseButtons.Left)
     {
         if (PlayerTribeSelector.Player != null)
     {
         World.Default.Map.SetCenter(PlayerTribeSelector.Player);
         World.Default.Map.EventPublisher.SelectPlayer(null, PlayerTribeSelector.Player, VillageTools.PinPoint);
     }
     else if (PlayerTribeSelector.Tribe != null)
     {
         World.Default.Map.SetCenter(PlayerTribeSelector.Tribe);
         World.Default.Map.EventPublisher.SelectTribe(null, PlayerTribeSelector.Tribe, VillageTools.PinPoint);
     }
     }
 }
예제 #2
0
 private void _Tribe_MouseClick(object sender, MouseEventArgs e)
 {
     if (Plan.Target.HasTribe)
     {
         if (e.Button == MouseButtons.Right)
         {
             var cm = new TribeContextMenu(World.Default.Map, Plan.Target.Player.Tribe);
             cm.Show(_Tribe, e.Location);
         }
         else if (e.Button == MouseButtons.Left)
         {
             World.Default.Map.Manipulators.SetManipulator(ManipulatorManagerTypes.Default);
             World.Default.Map.EventPublisher.SelectVillages(null, Plan.Target.Player.Tribe, VillageTools.PinPoint);
         }
     }
 }
예제 #3
0
 public void ShowContext(Point p)
 {
     if (TableModel != null)
     {
         var context = new TribeContextMenu(_map, Tribe);
         context.Show(TableModel.Table, p);
     }
 }