コード例 #1
0
ファイル: FFXIMapImageEditor.cs プロジェクト: stsy/mappy
      public void OnEngage(fMap Window) {
         if (engaged)
            throw new Exception("Editor already engaged.");
         if (!(Window.Instance is IFFXIGameContainer))
            throw new Exception("Instance does not support FFXI.");
         if (!(Window.Instance is IFFXIMapImageContainer))
            throw new Exception("Instance does not support FFXI image maps.");

         engaged = true;
         window = Window;
         engine = Window.Engine;
         window.Engine.Game.Highlighted = null;
         icontainer = window.Instance as IFFXIGameContainer;
         imap = Window.Instance as IFFXIMapImageContainer;

         if (ui == null)
            ui = new FFXIMapImageEditorUI(this);
         ui.Show(window);
         ui.Left = window.Left;
         ui.Top = window.Bottom;
         ui.Width = window.Width;
         engine.MapAlternativeImage = null;

         BuildMapList();
         ui.updateMapInfo();
         icontainer.ZoneChanged += new EventHandler(icontainer_ZoneChanged);
      }
コード例 #2
0
ファイル: fEditHunts.cs プロジェクト: khoa002/ffxi-mappy
        public static void BeginEdit(fMap Owner, Config config)
        {
            fEditHunts editor = new fEditHunts(Owner, config);

            editor.Show(Owner);
            editor.ApplyConfig();
        }
コード例 #3
0
ファイル: fEditHunts.cs プロジェクト: stsy/mappy
      private fEditHunts(fMap parent) {
         m_parent = parent;
         InitializeComponent();
         PopulateList();

         lvHunts.ItemActivate += new EventHandler(lvHunts_ItemActivate);
         m_parent.Engine.Data.Hunts.DataChanged += new MapEngine.GenericEvent(Hunts_DataChanged);
      }
コード例 #4
0
        private fEditHunts(fMap parent)
        {
            m_parent = parent;
            InitializeComponent();
            PopulateList();

            lvHunts.ItemActivate += new EventHandler(lvHunts_ItemActivate);
            m_parent.Engine.Data.Hunts.DataChanged += new MapEngine.GenericEvent(Hunts_DataChanged);
        }
コード例 #5
0
ファイル: MapEditor.cs プロジェクト: khoa002/ffxi-mappy
 public virtual void OnEngage(fMap Window)
 {
     if (engaged)
     {
         throw new Exception("Editor already engaged.");
     }
     engaged = true;
     window  = Window;
 }
コード例 #6
0
 public void OnDisengage()
 {
     engine.MapAlternativeBounds = imap.CurrentMap.Bounds;
     icontainer.ZoneChanged     -= new EventHandler(icontainer_ZoneChanged);
     window.Cursor = Cursors.Default;
     engaged       = false;
     ui.Hide();
     window = null;
     engine.MapAlternativeImage = imap.CurrentMap.GetImage();
 }
コード例 #7
0
ファイル: fEditLabel.cs プロジェクト: stsy/mappy
      public static void BeginEdit(fMap Owner, MapEngine.MapLabel label) {
         fEditLabel editor = new fEditLabel(Owner);
         editor.txtCaption.Text = label.Caption;
         editor.cmdLabelColor.BackColor = label.Color;

         if (editor.ShowDialog(Owner) == DialogResult.OK) {
            label.Caption = editor.txtCaption.Text;
            label.Color = editor.cmdLabelColor.BackColor;
            Owner.Engine.UpdateMap();
         }
      }
コード例 #8
0
        public static void BeginEdit(fMap Owner, MapEngine.MapLabel label)
        {
            fEditLabel editor = new fEditLabel(Owner);

            editor.txtCaption.Text         = label.Caption;
            editor.cmdLabelColor.BackColor = label.Color;

            if (editor.ShowDialog(Owner) == DialogResult.OK)
            {
                label.Caption = editor.txtCaption.Text;
                label.Color   = editor.cmdLabelColor.BackColor;
                Owner.Engine.UpdateMap();
            }
        }
