Originally Posted by ZOS_ChipHilseberg
- Added as ZO_WorldMap_GetPinManager() and ZO_WorldMap_GetPanAndZoom().
- 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.
- 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.
- 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
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