From ae2000f0a1b6453298ed2e5c02a461f9816d0443 Mon Sep 17 00:00:00 2001 From: David Dormagen Date: Mon, 7 Nov 2016 20:09:37 +0100 Subject: [PATCH] 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. --- planet/Objects.ocd/HUD.ocd/ObjectInteractionMenu.ocd/Script.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/planet/Objects.ocd/HUD.ocd/ObjectInteractionMenu.ocd/Script.c b/planet/Objects.ocd/HUD.ocd/ObjectInteractionMenu.ocd/Script.c index 5a25d2580..681911e7f 100644 --- a/planet/Objects.ocd/HUD.ocd/ObjectInteractionMenu.ocd/Script.c +++ b/planet/Objects.ocd/HUD.ocd/ObjectInteractionMenu.ocd/Script.c @@ -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 = {