コード例 #9
0
ファイル: fEditLabel.cs プロジェクト: stsy/mappy
 public static void BeginAdd(fMap Owner) {
    fEditLabel editor = new fEditLabel(Owner);
    if (editor.ShowDialog(Owner) == DialogResult.OK) {
       MapEngine.MapLabel label = new MapEngine.MapLabel(editor.txtCaption.Text, editor.cmdLabelColor.BackColor);
       if (Owner.Engine.Game.Player != null) {
          label.setLocation(
             Owner.Engine.Game.Player.Location.X,
             Owner.Engine.Game.Player.Location.Y,
             Owner.Engine.Game.Player.Location.Z
          );
       }
       Owner.Engine.Data.AddLabel(label);
       Owner.Engine.UpdateMap();
    }
 }
コード例 #10
0
        public static void BeginAdd(fMap Owner)
        {
            fEditLabel editor = new fEditLabel(Owner);

            if (editor.ShowDialog(Owner) == DialogResult.OK)
            {
                MapEngine.MapLabel label = new MapEngine.MapLabel(editor.txtCaption.Text, editor.cmdLabelColor.BackColor);
                if (Owner.Engine.Game.Player != null)
                {
                    label.setLocation(
                        Owner.Engine.Game.Player.Location.X,
                        Owner.Engine.Game.Player.Location.Y,
                        Owner.Engine.Game.Player.Location.Z
                        );
                }
                Owner.Engine.Data.AddLabel(label);
                Owner.Engine.UpdateMap();
            }
        }
コード例 #11
0
        // starts a new map instance using the given process
        private void LoadProcess(Process process)
        {
            if (m_instance != process)
            {
                try {
                    Config cProcess = m_config.OpenKey("profiles\\" + process.MainWindowTitle);

                    if (m_window == null || m_window.IsDisposed || !m_window.IsHandleCreated)
                    {
                        m_window = new fMap(this, process, cProcess);
                        m_window.Show();
                    }
                    else
                    {
                        m_window.Process = process;
                        m_window.Config  = cProcess;
                    }
                    return;
                } catch (MemoryReaderException) {
                    ShowBalloonTip(1500, string.Format(Program.GetLang("bubble_error_loadpid_title"), process.MainWindowTitle), string.Format(Program.GetLang("bubble_error_loadpid_text"), process.MainWindowTitle), ToolTipIcon.Error);
                }
                m_instance = null;
            }
        }
コード例 #12
0
        public void OnEngage(fMap Window)
        {
            if (engaged)
            {
                throw new Exception("Editor already engaged.");
            }
            if (!(Window.Instance is IFFXIGameContainer))
            {
                throw new Exception("Instance does not support FFXI.");
            }
            if (!(Window.Instance is IFFXIMapImageContainer))
            {
                throw new Exception("Instance does not support FFXI image maps.");
            }

            engaged = true;
            window  = Window;
            engine  = Window.Engine;
            window.Engine.Game.Highlighted = null;
            icontainer = window.Instance as IFFXIGameContainer;
            imap       = Window.Instance as IFFXIMapImageContainer;

            if (ui == null)
            {
                ui = new FFXIMapImageEditorUI(this);
            }
            ui.Show(window);
            ui.Left  = window.Left;
            ui.Top   = window.Bottom;
            ui.Width = window.Width;
            engine.MapAlternativeImage = null;

            BuildMapList();
            ui.updateMapInfo();
            icontainer.ZoneChanged += new EventHandler(icontainer_ZoneChanged);
        }
コード例 #13
0
ファイル: MapEditor.cs プロジェクト: stsy/mappy
 public virtual void OnDisengage() {
    engaged = false;
    window = null;
 }
