Backed out changeset: ad89e9a64847

(Construction Menu doesn't use fancygrid anymore)
rope
Bernhard Bonigl 2012-03-18 21:34:13 +01:00
parent 07e0c24378
commit 54bc0e0c80
1 changed files with 14 additions and 10 deletions

View File

@ -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;
}