public override void Update(SharpDL.GameTime gameTime) { if (!Visible) { return; } iconFrame.Update(gameTime); if (IsFocused) { timeSinceLastUpdate += gameTime.ElapsedGameTime; if (timeSinceLastUpdate > TimeSpan.FromSeconds(0.5)) { IconInputBar.Visible = true; timeSinceVisibleTrue += gameTime.ElapsedGameTime; if (timeSinceVisibleTrue > TimeSpan.FromSeconds(0.5)) { timeSinceLastUpdate = TimeSpan.Zero; timeSinceVisibleTrue = TimeSpan.Zero; } } else { IconInputBar.Visible = false; } IconInputBar.Update(gameTime); LabelText.Update(gameTime); } base.Update(gameTime); }
private void Dispose(bool disposing) { if (IconFrame != null) { IconFrame.Dispose(); } if (IconInputBar != null) { IconInputBar.Dispose(); } if (LabelText != null) { LabelText.Dispose(); } }
public override void Draw(SharpDL.GameTime gameTime, Renderer renderer) { if (!Visible) { return; } iconFrame.Draw(gameTime, renderer); if (IsFocused) { IconInputBar.Draw(gameTime, renderer); } if (HasText) { LabelText.Draw(gameTime, renderer); } }