コード例 #14
0
 private fEditLabel(fMap parent)
 {
     this.parent = parent;
     InitializeComponent();
 }
コード例 #15
0
ファイル: fEditHunts.cs プロジェクト: stsy/mappy
 public static void BeginEdit(fMap Owner) {
    fEditHunts editor = new fEditHunts(Owner);
    editor.Show(Owner);
 }
コード例 #16
0
ファイル: fCustomize.cs プロジェクト: stsy/mappy
 public static void BeginCustomization(IController Controller, fMap Owner)
 {
     BeginCustomization(Controller, Owner, lastTab);
 }
コード例 #17
0
ファイル: Controller.cs プロジェクト: stsy/mappy
 public GameInstance CreateInstance(Process process, fMap window) {
 return new FFXIGameInstance(process, window.Engine, m_config, window.MapPackPath, Program.ModuleName);
 }
コード例 #18
0
ファイル: fEditMap.cs プロジェクト: stsy/mappy
 private fEditMap(fMap Parent) {
    parent = Parent;
    InitializeComponent();
 }
コード例 #19
0
ファイル: fEditMap.cs プロジェクト: khoa002/ffxi-mappy
 private fEditMap(fMap Parent)
 {
     parent = Parent;
     InitializeComponent();
 }
コード例 #20
0
ファイル: MapEditor.cs プロジェクト: khoa002/ffxi-mappy
 public virtual void OnDisengage()
 {
     engaged = false;
     window  = null;
 }
コード例 #21
0
ファイル: fEditLabel.cs プロジェクト: stsy/mappy
 private fEditLabel(fMap parent) {
    this.parent = parent;
    InitializeComponent();
 }
コード例 #22
0
 public GameInstance CreateInstance(Process process, fMap window)
 {
     return(new FFXIGameInstance(process, window.Engine, m_config, window.MapPackPath, Program.ModuleName));
 }
コード例 #23
0
ファイル: fEditMap.cs プロジェクト: khoa002/ffxi-mappy
        public static void BeginEditor(fMap Owner)
        {
            fEditMap editor = new fEditMap(Owner);

            editor.Show(Owner);
        }
