Fix various interfaces to adapt with different sizes

This commit is contained in:
Beu
2023-09-08 12:19:12 +02:00
parent d6745370b2
commit 2440de9b92
9 changed files with 60 additions and 29 deletions

View File

@ -140,6 +140,7 @@ class DirectoryBrowser implements ManialinkPageAnswerListener {
$index = 0;
$posY = $height / 2 - 10;
$pageFrame = null;
$pageMaxCount = floor(($height * 0.85) / 4);
$navigateRootQuad = new Quad_Icons64x64_1();
$frame->addChild($navigateRootQuad);
@ -178,7 +179,7 @@ class DirectoryBrowser implements ManialinkPageAnswerListener {
foreach ($mapFiles as $filePath => $fileName) {
$shortFilePath = substr($filePath, strlen($folderPath));
if ($index % 15 === 0) {
if ($index % $pageMaxCount === 0) {
// New Page
$pageFrame = new Frame();
$frame->addChild($pageFrame);