Thread Tools Display Modes
09/28/16, 11:29 AM   #1
votan
 
votan's Avatar
AddOn Author - Click to view addons
Join Date: Oct 2014
Posts: 577
[implemented] Little wishes for ZO_WorldMap.lua

Hi Chip,
  • can we have the instances of g_mapPinManager and g_mapPanAndZoom public accessible? (as global Getter functions or members of ZO_WorldMap??)
  • is it possible to get ZO_WorldMap_PanToPlayer working with keepSquare=false?
  • is it possible to call GetGamepadAdjustedMapDimensions for build-in modes, only?
  • can we have a ZO_WorldMap_JumpToPlayer, too?


Thank you in advance.
 
09/29/16, 02:46 AM   #2
sirinsidiator
 
sirinsidiator's Avatar
AddOn Author - Click to view addons
Join Date: Apr 2014
Posts: 1,578
Great ideas. Most of these would be very useful in several of my addons.
Maybe you could also look into this older wish.
 
09/30/16, 03:03 PM   #3
ZOS_ChipHilseberg
ZOS Staff!
Premium Member
Yes this person is from ZeniMax!
Join Date: Oct 2014
Posts: 551
Originally Posted by votan View Post
Hi Chip,
  • can we have the instances of g_mapPinManager and g_mapPanAndZoom public accessible? (as global Getter functions or members of ZO_WorldMap??)
  • is it possible to get ZO_WorldMap_PanToPlayer working with keepSquare=false?
  • is it possible to call GetGamepadAdjustedMapDimensions for build-in modes, only?
  • can we have a ZO_WorldMap_JumpToPlayer, too?


Thank you in advance.
  1. Added as ZO_WorldMap_GetPinManager() and ZO_WorldMap_GetPanAndZoom().
  2. Not sure what the problem is with it without an example and some investigation. This is less likely though since it's old code that we don't use.
  3. That function just returns the empty space in the stock gamepad map UI that the world map can fill so it's particular to that.
  4. Added.
 
09/30/16, 04:48 PM   #4
votan
 
votan's Avatar
AddOn Author - Click to view addons
Join Date: Oct 2014
Posts: 577
Originally Posted by ZOS_ChipHilseberg View Post
  1. Added as ZO_WorldMap_GetPinManager() and ZO_WorldMap_GetPanAndZoom().
  2. Not sure what the problem is with it without an example and some investigation. This is less likely though since it's old code that we don't use.
  3. That function just returns the empty space in the stock gamepad map UI that the world map can fill so it's particular to that.
  4. Added.
Great

Thank you!

To point 2: It has to do with "my" mini map . Once the mode switch "keepSquare" is false, and the mini map isn't square the player pin drifts out of the center (even out of view) depending on the ratio of height/width.
For example in ZO_MapPanAndZoom:Update(currentTime) you use ZO_WorldMapScroll:GetHeight() only. Assuming the width will be the same.

If you use the mini map and search for
Code:
	myMode.mapSize = 2
and change it to:
Code:
	myMode.mapSize = 2
	myMode.keepSquare = false
and resize it, you will see.

To point 3: This function resizes the mini map, too. Therefore I can not add gamepad support. (very low prio)

/edit: to be more precise: The caller of that function will change given width & height for mini map, too:
Code:
local function SetMapWindowSize(newWidth, newHeight)
    if(IsInGamepadPreferredMode()) then
        newWidth, newHeight = GetGamepadAdjustedMapDimensions()
    end
/edit 2:
I may be wrong, because I can not test it, of course. But I think it should be removed from SetMapWindowSize and inserted here:
Code:
local function ResizeAndReanchorMap()
...
    local newMapWidth, newMapHeight
    if(g_modeData.mapSize == CONSTANTS.WORLDMAP_SIZE_FULLSCREEN) then
        if(IsInGamepadPreferredMode()) then
            newMapWidth, newMapHeight = GetGamepadAdjustedMapDimensions()
        else
            newMapWidth, newMapHeight = GetFullscreenMapWindowDimensions()
        end
    else
        if(g_modeData.keepSquare) then
            newMapWidth, newMapHeight = GetSquareMapWindowDimensions(oldMapWidth, CONSTANTS.WORLDMAP_RESIZE_WIDTH_DRIVEN)
        else
            newMapWidth, newMapHeight = zo_min(oldMapWidth, UIWidth), zo_min(oldMapHeight, UIHeight)
        end
    end
    SetMapWindowSize(newMapWidth, newMapHeight)
...
end

Last edited by votan : 10/01/16 at 03:15 AM.
 

ESOUI » Developer Discussions » Wish List » [implemented] Little wishes for ZO_WorldMap.lua

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