mirror of
https://github.com/smartcmd/MinecraftConsoles.git
synced 2026-08-20 09:57:09 +00:00
Fix pr merge conflict
This commit is contained in:
parent
e0fcd8a9be
commit
dc7ec02b54
|
|
@ -68,9 +68,13 @@ void UIScene_HUD::updateSafeZone()
|
||||||
safeRight = getSafeZoneHalfWidth();
|
safeRight = getSafeZoneHalfWidth();
|
||||||
break;
|
break;
|
||||||
case C4JRender::VIEWPORT_TYPE_SPLIT_BOTTOM:
|
case C4JRender::VIEWPORT_TYPE_SPLIT_BOTTOM:
|
||||||
safeBottom = getSafeZoneHalfHeight();
|
// safeTop mirrors SPLIT_TOP so both players have the same vertical inset
|
||||||
|
// from their viewport's top edge (split divider), keeping GUI symmetrical.
|
||||||
|
// safeBottom is intentionally omitted: it would shift m_Hud.y upward in
|
||||||
|
// ActionScript, placing the hotbar too high relative to SPLIT_TOP.
|
||||||
|
safeTop = getSafeZoneHalfHeight();
|
||||||
safeLeft = getSafeZoneHalfWidth();
|
safeLeft = getSafeZoneHalfWidth();
|
||||||
safeRight = getSafeZoneHalfWidth();
|
|
||||||
break;
|
break;
|
||||||
case C4JRender::VIEWPORT_TYPE_SPLIT_LEFT:
|
case C4JRender::VIEWPORT_TYPE_SPLIT_LEFT:
|
||||||
safeLeft = getSafeZoneHalfWidth();
|
safeLeft = getSafeZoneHalfWidth();
|
||||||
|
|
@ -718,6 +722,20 @@ void UIScene_HUD::render(S32 width, S32 height, C4JRender::eViewportType viewpor
|
||||||
F32 scale;
|
F32 scale;
|
||||||
ComputeTileScale(tileWidth, tileHeight, m_movieWidth, m_movieHeight, needsYTile, scale, tileYStart);
|
ComputeTileScale(tileWidth, tileHeight, m_movieWidth, m_movieHeight, needsYTile, scale, tileYStart);
|
||||||
|
|
||||||
|
// For vertical split, if the window is shorter than the SWF movie,
|
||||||
|
// scale the movie down to fit the full height instead of cropping.
|
||||||
|
// ComputeTileScale clamps scale >= 1.0 (needed for quadrant mode),
|
||||||
|
// but in vertical split the tile covers the full screen height and
|
||||||
|
// cropping the bottom pushes RepositionHud's ActionScript to shift
|
||||||
|
// elements down. Scaling down keeps visibleH == movieHeight in SWF
|
||||||
|
// space, so ActionScript sees the full height and applies no offset.
|
||||||
|
if(!needsYTile && m_movieHeight > 0)
|
||||||
|
{
|
||||||
|
F32 scaleH = (F32)tileHeight / (F32)m_movieHeight;
|
||||||
|
if(scaleH < scale)
|
||||||
|
scale = scaleH;
|
||||||
|
}
|
||||||
|
|
||||||
IggyPlayerSetDisplaySize( getMovie(), static_cast<S32>(m_movieWidth * scale), static_cast<S32>(m_movieHeight * scale) );
|
IggyPlayerSetDisplaySize( getMovie(), static_cast<S32>(m_movieWidth * scale), static_cast<S32>(m_movieHeight * scale) );
|
||||||
|
|
||||||
repositionHud(tileWidth, tileHeight, scale);
|
repositionHud(tileWidth, tileHeight, scale);
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue