55 lines
2.4 KiB
C#
55 lines
2.4 KiB
C#
using Platform;
|
|
|
|
namespace Harmony.XUiC_MapAreaPatches
|
|
{
|
|
/*[HarmonyPatch(typeof(XUiC_MapArea))]
|
|
[HarmonyPatch("onMapPressedLeft")]
|
|
public class onMapPressedLeftPatch
|
|
{
|
|
public static bool Prefix(XUiC_MapArea __instance, XUiController _sender, int _mouseButton)
|
|
{
|
|
Log.Out("XUiC_MapAreaPatches-onMapPressedLeft START");
|
|
__instance.closeAllPopups();
|
|
if (__instance.closestMouseOverNavObject != null)
|
|
{
|
|
Log.Out("XUiC_MapAreaPatches-onMapPressedLeft 1");
|
|
__instance.closestMouseOverNavObject.hiddenOnCompass = !__instance.closestMouseOverNavObject.hiddenOnCompass;
|
|
if (__instance.closestMouseOverNavObject.hiddenOnCompass)
|
|
{
|
|
Log.Out("XUiC_MapAreaPatches-onMapPressedLeft 2");
|
|
GameManager.ShowTooltip(GameManager.Instance.World.GetPrimaryPlayer(), Localization.Get("compassWaypointHiddenTooltip"));
|
|
}
|
|
if (__instance.closestMouseOverNavObject.NavObjectClass.NavObjectClassName == "quick_waypoint")
|
|
{
|
|
Log.Out("XUiC_MapAreaPatches-onMapPressedLeft 3");
|
|
__instance.xui.playerUI.entityPlayer.navMarkerHidden = __instance.closestMouseOverNavObject.hiddenOnCompass;
|
|
}
|
|
else
|
|
{
|
|
Log.Out("XUiC_MapAreaPatches-onMapPressedLeft 4");
|
|
Waypoint waypointForNavObject = __instance.xui.playerUI.entityPlayer.Waypoints.GetWaypointForNavObject(__instance.closestMouseOverNavObject);
|
|
if (waypointForNavObject == null)
|
|
{
|
|
Log.Out("XUiC_MapAreaPatches-onMapPressedLeft 5");
|
|
return false;
|
|
}
|
|
waypointForNavObject.hiddenOnCompass = __instance.closestMouseOverNavObject.hiddenOnCompass;
|
|
}
|
|
}
|
|
else
|
|
{
|
|
Log.Out("XUiC_MapAreaPatches-onMapPressedLeft 6");
|
|
if (PlatformManager.NativePlatform.Input.CurrentInputStyle == PlayerInputManager.InputStyle.Keyboard)
|
|
{
|
|
Log.Out("XUiC_MapAreaPatches-onMapPressedLeft 7");
|
|
return false;
|
|
}
|
|
__instance.OpenWaypointPopup();
|
|
}
|
|
|
|
Log.Out("XUiC_MapAreaPatches-onMapPressedLeft END");
|
|
return false;
|
|
}
|
|
}*/
|
|
}
|