Beispiel #1
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);
      }
Beispiel #2
0
        public static void BeginEdit(fMap Owner, Config config)
        {
            fEditHunts editor = new fEditHunts(Owner, config);

            editor.Show(Owner);
            editor.ApplyConfig();
        }
Beispiel #3
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);
      }
        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);
        }
Beispiel #5
0
 public virtual void OnEngage(fMap Window)
 {
     if (engaged)
     {
         throw new Exception("Editor already engaged.");
     }
     engaged = true;
     window  = Window;
 }
 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();
 }
Beispiel #7
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();
         }
      }
Beispiel #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();
            }
        }
Beispiel #9
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();
    }
 }
Beispiel #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();
            }
        }
Beispiel #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;
            }
        }
        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);
        }
Beispiel #13
0
 public virtual void OnDisengage() {
    engaged = false;
    window = null;
 }
Beispiel #14
0
 private fEditLabel(fMap parent)
 {
     this.parent = parent;
     InitializeComponent();
 }
Beispiel #15
0
 public static void BeginEdit(fMap Owner) {
    fEditHunts editor = new fEditHunts(Owner);
    editor.Show(Owner);
 }
Beispiel #16
0
 public static void BeginCustomization(IController Controller, fMap Owner)
 {
     BeginCustomization(Controller, Owner, lastTab);
 }
Beispiel #17
0
 public GameInstance CreateInstance(Process process, fMap window) {
 return new FFXIGameInstance(process, window.Engine, m_config, window.MapPackPath, Program.ModuleName);
 }
Beispiel #18
0
 private fEditMap(fMap Parent) {
    parent = Parent;
    InitializeComponent();
 }
Beispiel #19
0
 private fEditMap(fMap Parent)
 {
     parent = Parent;
     InitializeComponent();
 }
Beispiel #20
0
 public virtual void OnDisengage()
 {
     engaged = false;
     window  = null;
 }
Beispiel #21
0
 private fEditLabel(fMap parent) {
    this.parent = parent;
    InitializeComponent();
 }
Beispiel #22
0
 public GameInstance CreateInstance(Process process, fMap window)
 {
     return(new FFXIGameInstance(process, window.Engine, m_config, window.MapPackPath, Program.ModuleName));
 }
Beispiel #23
0
        public static void BeginEditor(fMap Owner)
        {
            fEditMap editor = new fEditMap(Owner);

            editor.Show(Owner);
        }
Beispiel #24
0
        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());
        }
Beispiel #25
0
 public static void BeginEditor(fMap Owner) {
    fEditMap editor = new fEditMap(Owner);
    editor.Show(Owner);
 }
Beispiel #26
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;
         }
      }
Beispiel #27
0
 public virtual void OnEngage(fMap Window) {
    if (engaged)
       throw new Exception("Editor already engaged.");
    engaged = true;
    window = Window;
 }
Beispiel #28
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();
 }
        public static void BeginEdit(fMap Owner)
        {
            fEditHunts editor = new fEditHunts(Owner);

            editor.Show(Owner);
        }
Beispiel #30
0
 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();
     }
 }