コード例 #24
0
ファイル: fCustomize.cs プロジェクト: stsy/mappy
        private fCustomize(IController Controller, fMap Parent)
            : this(Controller)
        {
            //------------------------------------------------------------------------------------------
            // initialize profile config options
            //------------------------------------------------------------------------------------------
            if (Parent == null || Parent.IsDisposed || !Parent.IsHandleCreated)
                return;
            parent = Parent;
            tpMap.Enabled = true;
            tpAppearance.Enabled = true;
            tpDepthFilter.Enabled = true;
            lblSigNoActivePID.Visible = false;

            //store the current values in case cancel is pressed. (most settings give a live preview)
            original_backColor = parent.BackColor;
            original_backOpacity = parent.LayerOpacity;
            original_showGridLines = parent.Engine.ShowGridLines;
            original_showGridTicks = parent.Engine.ShowGridTicks;
            original_gridSize = parent.Engine.GridSize;
            original_gridLineColor = parent.Engine.GridLineColor;
            original_gridTickColor = parent.Engine.GridTickColor;
            original_showPlayerPosition = parent.Engine.ShowPlayerPosition;
            original_playerColor = parent.Engine.PlayerColor;
            original_npcColor = parent.Engine.NPCColor;
            original_enemyColor = parent.Engine.MOBColor;
            original_usePlayerColor = parent.Engine.UsePlayerColor;
            original_mapimgOpacity = parent.Engine.MapAlternativeOpacity;
            original_showAlt = parent.Engine.ShowMapAlternative;
            original_showAltAlways = parent.Engine.ShowMapAlternativeAlways;
            original_mapPath = parent.Engine.Data.FilePath;
            original_mapPackPath = parent.MapPackPath;
            original_autoRangeSnap = parent.Engine.AutoRangeSnap;
            original_depthFilterLines = parent.Engine.DepthFilterLines;
            original_depthFilterSpawns = parent.Engine.DepthFilterSpawns;
            original_depthFilterAlpha = parent.Engine.DepthFilterAlpha;
            original_depthFilterAlphaMin = parent.Engine.DepthAlphaMin;
            original_depthFilterAlphaMax = parent.Engine.DepthAlphaMax;
            original_depthFilterDistance = parent.Engine.DepthDistance;
            original_depthFilterCutoff = parent.Engine.DepthCutoff;
            original_pollfreq = parent.PollFrequency;
            original_scaleLines = parent.Engine.ScaleLines;
            original_selectedColor = parent.Engine.SelectedColor;
            original_showTextOutline = parent.Engine.TextOutlineEnabled;
            original_textOutlineColor = parent.Engine.TextOutlineColor;
            original_showRadarRange = parent.Engine.ShowRadarRange;
            original_radarRangeColor = parent.Engine.RadarRangeColor;
            original_huntLineColor = parent.Engine.HuntChainColor;
            original_huntLockedLineColor = parent.Engine.HuntLockedChainColor;
            original_claimLineColor = parent.Engine.ClaimChainColor;
            original_petLineColor = parent.Engine.PetChainColor;
            original_groupMemberColor = parent.Engine.GroupMemberColor;
            original_raidMemberColor = parent.Engine.RaidMemberColor;
            original_infoTemplate = parent.Engine.InfoTemplate;
            original_infoAllPlayers = parent.Engine.ShowAllPlayerInfo;
            original_infoAllNPCs = parent.Engine.ShowAllNPCInfo;
            original_infoAllEnemies = parent.Engine.ShowAllEnemyInfo;
            original_mainPlayerColor = parent.Engine.MainPlayerColor;
            original_mainPlayerFillColor = parent.Engine.MainPlayerFillColor;
            original_mainPlayerFillEnabled = parent.Engine.MainPlayerFillEnabled;
            original_showClaimLines = parent.Engine.ShowClaimLines;
            original_showHuntLines = parent.Engine.ShowHuntLines;
            original_showPetLines = parent.Engine.ShowPetLines;
            original_playerSize = parent.Engine.PlayerSize;
            original_NPCSize = parent.Engine.NPCSize;
            original_MOBSize = parent.Engine.MOBSize;
            original_spawnSelectSize = parent.Engine.SpawnSelectSize;
            original_spawnGroupSize = parent.Engine.SpawnGroupMemberSize;
            original_spawnHuntSize = parent.Engine.SpawnHuntSize;
            original_playerInfoFont = parent.Engine.PlayerInfoFont;
            original_playerInfoColor = parent.Engine.PlayerInfoColor;
            original_NPCInfoFont = parent.Engine.NPCInfoFont;
            original_NPCInfoColor = parent.Engine.NPCInfoColor;
            original_MOBInfoFont = parent.Engine.MOBInfoFont;
            original_MOBInfoColor = parent.Engine.MOBInfoColor;
            original_drawHeadingLines = parent.Engine.DrawHeadings;
            original_headingLineColor = parent.Engine.HeadingColor;

            //------------------------------------------------------------------------------------------
            //update controls with current state
            //------------------------------------------------------------------------------------------
            cmdChangeBackColor.BackColor = original_backColor;
            cmdGridLineColor.BackColor = original_gridLineColor;
            cmdGridTickColor.BackColor = original_gridTickColor;
            chkShowPlayerPosition.Checked = original_showPlayerPosition;
            cmdPlayerColor.BackColor = original_playerColor;
            cmdNPCColor.BackColor = original_npcColor;
            cmdEnemyColor.BackColor = original_enemyColor;
            chkUsePlayerColor.Checked = original_usePlayerColor;
            cmdPlayerColor.Enabled = original_usePlayerColor;
            udGridSize.Value = original_gridSize;
            chkShowGridLines.Checked = original_showGridLines;
            chkShowGridTicks.Checked = original_showGridTicks;
            chkShowMapAlternative.Checked = original_showAlt;
            chkShowMapAlternativeAlways.Checked = original_showAltAlways;
            chkAutoRangeSnap.Checked = original_autoRangeSnap;
            tbOpacity.Value = (int)(original_backOpacity * 100);
            lblOpacityPercent.Text = ((int)(original_backOpacity * 100)) + "%";
            tbMapImageOpacity.Value = (int)(original_mapimgOpacity * 100);
            lblMapImageOpacityPercent.Text = ((int)(original_mapimgOpacity * 100)) + "%";
            chkShowMapAlternativeAlways.Enabled = original_showAlt;
            lblMapAltOpacityTitle.Enabled = original_showAlt;
            tbMapImageOpacity.Enabled = original_showAlt;
            lblMapImageOpacityPercent.Enabled = original_showAlt;
            chkEnableLineDepthFilter.Checked = original_depthFilterLines;
            chkEnableSpawnDepthFilter.Checked = original_depthFilterSpawns;
            chkDepthFilterUseAlpha.Checked = original_depthFilterAlpha;
            udDepthAlphaMin.Value = original_depthFilterAlphaMin;
            udDepthAlphaMax.Value = original_depthFilterAlphaMax;
            udDepthAlphaMin.Enabled = original_depthFilterAlpha;
            udDepthAlphaMax.Enabled = original_depthFilterAlpha;
            txtDepthDistance.Text = original_depthFilterDistance.ToString();
            txtDepthCutoff.Text = original_depthFilterCutoff.ToString();
            udPollFrequency.Value = (decimal)original_pollfreq;
            chkScaleLines.Checked = original_scaleLines;
            cmdSelectedColor.BackColor = original_selectedColor;
            chkShowTextOutline.Checked = original_showTextOutline;
            cmdTextGlowColor.BackColor = original_textOutlineColor;
            chkShowRadarRange.Checked = original_showRadarRange;
            cmdRadarRangeColor.BackColor = original_radarRangeColor;
            cmdHuntLineColor.BackColor = original_huntLineColor;
            cmdHuntLockedLineColor.BackColor = original_huntLockedLineColor;
            cmdClaimLineColor.BackColor = original_claimLineColor;
            cmdPetLineColor.BackColor = original_petLineColor;
            cmdGroupMemberColor.BackColor = original_groupMemberColor;
            cmdRaidMemberColor.BackColor = original_raidMemberColor;
            txtInfoTemplate.Text = original_infoTemplate;
            chkInfoAllPlayers.Checked = original_infoAllPlayers;
            chkInfoAllNPCs.Checked = original_infoAllNPCs;
            chkInfoAllEnemies.Checked = original_infoAllEnemies;
            cmdMainPlayerColor.BackColor = parent.Engine.MainPlayerColor;
            cmdMainPlayerFillColor.BackColor = parent.Engine.MainPlayerFillColor;
            chkUseMainPlayerFill.Checked = parent.Engine.MainPlayerFillEnabled;
            chkShowClaimLines.Checked = original_showClaimLines;
            chkShowHuntLines.Checked = original_showHuntLines;
            chkShowPetLines.Checked = original_showPetLines;
            udPlayerSize.Value = (decimal)original_playerSize;
            udNPCSize.Value = (decimal)original_NPCSize;
            udMOBSize.Value = (decimal)original_MOBSize;
            udSpawnSelectSize.Value = (decimal)original_spawnSelectSize;
            udSpawnGroupSize.Value = (decimal)original_spawnGroupSize;
            udSpawnHuntSize.Value = (decimal)original_spawnHuntSize;
            lblPlayerInfoFontDisplay.Text = GetPrettyFont(original_playerInfoFont);
            lblNPCInfoFontDisplay.Text = GetPrettyFont(original_NPCInfoFont);
            lblMOBInfoFontDisplay.Text = GetPrettyFont(original_MOBInfoFont);
            cmdPlayerInfoColor.BackColor = original_playerInfoColor;
            cmdNPCInfoColor.BackColor = original_NPCInfoColor;
            cmdMOBInfoColor.BackColor = original_MOBInfoColor;
            chkDrawHeadingLines.Checked = original_drawHeadingLines;
            cmdHeadingLineColor.BackColor = original_headingLineColor;

            displayMapPath();
            displayMapPackPath();

            //force text change event so that feedback elements are correctly set
            txtSIG_ZONE_ID_TextChanged(this, new EventArgs());
            txtSIG_ZONE_SHORT_TextChanged(this, new EventArgs());
            txtSIG_SPAWN_START_TextChanged(this, new EventArgs());
            txtSIG_SPAWN_END_TextChanged(this, new EventArgs());
            txtSIG_MY_ID_TextChanged(this, new EventArgs());
            txtSIG_MY_TARGET_TextChanged(this, new EventArgs());
        }
