Version 1.9

This commit is contained in:
OTCv8
2020-01-21 23:45:52 +01:00
parent 11ad766308
commit be8704ee92
56 changed files with 3517 additions and 483 deletions

View File

@@ -830,7 +830,7 @@ function refreshViewMode()
local minimumWidth = (g_settings.getNumber("rightPanels") + g_settings.getNumber("leftPanels") - 1) * 200
if classic then
minimumWidth = minimumWidth + 300
minimumWidth = minimumWidth + 400
end
minimumWidth = math.max(minimumWidth, 800)
g_window.setMinimumSize({ width = minimumWidth, height = 600 })
@@ -866,6 +866,7 @@ function refreshViewMode()
end
gameMapPanel:setVisibleDimension({ width = 15, height = 11 })
gameMapPanel:setMarginTop(0)
if classic then
gameRootPanel:addAnchor(AnchorTop, 'topMenu', AnchorBottom)
@@ -878,9 +879,6 @@ function refreshViewMode()
gameBottomPanel:addAnchor(AnchorLeft, 'gameLeftPanels', AnchorRight)
gameBottomPanel:addAnchor(AnchorRight, 'gameRightPanels', AnchorLeft)
bottomSplitter:addAnchor(AnchorLeft, 'gameLeftPanels', AnchorRight)
bottomSplitter:addAnchor(AnchorRight, 'gameRightPanels', AnchorLeft)
bottomSplitter:setMarginLeft(0)
modules.client_topmenu.getTopMenu():setImageColor('white')
gameBottomPanel:setImageColor('white')
@@ -890,28 +888,28 @@ function refreshViewMode()
modules.game_console.switchMode(false)
end
else
g_game.changeMapAwareRange(29, 19)
g_game.changeMapAwareRange(31, 21)
gameMapPanel:fill('parent')
gameRootPanel:fill('parent')
gameMapPanel:setKeepAspectRatio(false)
gameMapPanel:setLimitVisibleRange(false)
if g_game.getFeature(GameChangeMapAwareRange) then
gameMapPanel:setZoom(13)
else
gameMapPanel:setZoom(11)
end
gameBottomPanel:addAnchor(AnchorLeft, 'parent', AnchorLeft)
gameBottomPanel:addAnchor(AnchorRight, 'parent', AnchorRight)
bottomSplitter:addAnchor(AnchorLeft, 'parent', AnchorLeft)
bottomSplitter:addAnchor(AnchorRight, 'parent', AnchorRight)
gameMapPanel:setZoom(14)
modules.client_topmenu.getTopMenu():setImageColor('#ffffff66')
if modules.game_console then
modules.game_console.switchMode(true)
end
end
if modules.game_actionbar then
modules.game_actionbar.switchMode(not classic)
end
if g_settings.getBoolean("cacheMap") then
g_game.enableFeature(GameBiggerMapCache)
end
updateSize()
end
function limitZoom()
@@ -922,15 +920,6 @@ function updateSize()
local classic = g_settings.getBoolean("classicView")
local height = gameMapPanel:getHeight()
local width = gameMapPanel:getWidth()
if not classic and modules.game_console then
local newMargin = modules.game_console.consolePanel:getMarginLeft()
newMargin = math.max(0, newMargin)
newMargin = math.min(modules.game_console.consolePanel:getParent():getWidth() - modules.game_console.consolePanel:getWidth(), newMargin)
bottomSplitter:setMarginLeft(newMargin)
modules.game_console.consolePanel:setMarginLeft(newMargin)
bottomSplitter:setMarginLeft(newMargin)
end
if not classic then
local rheight = gameRootPanel:getHeight()
@@ -941,11 +930,20 @@ function updateSize()
local awareRange = g_map.getAwareRange()
local dheight = dimenstion.height
local dwidth = dimenstion.width
local tileSize = rheight / dheight
local maxWidth = tileSize * (awareRange.width - 4)
local margin = math.max(0, math.floor((rwidth - maxWidth) / 2))
gameMapPanel:setMarginLeft(margin)
gameMapPanel:setMarginRight(margin)
local tileSize = rheight / dheight
local maxWidth = tileSize * (awareRange.width + 1)
if g_game.getFeature(GameChangeMapAwareRange) then
local maxWidth = tileSize * (awareRange.width - 1)
end
gameMapPanel:setMarginTop(-tileSize * 2)
if g_settings.getBoolean("cacheMap") then
gameMapPanel:setMarginLeft(0)
gameMapPanel:setMarginRight(0)
else
local margin = math.max(0, math.floor((rwidth - maxWidth) / 2))
gameMapPanel:setMarginLeft(margin)
gameMapPanel:setMarginRight(margin)
end
end
--[[