Thread Tools Display Modes
05/18/14, 12:52 AM   #1
trapesemonkey
Join Date: May 2014
Posts: 3
[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.
  Reply With Quote
05/18/14, 07:18 AM   #2
Harven
 
Harven's Avatar
AddOn Author - Click to view addons
Join Date: Apr 2014
Posts: 135
Hey, the window dissapear when you enter into the cursor mode so it is not that easy to implement.
  Reply With Quote
05/18/14, 07:41 AM   #3
Garkin
 
Garkin's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2014
Posts: 832
Originally Posted by Harven View Post
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.
  Reply With Quote
05/18/14, 08:01 AM   #4
Garkin
 
Garkin's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2014
Posts: 832
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.
  Reply With Quote
05/21/14, 12:39 AM   #5
trapesemonkey
Join Date: May 2014
Posts: 3
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.


Cheers
  Reply With Quote
05/21/14, 02:19 AM   #6
thelegendaryof
 
thelegendaryof's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2014
Posts: 161
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).
  Reply With Quote
05/21/14, 02:37 AM   #7
trapesemonkey
Join Date: May 2014
Posts: 3
Thanks, wish me luck!
  Reply With Quote
05/21/14, 03:10 PM   #8
Tar000un
 
Tar000un's Avatar
AddOn Author - Click to view addons
Join Date: May 2014
Posts: 47
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. :/
  Reply With Quote
05/21/14, 04:20 PM   #9
Garkin
 
Garkin's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2014
Posts: 832
Originally Posted by Tar000un View Post
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)
  Reply With Quote
05/21/14, 04:40 PM   #10
Tar000un
 
Tar000un's Avatar
AddOn Author - Click to view addons
Join Date: May 2014
Posts: 47
I got it, but my problem remains. I will start a new thread. Because it doesnt concern the "Hold to interact".
  Reply With Quote
05/22/14, 03:53 AM   #11
niocwy
AddOn Author - Click to view addons
Join Date: Apr 2014
Posts: 11
Originally Posted by trapesemonkey View Post
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.
  Reply With Quote
05/22/14, 04:35 AM   #12
slowglass
AddOn Author - Click to view addons
Join Date: Apr 2014
Posts: 8
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.
  Reply With Quote

ESOUI » AddOns » AddOn Search/Requests » [REQUEST] "Hold to interact" element

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off