fix: remove examine option for now

This commit is contained in:
Anna 2020-12-08 03:27:18 -05:00
parent bf4d65615f
commit 27f59f3b31
3 changed files with 19 additions and 15 deletions

View File

@ -1,7 +1,7 @@
using Dalamud.Game.ClientState.Actors.Types;
using Dalamud.Plugin;
using System;
using System.Linq;
using System.Collections.Generic;
using System.Runtime.InteropServices;
namespace PeepingTom {
@ -16,7 +16,14 @@ namespace PeepingTom {
public GameFunctions(PeepingTomPlugin plugin) {
this.plugin = plugin ?? throw new ArgumentNullException(nameof(plugin), "PeepingTomPlugin cannot be null");
IntPtr rciPtr = this.plugin.Interface.TargetModuleScanner.ScanText("48 89 5C 24 ?? 57 48 83 EC 40 BA 1B 01 00 00");
IntPtr rciPtr;
try {
rciPtr = this.plugin.Interface.TargetModuleScanner.ScanText("48 89 5C 24 ?? 57 48 83 EC 40 BA 3B 01 00 00");
// old: 48 89 5C 24 ?? 57 48 83 EC 40 BA 1C 01 00 00
// old: 48 89 5C 24 ?? 57 48 83 EC 40 BA 1B 01 00 00
} catch (KeyNotFoundException) {
rciPtr = IntPtr.Zero;
}
if (rciPtr == IntPtr.Zero) {
PluginLog.Log("Could not find the signature for the examine window function - will not be able to open examine window.");
return;

View File

@ -184,11 +184,11 @@ namespace PeepingTom {
this.plugin.Config.Save();
}
bool openExamine = this.plugin.Config.OpenExamine;
if (ImGui.Checkbox("Open examine window on Alt-click", ref openExamine)) {
this.plugin.Config.OpenExamine = openExamine;
this.plugin.Config.Save();
}
// bool openExamine = this.plugin.Config.OpenExamine;
// if (ImGui.Checkbox("Open examine window on Alt-click", ref openExamine)) {
// this.plugin.Config.OpenExamine = openExamine;
// this.plugin.Config.Save();
// }
ImGui.EndTabItem();
}
@ -405,11 +405,11 @@ namespace PeepingTom {
if (ImGui.Begin(this.plugin.Name, ref this._wantsOpen, flags)) {
ImGui.Text("Targeting you");
ImGui.SameLine();
if (this.plugin.Config.OpenExamine) {
HelpMarker("Click to link, Alt-click to examine, or right click to target.");
} else {
// if (this.plugin.Config.OpenExamine) {
// HelpMarker("Click to link, Alt-click to examine, or right click to target.");
// } else {
HelpMarker("Click to link or right click to target.");
}
// }
float height = ImGui.GetContentRegionAvail().Y;
height -= ImGui.GetStyle().ItemSpacing.Y;
@ -493,7 +493,7 @@ namespace PeepingTom {
}
if (left) {
if (this.plugin.Config.OpenExamine && ImGui.GetIO().KeyAlt) {
if (false && this.plugin.Config.OpenExamine && ImGui.GetIO().KeyAlt) {
if (actor != null) {
this.plugin.GameFunctions.OpenExamineWindow(actor);
} else {

View File

@ -8,12 +8,9 @@ using NAudio.Wave;
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Media;
using System.Runtime.InteropServices;
using System.Threading;
using System.Threading.Tasks;
namespace PeepingTom {
class TargetWatcher : IDisposable {