forked from Mirrors/openclonk
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
parent
12e808263b
commit
ae2000f0a1
|
@ -1047,7 +1047,8 @@ func FxIntRefreshContentsMenuTimer(target, effect, time)
|
||||||
// Use a default grid-menu entry as the base.
|
// Use a default grid-menu entry as the base.
|
||||||
custom = MenuStyle_Grid->MakeEntryProplist(symbol, nil);
|
custom = MenuStyle_Grid->MakeEntryProplist(symbol, nil);
|
||||||
// Pack it into a larger frame to allow for another button below.
|
// 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).
|
// Then add a little container-symbol (that can be clicked).
|
||||||
custom.bottom =
|
custom.bottom =
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue