示例#1
0
        public override void FogOrRevealAll(bool fogAll)
        {
            var fogAllFogUpdate = new FogUpdate(!fogAll);
            fogAllFogUpdate.Add(new SimplePoint(0, 0));
            fogAllFogUpdate.Add(new SimplePoint(base.LoadedMapSize.Width, 0));
            fogAllFogUpdate.Add(new SimplePoint(base.LoadedMapSize.Width, base.LoadedMapSize.Height));
            fogAllFogUpdate.Add(new SimplePoint(0, base.LoadedMapSize.Height));

            this.SetFogUpdateAsync(fogAllFogUpdate, true);
        }
示例#2
0
        private void pbxMap_MouseDown(object sender, MouseEventArgs e)
        {
            if (e.Button != System.Windows.Forms.MouseButtons.Left && e.Button != System.Windows.Forms.MouseButtons.Right)
                return;

            pbxMap.MouseMove += new MouseEventHandler(pbxMap_MouseMove);
            pbxMap.MouseUp += new MouseEventHandler(pbxMap_MouseUp);

            newFog = new Bitmap(fog.Width, fog.Height);

            currentFogUpdate = new FogUpdate((e.Button == System.Windows.Forms.MouseButtons.Left));
            currentFogUpdate.Add(ConvertPointToStretchedImage(e.Location));
        }
示例#3
0
        public override void FogOrRevealAll(bool fogAll)
        {
            var fogAllFogUpdate = new FogUpdate(!fogAll);
            fogAllFogUpdate.Add(new SimplePoint(0, 0));
            fogAllFogUpdate.Add(new SimplePoint(this.Fog.Width, 0));
            fogAllFogUpdate.Add(new SimplePoint(this.Fog.Width, this.Fog.Height));
            fogAllFogUpdate.Add(new SimplePoint(0, this.Fog.Height));

            UpdateFogImage(fogAllFogUpdate, true, true);
            undoFogUpdates.Clear();
            redoFogUpdates.Clear();
            this.RefreshAll();
        }
示例#4
0
        private void FogOrRevealAll(bool revealAll)
        {
            var message = (revealAll) ? "This will reveal the entire map. Are you sure? This cannot be undone." : "This will fog the entire map. Are you sure? This cannot be undone.";
            var title = (revealAll) ? "Reveal Entire Map?" : "Fog Entire Map?";
            if (MessageBox.Show(this, message, title, MessageBoxButtons.YesNo, MessageBoxIcon.Warning, MessageBoxDefaultButton.Button2) == DialogResult.Yes)
            {
                var fogAllFogUpdate = new FogUpdate(revealAll);
                fogAllFogUpdate.Add(new SimplePoint(0, 0));
                fogAllFogUpdate.Add(new SimplePoint(fog.Width, 0));
                fogAllFogUpdate.Add(new SimplePoint(fog.Width, fog.Height));
                fogAllFogUpdate.Add(new SimplePoint(0, fog.Height));

                UpdateFogImage(fogAllFogUpdate);
                undoFogUpdates.Clear();
                redoFogUpdates.Clear();
                undoLastFogAction.Enabled = redoLastFogAction.Enabled = false;
                pbxMap.Refresh();

                if (realTimeFogUpdates)
                    connection.WriteFog(fog);
            }
        }