コード例 #25
0
ファイル: fEditMap.cs プロジェクト: stsy/mappy
 public static void BeginEditor(fMap Owner) {
    fEditMap editor = new fEditMap(Owner);
    editor.Show(Owner);
 }
コード例 #26
0
ファイル: Controller.cs プロジェクト: stsy/mappy
      // starts a new map instance using the given process
      private void LoadProcess(Process process) {
         if (m_instance != process) {
            try {
               Config cProcess = m_config.OpenKey("profiles\\" + process.MainWindowTitle);

               if (m_window == null || m_window.IsDisposed || !m_window.IsHandleCreated) {
                  m_window = new fMap(this, process, cProcess);
                  m_window.Show();
               } else {
                  m_window.Process = process;
                  m_window.Config = cProcess;
               }
               return;
            } catch(MemoryReaderException) {
               ShowBalloonTip(1500, string.Format(Program.GetLang("bubble_error_loadpid_title"), process.MainWindowTitle), string.Format(Program.GetLang("bubble_error_loadpid_text"), process.MainWindowTitle), ToolTipIcon.Error);
            }
            m_instance = null;
         }
      }
コード例 #27
0
ファイル: MapEditor.cs プロジェクト: stsy/mappy
 public virtual void OnEngage(fMap Window) {
    if (engaged)
       throw new Exception("Editor already engaged.");
    engaged = true;
    window = Window;
 }
