Showing 1 changed files with 10 additions and 6 deletions
+10 -6
Nasal/menu.nas
... ...
@@ -180,19 +180,23 @@ var pageClass = {
180 180
             var lines = 0;
181 181
             forindex (var o; objects) {
182 182
                 if (contains(objects[o], 'text')) {
183
+                    if (scroll != nil and contains(scroll, 'lines')) {
184
+                        if (contains(objects[o], 'scrollgroup'))
185
+                            if (objects[o].scrollgroup < scroll.lines)
186
+                                lines += 1;
187
+                    }
188
+                    else
189
+                        lines += 1;
183 190
                     var l = size(objects[o].text) * 10;
184 191
                     if (l > textWidth)
185 192
                         textWidth = l;
186
-                    lines += 1;
187 193
                 }
188 194
                 if (contains(objects[o], 'type') and objects[o].type == 'separator')
189 195
                     geometry.sep += 1;
190 196
             }
191
-            geometry.l = lines;
192
-            if (contains(geometry, 'x'))  geometry.x -= textWidth;
193
-            else                          geometry.x  = 1014 - textWidth;
194
-            if (contains(geometry, 'y'))  geometry.y -= lines * 24 + 72;         # 72 = offset from bottom to let...
195
-            else                          geometry.y  = 758 - (lines * 24) - 72; # ... softkeys display and margin
197
+            if (!contains(geometry, 'l')) geometry.l  = lines;
198
+            if (!contains(geometry, 'x')) geometry.x  = 1014 - textWidth;
199
+            if (!contains(geometry, 'y')) geometry.y  = 758 - (lines * 24) - 72; # 72 = offset from bottom to let softkeys display and margin
196 200
             if (!contains(geometry, 'w')) geometry.w = textWidth;
197 201
         }
198 202
         if (!contains(geometry, 'h') and !contains(geometry, 'l')) {