ESOUI

ESOUI (https://www.esoui.com/forums/index.php)
-   AddOn Search/Requests (https://www.esoui.com/forums/forumdisplay.php?f=165)
-   -   [REQUEST] "Hold to interact" element (https://www.esoui.com/forums/showthread.php?t=1541)

trapesemonkey 05/18/14 12:52 AM

[REQUEST] "Hold to interact" element
 
Hello,

Can anyone make simple addon to be able to move the "Hold to Interact" window that comes up when you look at players? It's smack dab in the middle of where I want to put my player frames.

Thanks for anything, in advance.

Harven 05/18/14 07:18 AM

Hey, the window dissapear when you enter into the cursor mode so it is not that easy to implement.

Garkin 05/18/14 07:41 AM

Quote:

Originally Posted by Harven (Post 7968)
Hey, the window dissapear when you enter into the cursor mode so it is not that easy to implement.

I have to check it, but I think the control you want to move is ZO_PlayerToPlayerArea.

Garkin 05/18/14 08:01 AM

This code can move it:

Lua Code:
  1. ZO_PlayerToPlayerAreaPromptContainer:ClearAnchors()
  2. ZO_PlayerToPlayerAreaPromptContainer:SetAnchor(BOTTOM, ZO_PlayerToPlayerArea, BOTTOM, 0, -350)
The number 0 in the second command means that control will be in the middle of the screen and -350 means that it will be 350px from the bottom of the screen. If you change numbers and/or anchor points, you can move this prompt to any place you want.

trapesemonkey 05/21/14 12:39 AM

Sorry for being a bit slow.. not new to addons, just new to coding them ;)

So, am I to understand that I should be using the code above in the creation of the addon itself? I just want to make sure I'm not missing some easier way to do this (copy/paste would be so nice lmao) before I undertake the task of attempting to make my first addon. :eek:


Cheers :banana:

thelegendaryof 05/21/14 02:19 AM

The code from Garkin looks like it 's plain C&P yes. :)

Just put it in your Addon intiailization and adjust the Anchor (BOTTOM, ZO_PlayerToPlayerArea, BOTTOM) and/or Offset (0, -350).

trapesemonkey 05/21/14 02:37 AM

Thanks, wish me luck!

Tar000un 05/21/14 03:10 PM

Hmm i m reseting a position UI with a reloadui, and i find it very trashy but functionnal...

I tryed first with this way (clear and reset anchor), but the function works once and never do it again. :/

Garkin 05/21/14 04:20 PM

Quote:

Originally Posted by Tar000un (Post 8189)
Hmm i m reseting a position UI with a reloadui, and i find it very trashy but functionnal...

I tryed first with this way (clear and reset anchor), but the function works once and never do it again. :/

Just copy&paste that code to the end of any .lua file of any addon you use, it should work just fine.


But if you want stand-alone version you should have something like this:

MoveInteract.txt:
Code:

## Title: Move "Hold to Interact"
## APIVersion: 100003

MoveInteract.lua

MoveInteract.lua:
Lua Code:
  1. EVENT_MANAGER:RegisterForEvent("MoveInteract_OnLoad", EVENT_ADD_ON_LOADED,
  2.    function(code, name)
  3.       if name ~= "MoveInteract" then return end
  4.       ZO_PlayerToPlayerAreaPromptContainer:ClearAnchors()
  5.       ZO_PlayerToPlayerAreaPromptContainer:SetAnchor(BOTTOM, ZO_PlayerToPlayerArea, BOTTOM, 0, -350)
  6.       EVENT_MANAGER:UnregisterForEvent("MoveInteract_OnLoad", EVENT_ADD_ON_LOADED)
  7.    end)

Tar000un 05/21/14 04:40 PM

I got it, but my problem remains. I will start a new thread. Because it doesnt concern the "Hold to interact".

niocwy 05/22/14 03:53 AM

Quote:

Originally Posted by trapesemonkey (Post 7956)
Hello,

Can anyone make simple addon to be able to move the "Hold to Interact" window that comes up when you look at players? It's smack dab in the middle of where I want to put my player frames.

Thanks for anything, in advance.

Doesn't Azurah allow you to move it ? Or maybe it's a bit overkill for just the "Hold to interact" frame.

slowglass 05/22/14 04:35 AM

Has anyone written a plugin that binds trade with player to a single key, rather than having to go through the "Hold to Interact" rigmarole.


All times are GMT -6. The time now is 04:46 PM.

vBulletin © 2024, Jelsoft Enterprises Ltd
© 2014 - 2022 MMOUI