Skip to reading
Save Games & Inventory

Work out the width and height

Edition 0.86.4.1 HF1

0.86.4.1 Hotfix 1 edition. Earlier lessons and screenshots retain their original version context; revised references and supplements describe the newer behavior.

Download PDFView PDF page

The cell area needs at least the total cell sizes plus the gaps between them. The widget also needs padding, its optional header and navigation controls.

Source table from Work out the width and height, page 16
PartWorkshop calculation
Cell area width3 × 310 + 2 × 12 = 954
Cell area height2 × 116 + 1 × 12 = 244
Widget padding16 on each side, adding 32 horizontally and vertically
Header and arrowsExtra vertical room; they are not included in the cell-area calculation.
Chosen outer size1056 × 400, leaving useful space around the 954 × 244 cells.

Border styles and the scrollbar’s own width take a little space too. Do not fit the arithmetic to the last pixel and assume every theme will behave identically. Leave some breathing room.

The Save Game Widget uses the same layout machinery. A thumbnail can make a save card’s content taller than its authored slot height, so budget for the image, caption, gap and padding together.

A scrollbar appearing inside a paged grid usually means the current page’s content does not fit. Paging and scrolling are different: the page changes which items are supplied; the scrollbar moves within an oversized supplied page.

Page 16 of 96Permalink
Go to page