Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • May 16 21:13

    sirinsidiator on pts8.0

    8.0.4 (compare)

  • May 09 20:34

    sirinsidiator on pts8.0

    8.0.3 (compare)

  • May 09 20:09

    sirinsidiator on master

    7.3.9 (compare)

  • May 02 18:08

    sirinsidiator on pts8.0

    8.0.2 (compare)

  • Apr 25 15:46

    sirinsidiator on pts8.0

    8.0.1 (compare)

  • Apr 25 10:57

    sirinsidiator on master

    7.3.8 (compare)

  • Apr 19 20:12

    sirinsidiator on pts8.0

    8.0.0 (compare)

  • Apr 18 15:10

    sirinsidiator on master

    updated ESOUIDocumentation.txt (compare)

  • Apr 11 15:45

    sirinsidiator on master

    7.3.7 (compare)

  • Mar 28 10:48

    sirinsidiator on master

    7.3.6 (compare)

  • Mar 18 11:50

    sirinsidiator on master

    updated ESOUIDocumentation.txt (compare)

  • Mar 14 22:39

    sirinsidiator on master

    7.3.5 (compare)

  • Mar 14 11:56

    sirinsidiator on pts7.3

    7.3.5 (compare)

  • Feb 28 17:57

    sirinsidiator on pts7.3

    7.3.4 (compare)

  • Feb 21 17:30

    sirinsidiator on pts7.3

    7.3.3 (compare)

  • Feb 14 18:23

    sirinsidiator on pts7.3

    7.3.2 (compare)

  • Feb 14 17:41

    sirinsidiator on master

    7.2.10 (compare)

  • Feb 07 20:09

    sirinsidiator on pts7.3

    7.3.1 (compare)

  • Feb 01 12:10

    sirinsidiator on pts7.3

    7.3.0 (compare)

  • Jan 31 16:31
    Baertram commented #2
Thal-J
@thal_j:matrix.org
[m]
any way to pass the event down to worldmap?
Baertram
@Baertram
Your :SetMouseEnabled stuff just enabled the mouse clicks and the controls then "are in the way"
Not sure, might be, I do not know any but I remember there was a similar discussion here months ago. Maybe someone remembers who pointed out a solution.
I'd check how the keybind for the waypoint works, what function is called and just check if there is a control == WorldMap check or similar, and maybe just add a keybind handler to your polygon controls then to pass the same function call to that worldmap control directly (if this is possible)
Ask @votan73 he might know if there is another easier way to pass that on
votan
@votan73
On live sometimes the dig site polygons do not allow to place a waypoint.
For PTS, if something is not clickable, add +2 to Level of the control.
Thal-J
@thal_j:matrix.org
[m]
this is my hack for now..
    if (AWM.currentlySelectedPolygon ~= nil and not isInGamepadMode()) then

      local xN, yN = getNormalisedMouseCoordinates()
      AWMWaypointKeybind = {
        {
          name = "Set Destination",
          keybind = "UI_SHORTCUT_TERTIARY",
          callback = function() onWaypointSet(nil, "waypoint", xN, yN, true) end,
        },
        alignment = KEYBIND_STRIP_ALIGN_CENTER,
      }

      KEYBIND_STRIP:AddKeybindButtonGroup(AWMWaypointKeybind)

    else
      KEYBIND_STRIP:RemoveKeybindButtonGroup(AWMWaypointKeybind)
    end

For PTS, if something is not clickable, add +2 to Level of the control.

i do not understand this

Baertram
@Baertram
control:SetLevel()
Thal-J
@thal_j:matrix.org
[m]
i mean the PTS/live part, does he mean something has changed this PTS regarding control levels?
Baertram
@Baertram
Yes, DrawTier >DrawLayer>DrawLevel need to be correct for all controls now or your controls are visible but not clickable (or even not visible)
Linked above
It provides an example at the esoui wiki too
Thal-J
@thal_j:matrix.org
[m]
note that my issue is not that it is not clickable, but it is eating up other events, does votan's advice here still apply?
Baertram
@Baertram
I doubt so
But it's good to know either way
Baertram
@Baertram
Instead of manipulating the keybind strip check the original keybind function and hook it to see if the keybind F, if pressed, is raised or not. If it's not raised your approach maybe the best then, but if it is raised try to check why it does not work on your control and manipulate it like in a ZO_PreHook the ctrl of the function is your polygone and thus it does not work? Call the same function again without the prehook code (like set a variable to true and skip your prehook code by that), call the original function but pass in the correct WORLDMAP control to work with the waypoint, and after that set the variable to false again
Thal-J
@thal_j:matrix.org
[m]

