Contents menu: sort extra-slot containers to front to make items jump around less

With the highest items being in the front, the tight grid layout has less reason to resort a major amount of the items every time items are added or removed. This results in a generally more stable layout.
directional-lights
David Dormagen 2016-11-07 20:09:37 +01:00
parent 12e808263b
commit ae2000f0a1
1 changed files with 2 additions and 1 deletions

View File

@ -1047,7 +1047,8 @@ func FxIntRefreshContentsMenuTimer(target, effect, time)
// Use a default grid-menu entry as the base.
custom = MenuStyle_Grid->MakeEntryProplist(symbol, nil);
// Pack it into a larger frame to allow for another button below.
custom = {Right = custom.Right, Bottom = "4em", top = custom, Priority = obj->GetValue()};
// The priority offset makes sure that double-height items are at the front.
custom = {Right = custom.Right, Bottom = "4em", top = custom, Priority = -10000 + obj->GetValue()};
// Then add a little container-symbol (that can be clicked).
custom.bottom =
{