コード例 #28
0
ファイル: FFXIMapImageEditor.cs プロジェクト: stsy/mappy
 public void OnDisengage() {
    engine.MapAlternativeBounds = imap.CurrentMap.Bounds;
    icontainer.ZoneChanged -= new EventHandler(icontainer_ZoneChanged);
    window.Cursor = Cursors.Default;
    engaged = false;
    ui.Hide();
    window = null;
    engine.MapAlternativeImage = imap.CurrentMap.GetImage();
 }
コード例 #29
0
        public static void BeginEdit(fMap Owner)
        {
            fEditHunts editor = new fEditHunts(Owner);

            editor.Show(Owner);
        }
コード例 #30
0
ファイル: fCustomize.cs プロジェクト: stsy/mappy
 public static void BeginCustomization(IController Controller, fMap Owner, string StartingTab)
 {
     if (currentCustomization == null || currentCustomization.IsDisposed || !currentCustomization.IsHandleCreated)
     {
         currentCustomization = new fCustomize(Controller, Owner);
         if (currentCustomization.tcOptions.TabPages.ContainsKey(StartingTab))
             currentCustomization.tcOptions.SelectedTab = currentCustomization.tcOptions.TabPages[StartingTab];
         currentCustomization.Show(Owner);
     }
     else
     {
         currentCustomization.Activate();
     }
 }