Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

4:3 aspect ratio tidy-up #439

Open
wants to merge 1 commit into
base: beta
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 15 additions & 7 deletions BGAnimations/ScreenSelectMusic overlay/PaneDisplay.lua
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ local footer_height = 32
-- height of the PaneDisplay in pixels
local pane_height = 60

local text_zoom = WideScale(0.8, 0.9)
local text_zoom = IsUsingWideScreen() and WideScale(0.8, 0.9) or WideScale(0.7, 0.8)

-- -----------------------------------------------------------------------
-- Convenience function to return the SongOrCourse and StepsOrTrail for a
Expand Down Expand Up @@ -189,12 +189,20 @@ end

-- -----------------------------------------------------------------------
-- define the x positions of four columns, and the y positions of three rows of PaneItems
local pos = {
col = { WideScale(-104,-133), WideScale(-36,-38), WideScale(54,76), WideScale(150, 190) },
row = { 13, 31, 49 }
}

local num_rows = 3
local pos = {}
pos.row = { 13, 31, 49 }

if IsUsingWideScreen() then
-- five columns
pos.col = { WideScale(-104,-133), WideScale(-36,-38), WideScale(54,76), WideScale(150, 190) }

else
-- four columns
pos.col = { WideScale(-104,-133), WideScale(-36,-38), WideScale(54,76), WideScale(150, 190) }
end


local num_cols = 2

