sorry miss some content.
for example:
Default screen size: 1136 X 640
on layout start ->
adjust_Y=0
if WindowWidth/WindowHeight < 1136/640
set adjust_Y=defaultHeight/2-defaultWidth/WindowWidth*WindowHeight/2
set HUD y default Y + adjust_Y (HUD on top)
set HUD y default Y - adjust_Y (HUD on bottom)