check the original keybind function and hook it to see if the keybind F, if pressed, is raised or not.

I do not know how to do this

Baertram
@Baertram
Search the worldmap lua and xml files for the keybind that is used for the "set wayshrine" thing
check which function is used there in the keybind callback
And then use ZO_PreHook to hook it
if it is not local
Oh this is gamepad
callback = function()
                if g_keybindStrips.mouseover:IsOverPinType(MAP_PIN_TYPE_PLAYER_WAYPOINT) then
                    ZO_WorldMap_RemovePlayerWaypoint()
                else
                    local x, y = NormalizePreferredMousePositionToMap()
                    if ZO_WorldMap_IsNormalizedPointInsideMapBounds(x, y) then
                        PingMap(MAP_PIN_TYPE_PLAYER_WAYPOINT, MAP_TYPE_LOCATION_CENTERED, x, y)
                        g_keybindStrips.mouseover:DoMouseEnterForPinType(MAP_PIN_TYPE_PLAYER_WAYPOINT) -- this should have been called by the mouseover update, but it's not getting called
                    end
                end
            end,
This is called as the keybind for set waypoint is pressed -> the callback function
if ZO_WorldMap_IsNormalizedPointInsideMapBounds(x, y) then
Maybe this check is false here because of your polygons, dunno
Thal-J
@thal_j:matrix.org
[m]
isn't this local?
Baertram
@Baertram
The table mouseoverDescriptor is local, and it defines that keybind
But it is added here to a global as it seems:
g_keybindStrips.mouseover = ZO_MapMouseoverKeybindStrip:New(self.control, mouseoverDescriptor)
So find out where g_keybindStrips is made local, and verwrite it with your own keybind definition e.g.
where you have changed the table mouseoverDescriptor with your code + debug messages
Hm, seems g_keybindStrips is only local, and no func returns it or it was not added to any global so one can access it :(
Thal-J
@thal_j:matrix.org
[m]
so my approach (hacky) is the best one until I find a way to pass down event to ZO_WorldMapContainer then?
Baertram
@Baertram

You could just try the same as ZOs code does here:
https://github.com/esoui/esoui/blob/0841c7e7cacbfab7bbee52c94647555cd66c206d/esoui/ingame/map/worldmap.lua#L4180

The keybinds are added/removed from the strip as the mouse nters/exits the map

The descriptor is used to find the keybind table to add/remove
KEYBIND_STRIP:AddKeybindButtonGroup(g_keybindStrips.mouseover:GetDescriptor())
KEYBIND_STRIP:RemoveKeybindButtonGroup(g_keybindStrips.mouseover:GetDescriptor())
If you fnd the correct descriptor within g_keybindStrips.mouseover you could create your own with the same descriptor and "overwrite" it that way, maybe
You just need to do somehting like
SecurePostHook("ZO_WorldMap_MouseEnter", function() 
if not IsInGamepadPreferredMode() then
  KEYBIND_STRIP:AddKeybindButtonGroup(myOwnMouseoverKeybindDescriptorTable)
end
end)
Thal-J
@thal_j:matrix.org
[m]
confused as how this would help - I would need a ref to worldmap's waypoint callback function to help here wouldn't I?
or if I just left out callback would it default to ZOS's ?
Baertram
@Baertram
You would define your own keybind function there where you can add debug messges and check what the code by ZOs does that way, to find out why it is not working as intended. Either it's never called as your mouse is above the polygon as the ZO_WorldMap_MouseEnter is not called at your polygon -> Easy fix: In your polygon's onMouseEnter add the call to ZO_WorldMap_MouseEnter so that the keybind is shown
Or you would find out more to be able to fix your problem with the waypoint keybind that way, maybe
It was an example "how to debug what is wrong", not a solution for your problem
Thal-J
@thal_j:matrix.org
[m]
understood