From 54bc0e0c8038032a37b69cede92f3451205779ae Mon Sep 17 00:00:00 2001 From: Bernhard Bonigl Date: Sun, 18 Mar 2012 21:34:13 +0100 Subject: [PATCH] Backed out changeset: ad89e9a64847 (Construction Menu doesn't use fancygrid anymore) --- .../ConstructionMenu.ocd/Script.c | 24 +++++++++++-------- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/planet/Objects.ocd/Libraries.ocd/Constructor.ocd/ConstructionMenu.ocd/Script.c b/planet/Objects.ocd/Libraries.ocd/Constructor.ocd/ConstructionMenu.ocd/Script.c index fc2ec9435..abd9c9f18 100644 --- a/planet/Objects.ocd/Libraries.ocd/Constructor.ocd/ConstructionMenu.ocd/Script.c +++ b/planet/Objects.ocd/Libraries.ocd/Constructor.ocd/ConstructionMenu.ocd/Script.c @@ -5,7 +5,7 @@ @author Maikel */ -#include GUI_FancyGridMenu +#include GUI_CircleMenu local constructinfo_shown; @@ -38,10 +38,9 @@ global func CreateConstructionMenu(object constructor) protected func Construction() { SetPosition(600, 400); - - _inherited(...); - - SetMenuBorder(menu_itemwidth/2); + // Set original menu graphics. + SetGraphics("BG", GUI_CircleMenu); + return _inherited(...); } public func AddMenuStructures(object constructor, object clonk) @@ -80,18 +79,23 @@ private func ShowConstructionInfo(object item) cost_msg = Format("%s |",cost_msg); while (comp = GetComponent(nil, index++, nil, structure_id)) - cost_msg = Format("%s %dx{{%i}}", cost_msg, GetComponent(comp, nil, nil, structure_id), comp); - - CustomMessage(cost_msg, item, GetOwner(), 0, 160, nil, nil, nil, 1|2); + cost_msg = Format("%s %dx {{%i}}", cost_msg, GetComponent(comp, nil, nil, structure_id), comp); + CustomMessage(cost_msg, this, GetOwner(), 250, 250, nil, nil, nil, 1|2); + constructinfo_shown = item; - constructinfo_shown = item;; + + + // show big picture + SetGraphics(nil, structure_id, 1, GFXOV_MODE_IngamePicture); + SetObjDrawTransform(400, 0, 270000, 0, 400, -50000, 1); return; } public func HideConstructionInfo() { - CustomMessage("", constructinfo_shown, GetOwner()); + CustomMessage("", this, GetOwner()); + SetGraphics(nil, nil, 1); constructinfo_shown = false; }