crew hud not hardcoded in size - Now 96x96. Removed debugmessage from shovel

stable-5.1
Tobias Zwick 2010-03-17 01:10:33 +01:00
parent 486b6cdc92
commit 855f31f64c
4 changed files with 10 additions and 10 deletions

View File

@ -2,6 +2,6 @@
id=GUI_CrewSelector
Version=4,10,0,0
Category=C4D_StaticBack | C4D_IgnoreFoW | C4D_Foreground | C4D_Parallax | C4D_MouseSelect
Width=64
Height=64
Offset=-32,-32
Width=96
Height=96
Offset=-48,-48

Binary file not shown.

Before

Width:  |  Height:  |  Size: 152 B

After

Width:  |  Height:  |  Size: 214 B

View File

@ -114,7 +114,7 @@ public func SetHotkey(int num)
hotkey = true;
var name = Format("%d",num);
SetGraphics(name,Icon_Number,12,GFXOV_MODE_IngamePicture);
SetObjDrawTransform(300,0,16000,0,300,-30000, 12);
SetObjDrawTransform(300,0,1000*GetDefWidth()/4,0,300,-1000*GetDefWidth()/4, 12);
SetClrModulation(HSL(0,0,180),12);
}
@ -195,7 +195,7 @@ public func UpdateHealthBar(bool nocall)
UpdateName();
}
if(promille > 0)
CustomMessage(Format("@<c dddd00>%d</c>",crew->GetEnergy()), this, crew->GetOwner(), -32*(1000-promille)/1000, 45 + BarOffset(0), nil, nil, nil, MSG_Multiple);
CustomMessage(Format("@<c dddd00>%d</c>",crew->GetEnergy()), this, crew->GetOwner(), -GetDefWidth()/2*(1000-promille)/1000, GetDefHeight()/2 + BarOffset(0) + 14, nil, nil, nil, MSG_Multiple);
}
public func UpdateBreathBar()
@ -251,7 +251,7 @@ public func UpdateMagicBar(bool nocall)
AddMagicBar();
if(promille > 0)
CustomMessage(Format("@<c 1188cc>%d</c>",crew->GetMagicEnergy()), this, crew->GetOwner(), -32*(1000-promille)/1000, 45 + BarOffset(1), nil, nil, nil, MSG_Multiple);
CustomMessage(Format("@<c 1188cc>%d</c>",crew->GetMagicEnergy()), this, crew->GetOwner(), -GetDefWidth()/2*(1000-promille)/1000, GetDefHeight()/2 + BarOffset(1) + 14, nil, nil, nil, MSG_Multiple);
if(!nocall)
SetBarProgress(promille,2);
@ -260,13 +260,13 @@ public func UpdateMagicBar(bool nocall)
private func UpdateName()
{
CustomMessage(Format("@%s",crew->GetName()), this, crew->GetOwner(), 0, 65, nil, nil, nil, MSG_Multiple);
CustomMessage(Format("@%s",crew->GetName()), this, crew->GetOwner(), 0, GetDefHeight(), nil, nil, nil, MSG_Multiple);
cleared = false;
}
private func BarOffset(int num)
{
var offset = GetDefWidth()/2 + HealthBarHeight()/2 + num * BarSpacing();
var offset = GetDefHeight()/2 + HealthBarHeight()/2 + num * BarSpacing();
if(num > 0) offset += HealthBarHeight();
if(num > 1) offset += MagicBarHeight();
return offset;

View File

@ -73,9 +73,9 @@ public func ControlUseHolding(object clonk, int x, int y)
var iAnimation = EffectVar(1, clonk, GetEffect("IntDig", clonk));
var iPosition = clonk->GetAnimationPosition(iAnimation)*180/clonk->GetAnimationLength("Dig");
Message("%d", clonk, iPosition);
//Message("%d", clonk, iPosition);
speed = speed*(Cos(iPosition-45, 50)**2)/2500;
Message("%d", clonk, speed);
//Message("%d", clonk, speed);
// limit angle
angle = BoundBy(angle,65,300);
clonk->SetXDir(Sin(angle,+speed)+xdir_boost,100);