power system's light bulbs are now in front of game-objects (f.e. trees)

David Dormagen 2012-10-24 22:21:24 +02:00
parent b710623186
commit dfc942a08e
2 changed files with 11 additions and 0 deletions

View File

@ -211,4 +211,13 @@ func SetFade(int a)
var clr = (bar.current_clr & 0xffffff) + (t_a << 24);
bar->SetClrModulation(clr, active_overlay);
}
}
func SetPlane(int to)
{
// called on a slave?
if(GetType(bars) != C4V_Array) return;
for(var bar in bars)
bar.Plane = to;
}

View File

@ -356,6 +356,8 @@ func FxVisualPowerChangeRefresh(target, effect)
effect.bar = target->CreateProgressBar(GUI_BarProgressBar, effect.max, effect.current, 35
, controller, {x = off_x, y = off_y}, vis
, {size = 1000, bars = effect.max / 25, graphics_name = effect.graphics_name, back_graphics_name = effect.back_graphics_name, image = Icon_Lightbulb, fade_speed = 1});
// appear on a GUI level in front of other objects (f.e. trees)
effect.bar->SetPlane(1010);
}
func FxVisualPowerChangeTimer(target, effect, time)