Fixed timestep for some GUI & input code

Fixed timestep only applied to the physics simulation, but input and GUI updates were not being handled properly, so here's some progress into fixing them.
This commit is contained in:
juanjp600
2016-09-18 11:03:52 -03:00
parent 179c0424d7
commit 33641ead3e
14 changed files with 153 additions and 50 deletions
@@ -82,10 +82,14 @@ namespace Barotrauma.Items.Components
public override void DrawHUD(SpriteBatch spriteBatch, Character character)
{
GuiFrame.Update((float)Physics.step);
GuiFrame.Draw(spriteBatch);
}
public override void UpdateHUD(Character character)
{
GuiFrame.Update((float)Physics.step);
}
private bool ToggleActive(GUIButton button, object obj)
{
SetActive(!IsActive);