-- HighScores handled as special cases for now until further refactoring
Expand All @@ -218,7 +226,7 @@ local PaneItems = {
-- -----------------------------------------------------------------------
local af = Def.ActorFrame{ Name="PaneDisplayMaster" }

af[#af+1] = RequestResponseActor("GetScores", 10, 17, 50)..{
af[#af+1] = RequestResponseActor("GetScores", 10, IsUsingWideScreen() and 17 or _screen.cx+10, 50)..{
OnCommand=function(self)
-- Create variables for both players, even if they're not currently active.
self.IsParsing = {false, false}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@ local pn = ToEnumShortString(player)

-- Height and width of the density graph.
local height = 64
local width = IsUsingWideScreen() and 286 or 276
local width = IsUsingWideScreen() and 286 or 268

local af = Def.ActorFrame{
InitCommand=function(self)
self:visible( GAMESTATE:IsHumanPlayer(player) )
self:xy(_screen.cx-182, _screen.cy+23)
self:visible(GAMESTATE:IsHumanPlayer(player))
self:xy(IsUsingWideScreen() and _screen.cx-182 or _screen.cx-176, _screen.cy+23)

if player == PLAYER_2 then
self:addy(height+24)
Expand All @@ -30,6 +30,7 @@ local af = Def.ActorFrame{
PlayerUnjoinedMessageCommand=function(self, params)
if params.Player == player then
self:visible(false)

end
end,
}
Expand Down Expand Up @@ -211,7 +212,7 @@ for i, row in ipairs(layout) do
Name=col .. "Value",
InitCommand=function(self)
local textHeight = 17
local textZoom = 0.8
local textZoom = IsUsingWideScreen() and 0.8 or 0.75
self:zoom(textZoom):horizalign(right)
if col == "Total Stream" then
self:maxwidth(100)
Expand Down Expand Up @@ -247,7 +248,7 @@ for i, row in ipairs(layout) do
Name=col,
InitCommand=function(self)
local textHeight = 17
local textZoom = 0.8
local textZoom = IsUsingWideScreen() and 0.8 or 0.75
self:maxwidth(width/textZoom):zoom(textZoom):horizalign(left)
self:xy(-width/2 + 50, -height/2 + 10)
self:addx((j-1)*colSpacing)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,20 +37,20 @@ return Def.ActorFrame{
if player == PLAYER_1 then

if GAMESTATE:IsCourseMode() then
self:x( _screen.cx - (IsUsingWideScreen() and 356 or 346))
self:x( _screen.cx - (IsUsingWideScreen() and 356 or 337))
self:y(_screen.cy + 32)
else
self:x( _screen.cx - (IsUsingWideScreen() and 356 or 346))
self:x( _screen.cx - (IsUsingWideScreen() and 356 or 337))
self:y(_screen.cy + 12)
end

elseif player == PLAYER_2 then

if GAMESTATE:IsCourseMode() then
self:x( _screen.cx - 210)
self:x( _screen.cx - (IsUsingWideScreen() and 210 or 208))
self:y(_screen.cy + 85)
else
self:x( _screen.cx - 244)
self:x( _screen.cx - (IsUsingWideScreen() and 244 or 242))
self:y(_screen.cy + 40)
end
end
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@ local MusicWheel, SelectedType
local group_durations = LoadActor("./GroupDurations.lua")

-- width of background quad
local _w = IsUsingWideScreen() and 320 or 310
local _w = IsUsingWideScreen() and 320 or 303

local af = Def.ActorFrame{
OnCommand=function(self)
self:xy(_screen.cx - (IsUsingWideScreen() and 170 or 165), _screen.cy - 55)
self:xy(_screen.cx - (IsUsingWideScreen() and 170 or 160), _screen.cy - 55)
end,

CurrentSongChangedMessageCommand=function(self) self:playcommand("Set") end,
Expand All @@ -29,7 +29,7 @@ af[#af+1] = Def.Quad{

-- ActorFrame for Artist, BPM, and Song length
af[#af+1] = Def.ActorFrame{
InitCommand=function(self) self:xy(-110,-6) end,
InitCommand=function(self) self:xy(IsUsingWideScreen() and -110 or -95,-6) end,

-- ----------------------------------------
-- Artist Label
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ end

local af = Def.ActorFrame{
InitCommand=function(self)
self:xy(_screen.cx-170, _screen.cy + 28)
self:xy(_screen.cx- (IsUsingWideScreen() and 170 or 160), _screen.cy + 28)
end,

---------------------------------------------------------------------
Expand All @@ -52,7 +52,7 @@ local af = Def.ActorFrame{
-- lower mask
Def.Quad{
InitCommand=function(self)
self:xy(IsUsingWideScreen() and -44 or 0,98)
self:xy(IsUsingWideScreen() and -44 or 90,98)
:zoomto(_screen.w/2, 40)
:MaskSource()
end
Expand All @@ -72,7 +72,8 @@ local af = Def.ActorFrame{
-- gray background Quad
Def.Quad{
InitCommand=function(self)
self:diffuse(color("#1e282f")):zoomto(320, 96)

self:diffuse(color("#1e282f")):zoomto(IsUsingWideScreen() and 320 or 303, 96)
:xy(0, 30)

if ThemePrefs.Get("RainbowMode") then
Expand All @@ -91,8 +92,8 @@ af[#af+1] = Def.CourseContentsList {
NumItemsToDraw=numItemsToDraw,

InitCommand=function(self)
self:xy(40,-4)
:SetUpdateFunction( update )
self:xy(IsUsingWideScreen() and 40 or 40,-4)
:SetUpdateFunction( update ):zoom(IsUsingWideScreen() and 1 or 0.95)
end,

CurrentTrailP1ChangedMessageCommand=function(self) self:playcommand("Set") end,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ local GetStepsToDisplay = LoadActor("./StepsToDisplay.lua")

local t = Def.ActorFrame{
Name="StepsDisplayList",
InitCommand=function(self) self:xy(_screen.cx-26, _screen.cy + 67) end,
InitCommand=function(self) self:xy(IsUsingWideScreen() and _screen.cx-26 or _screen.cx-24 , _screen.cy + 67) end,

OnCommand=function(self) self:queuecommand("RedrawStepsDisplay") end,
CurrentSongChangedMessageCommand=function(self) self:queuecommand("RedrawStepsDisplay") end,
Expand Down
6 changes: 3 additions & 3 deletions BGAnimations/ScreenSelectMusic overlay/banner.lua
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ local t = Def.ActorFrame{
self:zoom(0.7655)
self:xy(_screen.cx - 170, 96)
else
self:zoom(0.75)
self:xy(_screen.cx - 166, 96)
self:zoom(0.72)
self:xy(_screen.cx - 160, 96)
end
end
}
Expand Down Expand Up @@ -68,4 +68,4 @@ t[#t+1] = Def.ActorFrame{
}
}

return t
return t