Other minor fixes
This commit is contained in:
parent
4c51009ed9
commit
717832b791
|
@ -286,8 +286,6 @@ function addTab(name, focus)
|
||||||
end
|
end
|
||||||
if focus then
|
if focus then
|
||||||
consoleTabBar:selectTab(tab)
|
consoleTabBar:selectTab(tab)
|
||||||
elseif not serverTab or name ~= serverTab:getText() then
|
|
||||||
consoleTabBar:blinkTab(tab)
|
|
||||||
end
|
end
|
||||||
return tab
|
return tab
|
||||||
end
|
end
|
||||||
|
|
|
@ -23,6 +23,7 @@ function init()
|
||||||
|
|
||||||
connect(g_game, {
|
connect(g_game, {
|
||||||
onGameStart = onGameStart,
|
onGameStart = onGameStart,
|
||||||
|
onGMActions = onGMActions,
|
||||||
onGameEnd = onGameEnd,
|
onGameEnd = onGameEnd,
|
||||||
onLoginAdvice = onLoginAdvice
|
onLoginAdvice = onLoginAdvice
|
||||||
}, true)
|
}, true)
|
||||||
|
@ -116,6 +117,7 @@ function terminate()
|
||||||
|
|
||||||
disconnect(g_game, {
|
disconnect(g_game, {
|
||||||
onGameStart = onGameStart,
|
onGameStart = onGameStart,
|
||||||
|
onGMActions = onGMActions,
|
||||||
onGameEnd = onGameEnd,
|
onGameEnd = onGameEnd,
|
||||||
onLoginAdvice = onLoginAdvice
|
onLoginAdvice = onLoginAdvice
|
||||||
})
|
})
|
||||||
|
@ -148,6 +150,9 @@ function show()
|
||||||
gameRootPanel:show()
|
gameRootPanel:show()
|
||||||
gameRootPanel:focus()
|
gameRootPanel:focus()
|
||||||
gameMapPanel:followCreature(g_game.getLocalPlayer())
|
gameMapPanel:followCreature(g_game.getLocalPlayer())
|
||||||
|
gameMapPanel:setMaxZoomOut(11)
|
||||||
|
gameMapPanel:setLimitVisibleRange(true)
|
||||||
|
setupViewMode(0)
|
||||||
updateStretchShrink()
|
updateStretchShrink()
|
||||||
logoutButton:setTooltip(tr('Logout'))
|
logoutButton:setTooltip(tr('Logout'))
|
||||||
end
|
end
|
||||||
|
@ -712,7 +717,8 @@ function setupViewMode(mode)
|
||||||
gameMapPanel:setZoom(11)
|
gameMapPanel:setZoom(11)
|
||||||
gameMapPanel:setVisibleDimension({ width = 15, height = 11 })
|
gameMapPanel:setVisibleDimension({ width = 15, height = 11 })
|
||||||
elseif mode == 2 then
|
elseif mode == 2 then
|
||||||
gameMapPanel:setLimitVisibleRange(limitZoom)
|
local limit = limitZoom and not g_game.isGM()
|
||||||
|
gameMapPanel:setLimitVisibleRange(limit)
|
||||||
gameMapPanel:setZoom(11)
|
gameMapPanel:setZoom(11)
|
||||||
gameMapPanel:setVisibleDimension({ width = 15, height = 11 })
|
gameMapPanel:setVisibleDimension({ width = 15, height = 11 })
|
||||||
gameMapPanel:fill('parent')
|
gameMapPanel:fill('parent')
|
||||||
|
@ -727,7 +733,7 @@ function setupViewMode(mode)
|
||||||
gameMapPanel:setOn(true)
|
gameMapPanel:setOn(true)
|
||||||
gameBottomPanel:setImageColor('#ffffff88')
|
gameBottomPanel:setImageColor('#ffffff88')
|
||||||
modules.client_topmenu.getTopMenu():setImageColor('#ffffff66')
|
modules.client_topmenu.getTopMenu():setImageColor('#ffffff66')
|
||||||
if not limitZoom then
|
if not limit then
|
||||||
g_game.changeMapAwareRange(24, 20)
|
g_game.changeMapAwareRange(24, 20)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -737,6 +743,10 @@ end
|
||||||
|
|
||||||
function limitZoom()
|
function limitZoom()
|
||||||
limitZoom = true
|
limitZoom = true
|
||||||
gameMapPanel:setMaxZoomOut(11)
|
end
|
||||||
gameMapPanel:setLimitVisibleRange(true)
|
|
||||||
|
function onGMActions()
|
||||||
|
if not limitZoom then return end
|
||||||
|
gameMapPanel:setMaxZoomOut(513)
|
||||||
|
gameMapPanel:setLimitVisibleRange(false)
|
||||||
end
|
end
|
||||||
|
|
|
@ -174,9 +174,16 @@ void ThingType::draw(const Point& dest, float scaleFactor, int layer, int xPatte
|
||||||
Rect screenRect(dest + (textureOffset - m_displacement - (m_size.toPoint() - Point(1, 1)) * 32) * scaleFactor,
|
Rect screenRect(dest + (textureOffset - m_displacement - (m_size.toPoint() - Point(1, 1)) * 32) * scaleFactor,
|
||||||
textureRect.size() * scaleFactor);
|
textureRect.size() * scaleFactor);
|
||||||
|
|
||||||
g_painter->setOpacity(m_opacity);
|
bool useOpacity = m_opacity < 1.0f;
|
||||||
|
|
||||||
|
if(useOpacity)
|
||||||
|
g_painter->setColor(Color(1.0f,1.0f,1.0f,m_opacity));
|
||||||
|
|
||||||
g_painter->drawTexturedRect(screenRect, texture, textureRect);
|
g_painter->drawTexturedRect(screenRect, texture, textureRect);
|
||||||
|
|
||||||
|
if(useOpacity)
|
||||||
|
g_painter->setColor(Color::white);
|
||||||
|
|
||||||
if(lightView && hasLight()) {
|
if(lightView && hasLight()) {
|
||||||
Light light = getLight();
|
Light light = getLight();
|
||||||
if(light.intensity > 0)
|
if(light.intensity > 0)
|
||||||
|
|
Loading…
Reference in New Issue