-
Notifications
You must be signed in to change notification settings - Fork 142
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix ManageProfiles scroller for 4:3 displays
- Loading branch information
1 parent
156e55c
commit c13e3d3
Showing
3 changed files
with
20 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,33 +1,31 @@ | ||
-- this is only used for the Screen that manages local profiles so far | ||
|
||
local NumRows | ||
local num_rows | ||
local row_height = 28 | ||
|
||
local t = Def.ActorFrame { | ||
InitCommand=cmd(xy,_screen.cx-_screen.w/6, -16; queuecommand, "Capture"), | ||
return Def.ActorFrame { | ||
InitCommand=cmd(xy,_screen.cx-WideScale(146, 143), -16; queuecommand, "Capture"), | ||
CaptureCommand=function(self) | ||
-- how many rows do we need to accommodate? | ||
NumRows = #SCREENMAN:GetTopScreen():GetChild("Container"):GetChild("") | ||
-- If there are more than 10 rows, they collapse into a scroller anyway, | ||
-- so limit it to 10 if so. | ||
if NumRows > 10 then NumRows = 10 end | ||
num_rows = #SCREENMAN:GetTopScreen():GetChild("Container"):GetChild("") | ||
-- If there are more than 10 rows, they collapse via scroller anyway | ||
-- so don't accommodate the decorative border for more than 10 | ||
num_rows = math.min(10, num_rows) | ||
self:queuecommand("Size") | ||
end, | ||
|
||
|
||
-- white border | ||
-- decorative border | ||
Def.Quad{ | ||
SizeCommand=cmd(zoomto, 240, 28*NumRows) | ||
SizeCommand=cmd(zoomto, 240, row_height*num_rows) | ||
}, | ||
|
||
LoadFont("_miso")..{ | ||
InitCommand=cmd(xy,-80, -118; halign,0; diffuse, Color.Black ), | ||
InitCommand=cmd(xy,-99, -118; halign,0; diffuse, Color.Black ), | ||
BeginCommand=function(self) | ||
local profile = GAMESTATE:GetEditLocalProfile() | ||
if profile then | ||
self:settext(profile:GetDisplayName()) | ||
end | ||
end | ||
} | ||
} | ||
|
||
return t | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters